/**
 * Zentrale Styles - vergabefix
 *
 * CI-konforme Styles basierend auf landing.html
 * Diese Datei wird von allen HTML-Seiten eingebunden.
 *
 * Verwendung in HTML:
 * <link rel="stylesheet" href="styles.css">
 */

/* ============================================
   GRUNDLEGENDE CI-STYLES
   ============================================ */

/* Body Basis-Styling */
body {
    font-family: "Mr Eaves Modern", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #334455;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   SCHATTEN (CI-konform)
   ============================================ */

.shadow-cyan-xl {
    box-shadow: 0 10px 30px -5px rgba(0, 187, 221, 0.4);
}

.shadow-card {
    box-shadow: 0 4px 6px -1px rgba(51, 68, 85, 0.1), 0 2px 4px -1px rgba(51, 68, 85, 0.06);
}

.shadow-card-hover {
    box-shadow: 0 10px 15px -3px rgba(51, 68, 85, 0.1), 0 4px 6px -2px rgba(51, 68, 85, 0.05);
}

/* ============================================
   ANIMATIONEN
   ============================================ */

/* Flow-Animation für Prozess-Elemente */
@keyframes flow-animation {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.animated-flow {
    background: linear-gradient(90deg, #334455 0%, #00bbdd 50%, #334455 100%);
    background-size: 200% 200%;
    animation: flow-animation 4s ease-in-out infinite;
}

/* Helix-Muster Animation */
@keyframes helix-flow {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(-50px) translateY(10px);
    }
}

/* ============================================
   HELIX-PATTERN (Markenzeichen)
   ============================================ */

.helix-container {
    position: relative;
    overflow: hidden;
}

.helix-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
    overflow: hidden;
    pointer-events: none;
}

.helix-pattern svg {
    position: absolute;
    width: 200%;
    height: 100%;
}

/* ============================================
   BUTTON-STYLES (ECKIG - keine Rundungen!)
   ============================================ */

/* Primärer Button (Cyan) */
.btn-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #00bbdd;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: rgba(0, 187, 221, 0.9);
}

/* Sekundärer Button (Dark) */
.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #334455;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: rgba(51, 68, 85, 0.9);
}

/* Outline Button */
.btn-outline {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: #334455;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid #334455;
    cursor: pointer;
}

.btn-outline:hover {
    background-color: #334455;
    color: white;
}

/* Outline Cyan Button */
.btn-outline-cyan {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: #00bbdd;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid #00bbdd;
    cursor: pointer;
}

.btn-outline-cyan:hover {
    background-color: #00bbdd;
    color: white;
}

/* ============================================
   CARD-STYLES (ECKIG - keine Rundungen!)
   ============================================ */

.card {
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(51, 68, 85, 0.1), 0 2px 4px -1px rgba(51, 68, 85, 0.06);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(51, 68, 85, 0.1), 0 4px 6px -2px rgba(51, 68, 85, 0.05);
}

/* ============================================
   FORM-ELEMENTE (ECKIG)
   ============================================ */

.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #334455;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: #00bbdd;
    box-shadow: 0 0 0 3px rgba(0, 187, 221, 0.1);
}

.input-field::placeholder {
    color: #9ca3af;
}

/* ============================================
   HEADER-STYLES
   ============================================ */

.header-sticky {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 3px 0 rgba(51, 68, 85, 0.1), 0 1px 2px 0 rgba(51, 68, 85, 0.06);
}

/* ============================================
   STATUS-INDIKATOREN
   ============================================ */

