/* ============================================================================
   CIBLU PATTERNWEB - CSS STYLES
   Based on Ciblu Corporate Identity
   ============================================================================ */

:root {
    /* Ciblu Brand Colors (Official CI) */
    --ciblu-primary: #5F0912;           /* Burgundy - Primary Brand Color */
    --ciblu-primary-700: #4A070E;       /* Darker shade */
    --ciblu-primary-800: #3A050B;       /* Darkest shade */
    --ciblu-secondary: #BA0C2F;         /* Red - Secondary/Accent */
    --ciblu-black: #000000;

    /* Bootstrap overrides */
    --bs-primary: var(--ciblu-primary);
    --bs-primary-rgb: 95, 9, 18;
    --bs-link-color: var(--ciblu-primary);
    --bs-link-hover-color: var(--ciblu-primary-700);

    /* Semantic Colors */
    --color-primary: var(--ciblu-primary);
    --color-primary-hover: var(--ciblu-primary-700);
    --color-primary-active: var(--ciblu-primary-800);
    --color-accent: var(--ciblu-secondary);

    /* Light Palette */
    --background-light: #F6F7F9;
    --surface-light: #FFFFFF;
    --surface-alt-light: #F0F2F5;
    --text-primary-light: #0B0D12;
    --text-secondary-light: #5C6472;
    --border-light: #E2E6ED;
    --danger-light: #B00020;
    --success-light: #2E7D32;

    /* Dark Palette */
    --background-dark: #0F1115;
    --surface-dark: #171A20;
    --surface-alt-dark: #1D212A;
    --text-primary-dark: #F2F4F8;
    --text-secondary-dark: #B5BBC7;
    --border-dark: #2A2F3A;
    --danger-dark: #FF6B6B;
    --success-dark: #81C784;

    /* Grays */
    --gray-100: #F0F2F5;
    --gray-200: #E2E6ED;
    --gray-300: #C8CDD6;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Default: Light Theme */
body {
    --background: var(--background-light);
    --surface: var(--surface-light);
    --surface-alt: var(--surface-alt-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
    --border: var(--border-light);
    --danger: var(--danger-light);
    --success: var(--success-light);
}

/* Dark Theme */
body.theme-dark,
@media (prefers-color-scheme: dark) {
    body:not(.theme-light) {
        --background: var(--background-dark);
        --surface: var(--surface-dark);
        --surface-alt: var(--surface-alt-dark);
        --text-primary: var(--text-primary-dark);
        --text-secondary: var(--text-secondary-dark);
        --border: var(--border-dark);
        --danger: var(--danger-dark);
        --success: var(--success-dark);
    }
}

/* Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    line-height: 1.5;
}

/* Links */
a, .btn-link {
    color: var(--ciblu-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover, .btn-link:hover {
    color: var(--ciblu-primary-700);
}

/* ============================================================================
   SITE HEADER - Ciblu Branded Header
   ============================================================================ */

.site-header {
    background: linear-gradient(135deg, var(--ciblu-primary) 0%, var(--ciblu-primary-800) 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo & Brand */
.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    text-decoration: none;
}

.header-brand:hover {
    color: white;
    text-decoration: none;
}

.header-logo {
    height: 44px;
    display: flex;
    align-items: center;
}

.header-logo img {
    height: 100%;
    width: auto;
    filter: brightness(0) invert(1); /* Make logo white */
}

.header-brand-divider {
    width: 1px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.3);
}

.header-brand-product {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    opacity: 0.95;
}

/* Main Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.header-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
}

.header-nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.header-nav-link .nav-icon {
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User Menu */
.header-user {
    position: relative;
}

.user-avatar-wrapper {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0.875rem 0.375rem 0.375rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.1);
}

.user-avatar-wrapper:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: white;
    color: var(--ciblu-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: white;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.75rem;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

/* User Dropdown Menu */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    background-color: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    z-index: 200;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.125rem;
    background-color: var(--surface-alt);
}

.dropdown-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: var(--ciblu-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.dropdown-user-info {
    flex: 1;
    min-width: 0;
}

.dropdown-user-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.dropdown-user-email {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.125rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background-color: var(--surface-alt);
    text-decoration: none;
    color: var(--text-primary);
}

.dropdown-item-danger {
    color: var(--danger);
}

.dropdown-item-danger:hover {
    background-color: rgba(176, 0, 32, 0.08);
    color: var(--danger);
}

.dropdown-section-title {
    padding: 0.5rem 1.125rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dropdown-icon {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
}

.dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
}

/* ============================================================================
   SITE CONTENT
   ============================================================================ */

.main-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
    padding: 2rem 0;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================================================
   SITE FOOTER
   ============================================================================ */

.site-footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer-container a {
    color: var(--text-secondary);
}

.footer-container a:hover {
    color: var(--ciblu-primary);
}

.footer-separator {
    opacity: 0.5;
}

/* ============================================================================
   BUTTONS - Ciblu Branded
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--ciblu-primary);
    border-color: var(--ciblu-primary);
    color: white;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--ciblu-primary-700);
    border-color: var(--ciblu-primary-700);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:active, .btn-primary.active {
    background-color: var(--ciblu-primary-800);
    border-color: var(--ciblu-primary-800);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(95, 9, 18, 0.25);
}

.btn-secondary {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--surface-alt);
    border-color: var(--gray-300);
    color: var(--text-primary);
}

.btn-outline-primary {
    background-color: transparent;
    border-color: var(--ciblu-primary);
    color: var(--ciblu-primary);
}

.btn-outline-primary:hover {
    background-color: var(--ciblu-primary);
    color: white;
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--ciblu-primary);
    padding: 0.5rem 1rem;
}

.btn-text:hover {
    color: var(--ciblu-primary-700);
    text-decoration: underline;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

/* ============================================================================
   CARDS & SURFACES
   ============================================================================ */

.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ============================================================================
   SEARCH INPUT
   ============================================================================ */

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input-wrapper .search-input {
    padding-left: 2.75rem;
}

.results-count {
    font-size: 0.875rem;
}

/* ============================================================================
   FORMS
   ============================================================================ */

.form-control {
    width: 100%;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    background-color: var(--surface);
    border-color: var(--ciblu-primary);
    box-shadow: 0 0 0 0.2rem rgba(95, 9, 18, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-secondary);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

/* ============================================================================
   BADGES - Ciblu Styled
   ============================================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary, .ciblu-badge {
    background-color: var(--ciblu-primary);
    color: white;
}

.badge-soft, .ciblu-badge-soft {
    background: rgba(95, 9, 18, 0.10);
    color: var(--ciblu-primary);
    border: 1px solid rgba(95, 9, 18, 0.20);
}

.badge-success {
    background-color: rgba(46, 125, 50, 0.15);
    color: var(--success);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: #D97706;
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.15);
    color: #2563EB;
}

.badge-danger {
    background-color: rgba(176, 0, 32, 0.15);
    color: var(--danger);
}

/* ============================================================================
   PAGE LAYOUT
   ============================================================================ */

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.page-content {
    padding: 1rem 0 2rem;
}

/* ============================================================================
   LIST ITEMS
   ============================================================================ */

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.list-item:hover {
    border-color: var(--ciblu-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.list-item-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.list-item-action {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-left: 1rem;
}

/* Compact list item variant - for dense lists (100+ items) */
.list-item-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.875rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 0.375rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.list-item-compact:hover {
    border-color: var(--ciblu-primary);
    background-color: var(--background);
}

.list-item-compact .list-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.list-item-compact .list-item-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item-compact .list-item-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.list-item-compact .badge {
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
}

.list-item-compact .list-item-arrow {
    opacity: 0.4;
}

.list-item-compact:hover .list-item-arrow {
    opacity: 1;
}

.list-item-compact .btn-clear-pattern {
    padding: 0.25rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.list-item-compact .btn-clear-pattern:hover {
    color: var(--danger);
    background-color: rgba(220, 53, 69, 0.1);
}

/* List group active (e.g., Arena selection) */
.list-group-item.active,
.list-group-item.active:focus,
.list-group-item.active:hover {
    background-color: var(--ciblu-primary) !important;
    border-color: var(--ciblu-primary) !important;
    color: #fff !important;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
    background-color: rgba(95, 9, 18, 0.06);
}

/* ============================================================================
   AVATAR
   ============================================================================ */

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--ciblu-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: border-color 0.2s ease;
}

.avatar:hover {
    border-color: var(--ciblu-primary);
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
}

/* ============================================================================
   EMPTY STATE - Enhanced Ciblu Styled
   ============================================================================ */

.empty-state, .ciblu-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(95, 9, 18, 0.04);
    border: 1px solid rgba(95, 9, 18, 0.10);
    border-radius: 0.75rem;
}

.empty-state-container {
    text-align: center;
    padding: 3rem 2rem 4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    max-width: 480px;
    margin: 0 auto;
}

.empty-state-container .empty-state-icon {
    color: var(--ciblu-primary);
    opacity: 0.6;
    margin-bottom: 1.5rem;
}

.empty-state-container .empty-state-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
}

.empty-state-container .empty-state-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1.25rem;
}

.empty-state-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background-color: var(--surface-alt);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.empty-state-email svg {
    color: var(--text-secondary);
}

.empty-state-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.empty-state-divider::before,
.empty-state-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border);
}

.empty-state-hint {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0.75rem 0 0;
}

/* Button spinner for loading states */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

.btn-secondary .btn-spinner {
    border-color: rgba(0, 0, 0, 0.15);
    border-top-color: var(--text-primary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.empty-state-text {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================================================
   HERO
   ============================================================================ */

.hero-text {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.body-text {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================================================
   FILTER CHIPS
   ============================================================================ */

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip:hover {
    background-color: var(--surface-alt);
    border-color: var(--gray-300);
}

.chip.active {
    background-color: var(--ciblu-primary);
    color: white;
    border-color: var(--ciblu-primary);
}

/* ============================================================================
   COMPETITION GROUP
   ============================================================================ */

.competition-group {
    margin-bottom: 1.5rem;
}

.competition-group-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

/* ============================================================================
   PATTERN CARD
   ============================================================================ */

.pattern-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pattern-card:hover {
    border-color: var(--ciblu-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.pattern-card.selected {
    border-color: var(--ciblu-primary);
    border-width: 2px;
    background-color: rgba(95, 9, 18, 0.04);
}

.pattern-thumbnail, .ciblu-thumb-wrap {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 2rem;
}

/* ============================================================================
   PROGRESS INDICATOR
   ============================================================================ */

.progress-bar {
    height: 8px;
    background-color: var(--surface-alt);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--ciblu-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-bar-fill.complete {
    background-color: var(--success);
}

/* ============================================================================
   MODAL / POPUP
   ============================================================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--surface);
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* ============================================================================
   ALERTS - Ciblu Styled
   ============================================================================ */

.ciblu-alert {
    background: rgba(95, 9, 18, 0.06);
    border: 1px solid rgba(95, 9, 18, 0.12);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    color: #2b2b2b;
}

/* ============================================================================
   CIBLU LINKS
   ============================================================================ */

.ciblu-link {
    color: var(--ciblu-primary);
}

.ciblu-link:hover {
    color: var(--ciblu-secondary);
    text-decoration: underline;
}

.ciblu-icon-inline {
    margin-left: 0.35rem;
    opacity: 0.85;
}

/* ============================================================================
   UTILITIES
   ============================================================================ */

.text-primary { color: var(--ciblu-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }

.bg-primary { background-color: var(--ciblu-primary) !important; }
.bg-surface { background-color: var(--surface) !important; }
.bg-surface-alt { background-color: var(--surface-alt) !important; }

.border-primary { border-color: var(--ciblu-primary) !important; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

.w-100 { width: 100%; }
.text-center { text-align: center; }

/* ============================================================================
   SVG ICONS
   ============================================================================ */

.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
}

.icon svg {
    display: block;
}

/* Back/Forward link styling */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--ciblu-primary);
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: all 0.2s ease;
}

.btn-back:hover {
    color: var(--ciblu-primary-700);
    text-decoration: none;
}

.btn-back svg {
    transition: transform 0.2s ease;
}

.btn-back:hover svg {
    transform: translateX(-2px);
}

/* Forward arrow in list items */
.list-item-arrow {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.list-item:hover .list-item-arrow {
    color: var(--ciblu-primary);
    transform: translateX(2px);
}

/* Dropdown arrow */
.dropdown-chevron {
    display: flex;
    align-items: center;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

/* ============================================================================
   LOADING SPINNER
   ============================================================================ */

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--ciblu-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

/* ============================================================================
   PATTERN GRID
   ============================================================================ */

.pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 576px) {
    .pattern-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* ============================================================================
   ACCOUNT PAGE STYLES
   ============================================================================ */

.account-card {
    background: linear-gradient(135deg, var(--ciblu-primary) 0%, var(--ciblu-primary-800) 100%);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.account-profile {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.account-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.account-info {
    flex: 1;
}

.account-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.account-email {
    font-size: 0.9375rem;
    opacity: 0.85;
    margin-bottom: 0.5rem;
}

.account-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4ade80;
}

.card-header-simple {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.card-header-simple .card-title {
    margin: 0;
}

.card-header-simple svg {
    flex-shrink: 0;
}

/* Theme Options */
.theme-options {
    display: flex;
    gap: 0.75rem;
}

.theme-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    border-radius: 0.75rem;
    border: 2px solid var(--border);
    background-color: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.theme-option:hover {
    border-color: var(--gray-300);
    background-color: var(--surface-alt);
}

.theme-option.active {
    border-color: var(--ciblu-primary);
    background-color: rgba(95, 9, 18, 0.06);
    color: var(--ciblu-primary);
}

/* About Info */
.about-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.about-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.about-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.about-label {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.about-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9375rem;
}

/* Logout Button */
.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    color: var(--danger);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background-color: rgba(176, 0, 32, 0.08);
    border-color: var(--danger);
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
        height: 60px;
    }

    .header-logo {
        height: 36px;
    }

    .header-brand-divider,
    .header-brand-product {
        display: none;
    }

    .header-nav-link span:not(.nav-icon) {
        display: none;
    }

    .header-nav-link {
        padding: 0.5rem 0.75rem;
    }

    .header-nav-link .nav-icon {
        margin: 0;
    }

    .user-name {
        display: none;
    }

    .user-avatar-wrapper {
        padding: 0.25rem;
        background: transparent;
    }

    .content-container {
        padding: 0 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .site-content {
        padding: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .header-nav {
        gap: 0.25rem;
    }

    .header-nav-link {
        padding: 0.5rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* ============================================================================
   RICHTER VERWALTUNG
   ============================================================================ */

.richter-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.richter-list .list-item {
    margin-bottom: 0;
}

.avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--ciblu-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
    flex-shrink: 0;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-icon:hover {
    background-color: var(--surface-alt);
    color: var(--text-primary);
}

.btn-icon-danger:hover {
    background-color: rgba(176, 0, 32, 0.1);
    color: var(--danger);
}

.spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.rotate-90 {
    transform: rotate(90deg);
}

.flex-grow-1 {
    flex-grow: 1;
}

/* Badge secondary variant */
.badge-secondary {
    background-color: var(--surface-alt);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* List item lock icon */
.list-item-lock {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ciblu-primary);
    opacity: 0.8;
}

/* Full width button */
.w-100 {
    width: 100%;
}

/* ============================================================================
   ADMIN STYLES
   ============================================================================ */

/* Modal variants */
.modal-sm {
    max-width: 400px;
}

.modal-body {
    margin-bottom: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Badge variants for admin */
.badge-inactive {
    background-color: var(--gray-200);
    color: var(--gray-600);
}

.badge-ewu {
    background-color: #3b82f6;
    color: white;
}

/* Toast message */
.toast-message {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    z-index: 1100;
    animation: toastSlideIn 0.3s ease;
}

.toast-message.success {
    background-color: var(--success);
}

.toast-message.error {
    background-color: var(--danger);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Button danger variant */
.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #9a0018;
    border-color: #9a0018;
}

/* Text color utilities */
.text-danger {
    color: var(--danger) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