/* Eignungs-Badges */
.badge-eligible {
    background-color: #28a745;
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-partial {
    background-color: #ffc107;
    color: #334455;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-ineligible {
    background-color: #dc3545;
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   UTILITY-KLASSEN
   ============================================ */

/* Kein Border-Radius (ECKIG) */
.no-rounded {
    border-radius: 0 !important;
}

/* Textfarben */
.text-primary-dark {
    color: #334455;
}

.text-accent-cyan {
    color: #00bbdd;
}

/* Hintergrundfarben */
.bg-primary-dark {
    background-color: #334455;
}

.bg-accent-cyan {
    background-color: #00bbdd;
}

.bg-background-light {
    background-color: #F8F9FA;
}

.bg-helix-bg {
    background-color: #3d5563;
}

/* ============================================
   TOAST-NOTIFICATIONS (ECKIG)
   ============================================ */

.toast {
    background-color: white;
    box-shadow: 0 10px 15px -3px rgba(51, 68, 85, 0.1), 0 4px 6px -2px rgba(51, 68, 85, 0.05);
    border-left: 4px solid #00bbdd;
}

.toast-success {
    border-left-color: #28a745;
}

.toast-error {
    border-left-color: #dc3545;
}

.toast-warning {
    border-left-color: #ffc107;
}

.toast-info {
    border-left-color: #00bbdd;
}

/* ============================================
   PROFILE MENU / AVATAR DROPDOWN
   ============================================ */

/* Avatar Container */
#profileDropdownContainer {
    position: relative;
}

/* Avatar Button */
#avatarButton {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#avatarButton:focus {
    outline: 2px solid #00bbdd;
    outline-offset: 2px;
}

/* Avatar Circle (eckig - CI-konform) */
.avatar-initials {
    width: 40px;
    height: 40px;
    background-color: #334455;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.avatar-initials:hover {
    border-color: #00bbdd;
}

/* Dropdown Arrow */
#dropdownArrow {
    transition: transform 0.2s ease;
}

#dropdownArrow.rotate-180 {
    transform: rotate(180deg);
}

/* Dropdown Menu */
#profileDropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 280px;
    background-color: white;
    box-shadow: 0 10px 25px -5px rgba(51, 68, 85, 0.2), 0 8px 10px -6px rgba(51, 68, 85, 0.1);
    border: 1px solid #e5e7eb;
    z-index: 100;
    animation: dropdownFadeIn 0.15s ease-out;
}

#profileDropdown.hidden {
    display: none;
}

/* Dropdown Animation */
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown Header (User Info) */
.dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.dropdown-header-name {
    font-weight: 600;
    color: #334455;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-header-email {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Dropdown Menu Items */
.dropdown-menu-section {
    padding: 0.5rem 0;
}

.dropdown-menu-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-menu-item:hover {
    background-color: #f3f4f6;
}

.dropdown-menu-item.active {
    background-color: #f0fdfa;
    color: #00bbdd;
    border-left: 3px solid #00bbdd;
    padding-left: calc(1rem - 3px);
}

.dropdown-menu-item svg,
.dropdown-menu-item-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    color: #9ca3af;
    flex-shrink: 0;
}

.dropdown-menu-item:hover svg,
.dropdown-menu-item:hover .dropdown-menu-item-icon {
    color: #00bbdd;
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0;
}

/* Logout Item (Red) */
.dropdown-menu-item-logout {
    color: #dc2626;
}

.dropdown-menu-item-logout:hover {
    background-color: #fef2f2;
}

.dropdown-menu-item-logout svg {
    color: #dc2626;
}

/* Plan Badge (optional) */
.avatar-plan-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background-color: #00bbdd;
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    text-transform: uppercase;
}

/* Notification Badge (optional) */
.avatar-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background-color: #dc2626;
    color: white;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    #profileDropdown {
        width: calc(100vw - 32px);
        right: -8px;
    }
}

/* ============================================
   SIDEBAR NAVIGATION (Neues Layout)
   ============================================ */

/* Sidebar Container */
.sidebar {
    width: 256px;
    background-color: white;
    box-shadow: 0 1px 3px 0 rgba(51, 68, 85, 0.1);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 40;
    left: 0;
    top: 0;
}

/* Sidebar Logo Area */
.sidebar-logo {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-logo img {
    height: 2rem;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}

/* Section Headers */
.sidebar-section-title {
    padding: 0 1rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-section-title:not(:first-child) {
    margin-top: 1.5rem;
}

/* Navigation Items */
.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.9375rem;
}

.sidebar-nav-item:hover {
    background-color: #f1f5f9;
    color: #334455;
}

.sidebar-nav-item.active {
    background-color: rgba(0, 187, 221, 0.1);
    color: #00bbdd;
    border-left-color: #00bbdd;
    font-weight: 600;
}

.sidebar-nav-item svg {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Badge Count */
.sidebar-badge {
    background-color: #00bbdd;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    min-width: 20px;
    text-align: center;
    margin-left: auto;
}

/* Sidebar Profile (Bottom) */
.sidebar-profile {
    padding: 1rem;
    border-top: 1px solid #f1f5f9;
    position: relative;
}

.sidebar-profile-button {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.sidebar-profile-button:hover {
    background-color: #f8fafc;
}

.sidebar-profile-avatar {
    width: 40px;
    height: 40px;
    background-color: #334455;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.sidebar-profile-avatar span {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.sidebar-profile-info {
    flex: 1;
    text-align: left;
}

.sidebar-profile-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
}

.sidebar-profile-plan {
    font-size: 0.75rem;
    color: #6b7280;
}

.sidebar-profile-arrow {
    width: 16px;
    height: 16px;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.sidebar-profile-arrow.rotate-180 {
    transform: rotate(180deg);
}

/* Sidebar Profile Dropdown */
.sidebar-profile-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
    z-index: 50;
}

.sidebar-profile-dropdown.hidden {
    display: none;
}

.sidebar-profile-dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #64748b;
    text-decoration: none;
    transition: all 0.15s ease;
    font-size: 0.875rem;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
}

.sidebar-profile-dropdown-item:hover {
    background-color: #f1f5f9;
    color: #334455;
}

.sidebar-profile-dropdown-item svg {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    flex-shrink: 0;
}

.sidebar-profile-dropdown-item.logout {
    color: #ef4444;
    border-top: 1px solid #e2e8f0;
}

.sidebar-profile-dropdown-item.logout:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

/* Main Content Area with Sidebar */
.main-with-sidebar {
    margin-left: 256px;
    min-height: 100vh;
}

/* Standard Content Container - einheitliche Platzierung */
.content-standard {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem;
}

/* Full-Width Content Container - für Index/Suche */
.content-fullwidth {
    max-width: none;
    padding: 1.5rem;
}

/* ============================================
   TAB SYSTEM
   ============================================ */

.tab-button {
    padding: 12px 24px;
    font-size: 14px;
    color: #64748b;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    cursor: pointer;
}

.tab-button:hover {
    color: #334455;
}

.tab-button.active {
    color: #334455;
    border-bottom-color: #334455;
    font-weight: 600;
}

/* ============================================
   MESSAGE LIST (Postfach)
   ============================================ */

.message-item {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.message-item:hover {
    background-color: #f8fafc;
}

.message-item.unread {
    background-color: #fafbfc;
}

.message-item.unread .message-title {
    font-weight: 700;
    color: #1a202c;
}

.message-item.unread::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #00bbdd;
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
}

.message-item:not(.unread)::before {
    content: '';
    width: 8px;
    height: 8px;
    background: transparent;
    margin-right: 16px;
    flex-shrink: 0;
}

/* ============================================
   MESSAGE MODAL
   ============================================ */

.message-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.message-modal.hidden {
    display: none;
}

.message-modal-content {
    background: white;
    width: 90%;
    max-width: 720px;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ============================================
   STAT CARDS
   ============================================ */

.stat-card-mini {
    background: white;
    padding: 20px;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.action-btn {
    padding: 8px 12px;
    color: #64748b;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    font-size: 13px;
    background: none;
    border: none;
    cursor: pointer;
}

.action-btn:hover {
    background-color: #f1f5f9;
    color: #334455;
}

.action-btn svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

/* ============================================
   MOBILE RESPONSIVE - SIDEBAR
   ============================================ */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-with-sidebar {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }
}

@media (min-width: 1025px) {
    .sidebar-toggle {
        display: none;
    }
}
