/**
 * Corporate Theme — Premium, Compact, Professional
 * Teknik Servis Yönetim Sistemi
 * v3.0 — Design System Overhaul
 *
 * Tasarım İlkeleri:
 * - Tek vurgu rengi (#4f46e5), yalnızca önemli eylemler için
 * - Gölgeler minimal, yalnızca katman belirtmek için
 * - Gradient yok (buton, ikon, metin rengi olarak)
 * - WCAG 2.2 AA uyumlu kontrast
 * - Azaltılmış hareket desteği
 * - Tek font (Inter), tek ikon ailesi (Bootstrap Icons)
 */

/* ============================================
   GOOGLE FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ============================================
   CSS TOKENS — DESIGN SYSTEM
   ============================================ */
:root {
    /* ── Accent ── */
    --accent:       #4f46e5;   /* Tek vurgu rengi — primary CTA */
    --accent-hover: #4338ca;
    --accent-light: rgba(79, 70, 229, 0.08);
    --accent-ring:  rgba(79, 70, 229, 0.18);

    /* ── Semantic ── */
    --color-success:      #059669;
    --color-success-bg:   rgba(5, 150, 105, 0.08);
    --color-success-border: rgba(5, 150, 105, 0.25);

    --color-warning:      #b45309;
    --color-warning-bg:   rgba(180, 83, 9, 0.08);
    --color-warning-border: rgba(180, 83, 9, 0.25);

    --color-danger:       #dc2626;
    --color-danger-bg:    rgba(220, 38, 38, 0.08);
    --color-danger-border: rgba(220, 38, 38, 0.25);

    --color-info:         #0369a1;
    --color-info-bg:      rgba(3, 105, 161, 0.08);
    --color-info-border:  rgba(3, 105, 161, 0.25);

    /* ── Backgrounds ── */
    --bg-base:     #f8fafc;   /* Sayfa zemini */
    --bg-surface:  #ffffff;   /* Kart, sidebar yüzeyi */
    --bg-elevated: #ffffff;   /* Dropdown, modal */
    --bg-muted:    #f1f5f9;   /* Tablo thead, input */
    --bg-subtle:   #f8fafc;   /* Zebra stripe */

    /* ── Metin ── */
    --text-strong:   #0f172a; /* Başlık, önemli değerler — 14.5:1 */
    --text-primary:  #1e293b; /* Ana gövde metni — 12:1 */
    --text-secondary:#475569; /* İkincil, etiket — 5.8:1 */
    --text-muted:    #64748b; /* Yardımcı — 4.5:1 */
    --text-disabled: #94a3b8; /* Devre dışı */
    --text-inverse:  #ffffff;

    /* ── Kenarlık ── */
    --border:        #e2e8f0; /* Standart */
    --border-strong: #cbd5e1; /* Belirgin */
    --border-focus:  var(--accent);

    /* ── Gölge — yalnızca katman için, minimal ── */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 8px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 8px 16px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.06);

    /* ── Köşe yarıçapı — tutarlı ── */
    --r-sm:  4px;
    --r-md:  6px;
    --r-lg:  8px;
    --r-xl:  10px;
    --r-full: 9999px;

    /* ── Boşluk ── */
    --sp-1: 4px;
    --sp-2: 6px;
    --sp-3: 10px;
    --sp-4: 14px;
    --sp-5: 18px;
    --sp-6: 24px;
    --sp-8: 32px;

    /* ── Geçiş ── */
    --ease-fast: 120ms ease;
    --ease-base: 180ms ease;

    /* ── Layout ── */
    --sidebar-w:   230px;
    --topbar-h:    48px;
    --bottom-nav-h: 60px;
}

/* ── DARK MODE ── */
[data-theme="dark"] {
    --bg-base:     #0f172a;
    --bg-surface:  #1e293b;
    --bg-elevated: #1e293b;
    --bg-muted:    #0f172a;
    --bg-subtle:   #1e293b;

    --text-strong:   #f8fafc;
    --text-primary:  #e2e8f0;
    --text-secondary:#94a3b8;
    --text-muted:    #64748b;
    --text-disabled: #475569;

    --border:        #1e293b;
    --border-strong: #334155;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.30), 0 1px 2px rgba(0, 0, 0, 0.20);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.40), 0 4px 8px rgba(0, 0, 0, 0.30);

    --accent-light: rgba(79, 70, 229, 0.12);
    --accent-ring:  rgba(99, 102, 241, 0.24);

    --color-success:        #34d399;
    --color-success-bg:     rgba(52, 211, 153, 0.10);
    --color-success-border: rgba(52, 211, 153, 0.25);

    --color-warning:        #fbbf24;
    --color-warning-bg:     rgba(251, 191, 36, 0.10);
    --color-warning-border: rgba(251, 191, 36, 0.25);

    --color-danger:         #f87171;
    --color-danger-bg:      rgba(248, 113, 113, 0.10);
    --color-danger-border:  rgba(248, 113, 113, 0.25);

    --color-info:           #38bdf8;
    --color-info-bg:        rgba(56, 189, 248, 0.10);
    --color-info-border:    rgba(56, 189, 248, 0.25);
}

/* ── Azaltılmış hareket ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   APP LAYOUT
   ============================================ */
.app-shell-corporate {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.sidebar-corporate { display: none; }

.main-area-corporate {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}

/* Topbar */
.topbar-corporate {
    height: var(--topbar-h);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--sp-4);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-xs);
    flex-shrink: 0;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.topbar-left { flex: 1; }

/* Mobile toggle */
.mobile-menu-toggle {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--r-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease-fast), color var(--ease-fast);
    font-size: 18px;
}

.mobile-menu-toggle:hover {
    background: var(--bg-muted);
    color: var(--text-primary);
}

.mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

/* Topbar actions */
.topbar-action {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    border-radius: var(--r-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease-fast), color var(--ease-fast);
    position: relative;
    text-decoration: none;
}

.topbar-action:hover {
    background: var(--bg-muted);
    color: var(--text-primary);
}

.topbar-action:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.topbar-action .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--color-danger);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: var(--r-full);
    min-width: 15px;
    text-align: center;
    line-height: 1.4;
}

/* Brand */
.brand-corporate {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.brand-logo {
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

/* Content */
.content-corporate {
    flex: 1;
    padding: var(--sp-4);
    overflow-y: auto;
    padding-bottom: calc(var(--bottom-nav-h) + var(--sp-4));
}

/* Mobile bottom nav */
.mobile-bottom-nav {
    display: flex;
    height: var(--bottom-nav-h);
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: color var(--ease-fast);
    position: relative;
}

.mobile-nav-item i { font-size: 20px; }

.mobile-nav-item.active {
    color: var(--accent);
}

.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 2px;
    background: var(--accent);
    border-radius: 0 0 2px 2px;
}

/* ============================================
   DESKTOP LAYOUT (768px+)
   ============================================ */
@media (min-width: 768px) {
    .app-shell-corporate { flex-direction: row; }

    .sidebar-corporate {
        display: flex;
        flex-direction: column;
        width: var(--sidebar-w);
        background: var(--bg-surface);
        border-right: 1px solid var(--border);
        position: sticky;
        top: 0;
        height: 100dvh;
        overflow-y: auto;
        flex-shrink: 0;
        scrollbar-width: none;
    }
    .sidebar-corporate::-webkit-scrollbar { display: none; }

    .sidebar-header {
        padding: var(--sp-4) var(--sp-3);
        border-bottom: 1px solid var(--border);
        flex-shrink: 0;
    }

    .sidebar-nav {
        flex: 1;
        padding: var(--sp-2);
        display: flex;
        flex-direction: column;
        gap: 2px;
        overflow-y: auto;
    }

    .nav-item-corporate {
        display: flex;
        align-items: center;
        gap: var(--sp-3);
        padding: 8px var(--sp-3);
        border-radius: var(--r-md);
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 13px;
        font-weight: 500;
        transition: background var(--ease-fast), color var(--ease-fast);
    }

    .nav-item-corporate i {
        font-size: 16px;
        width: 18px;
        text-align: center;
        flex-shrink: 0;
    }

    .nav-item-corporate:hover {
        background: var(--bg-muted);
        color: var(--text-primary);
    }

    .nav-item-corporate:focus-visible {
        outline: 2px solid var(--border-focus);
        outline-offset: -2px;
    }

    .nav-item-corporate.active {
        background: var(--accent-light);
        color: var(--accent);
        font-weight: 600;
    }

    .mobile-bottom-nav { display: none; }
    .mobile-menu-toggle { display: none; }

    .content-corporate {
        padding: var(--sp-4);
        padding-bottom: var(--sp-4);
    }
}

/* ============================================
   CARDS
   ============================================ */
.card-corporate {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.card-header-corporate {
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    flex-shrink: 0;
}

.card-title-corporate {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-strong);
    margin: 0;
}

.card-body-corporate {
    padding: var(--sp-4);
}

.card-compact { padding: var(--sp-3); }

/* ============================================
   STAT CARDS
   Gradient yok. Renk token ile semantic.
   ============================================ */
.stat-card-corporate {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp-3) var(--sp-4);
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    transition: box-shadow var(--ease-base);
}

.stat-card-corporate:hover {
    box-shadow: var(--shadow-md);
}

.stat-card-corporate.variant-1 { border-left: 3px solid var(--accent); }
.stat-card-corporate.variant-2 { border-left: 3px solid var(--color-success); }
.stat-card-corporate.variant-3 { border-left: 3px solid var(--color-warning); }
.stat-card-corporate.variant-4 { border-left: 3px solid var(--color-info); }

/* Stat ikon: küçük, semantic renk, sade */
.stat-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    background: var(--bg-muted);
    color: var(--text-secondary);
}

.stat-card-corporate.variant-1 .stat-card-icon { background: var(--accent-light); color: var(--accent); }
.stat-card-corporate.variant-2 .stat-card-icon { background: var(--color-success-bg); color: var(--color-success); }
.stat-card-corporate.variant-3 .stat-card-icon { background: var(--color-warning-bg); color: var(--color-warning); }
.stat-card-corporate.variant-4 .stat-card-icon { background: var(--color-info-bg); color: var(--color-info); }

/* Eski ikon sınıfları — geriye dönük uyum */
.stat-icon-corporate {
    width: 36px;
    height: 36px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    color: white;
}

.stat-icon-corporate.bg-primary   { background: var(--accent); }
.stat-icon-corporate.bg-success   { background: var(--color-success); }
.stat-icon-corporate.bg-warning   { background: var(--color-warning); }
.stat-icon-corporate.bg-info      { background: var(--color-info); }
.stat-icon-corporate.bg-danger    { background: var(--color-danger); }

.stat-card-info { flex: 1; min-width: 0; }

.stat-card-label, .stat-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    margin-bottom: 2px;
    /* Text-transform uppercase kaldırıldı: WCAG 2.2 */
}

/* stat-value: gradient text kaldırıldı — WCAG kontrast */
.stat-card-value, .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-strong);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.stat-change {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Trend badge */
.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: var(--r-sm);
    font-size: 11px;
    font-weight: 600;
    margin-top: 3px;
}

.stat-trend.up     { background: var(--color-success-bg); color: var(--color-success); }
.stat-trend.down   { background: var(--color-danger-bg);  color: var(--color-danger);  }
.stat-trend.neutral{ background: var(--bg-muted);         color: var(--text-muted);    }
.stat-trend i { font-size: 11px; }

/* ============================================
   BUTTONS
   Gradient yok. Solid renk + hover darker.
   ============================================ */
.btn-corporate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 0 var(--sp-4);
    height: 36px;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--ease-fast), color var(--ease-fast),
                border-color var(--ease-fast), box-shadow var(--ease-fast);
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
}

.btn-corporate:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.btn-corporate:disabled,
.btn-corporate[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Sizes */
.btn-corporate-sm {
    height: 30px;
    padding: 0 var(--sp-3);
    font-size: 12px;
    border-radius: var(--r-sm);
}

.btn-corporate-lg {
    height: 42px;
    padding: 0 var(--sp-6);
    font-size: 14px;
}

/* Primary */
.btn-primary-corporate {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary-corporate:hover  { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-primary-corporate:active { background: #3730a3; }

/* Secondary */
.btn-secondary-corporate {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-strong);
}
.btn-secondary-corporate:hover {
    background: var(--bg-muted);
    color: var(--text-primary);
    border-color: var(--border);
}

/* Outline */
.btn-outline-corporate {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.btn-outline-corporate:hover { background: var(--accent-light); }

/* Success */
.btn-success-corporate {
    background: var(--color-success);
    color: #fff;
    border-color: var(--color-success);
}
.btn-success-corporate:hover { background: #047857; }

/* Danger */
.btn-danger-corporate {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
}
.btn-danger-corporate:hover { background: #b91c1c; }

/* Ghost / icon-only */
.btn-ghost-corporate {
    background: transparent;
    color: var(--text-muted);
    border-color: transparent;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--r-md);
}
.btn-ghost-corporate:hover { background: var(--bg-muted); color: var(--text-primary); }

/* Loading state */
.btn-corporate.is-loading { pointer-events: none; }
.btn-corporate.is-loading::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: var(--r-full);
    animation: spin 0.6s linear infinite;
    margin-left: var(--sp-2);
}

/* ============================================
   FORMS
   ============================================ */
.form-label-corporate,
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    /* Uppercase kaldırıldı — WCAG 2.2 */
    margin-bottom: var(--sp-1);
}

.form-label-corporate .required,
.form-label .required {
    color: var(--color-danger);
    margin-left: 2px;
}

.form-input-corporate,
.form-select-corporate,
.form-textarea-corporate,
.form-control,
.form-select {
    width: 100%;
    padding: 0 var(--sp-3);
    height: 36px;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-surface);
    transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
    font-family: inherit;
}

.form-textarea-corporate,
textarea.form-control {
    height: auto;
    padding: var(--sp-2) var(--sp-3);
    min-height: 80px;
    resize: vertical;
}

.form-input-corporate:focus,
.form-select-corporate:focus,
.form-textarea-corporate:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-ring);
    background: var(--bg-surface);
    color: var(--text-primary);
}

.form-control::placeholder,
.form-input-corporate::placeholder,
textarea.form-control::placeholder {
    color: var(--text-disabled);
    opacity: 1;
}

/* Hata durumu */
.form-input-corporate.is-error,
.form-control.is-invalid {
    border-color: var(--color-danger);
}
.form-input-corporate.is-error:focus,
.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px var(--color-danger-bg);
}

.form-error-msg, .invalid-feedback {
    font-size: 12px;
    color: var(--color-danger);
    margin-top: var(--sp-1);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Başarılı durum */
.form-input-corporate.is-success,
.form-control.is-valid {
    border-color: var(--color-success);
}

/* Input group */
.input-group-text {
    background: var(--bg-muted);
    border-color: var(--border-strong);
    color: var(--text-muted);
    padding-inline: var(--sp-3);
    transition: all var(--ease-base);
    font-size: 13px;
}

.input-group:focus-within .input-group-text {
    border-color: var(--border-focus);
    color: var(--accent);
}

/* ============================================
   TABLES — Kompakt, hizalı
   ============================================ */
.table-corporate {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table-corporate thead {
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1;
}

.table-corporate th {
    padding: 8px var(--sp-4);
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    white-space: nowrap;
    user-select: none;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
}

.table-corporate td {
    padding: 9px var(--sp-4);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
    vertical-align: middle;
    color: var(--text-primary);
}

/* Yoğun listelerde sütunları ayırır; tema görünümünü ağırlaştırmaz. */
.table-corporate th:not(:last-child),
.table-corporate td:not(:last-child) {
    border-inline-end: 1px solid color-mix(in srgb, var(--border) 56%, transparent);
}

.table-corporate tbody tr {
    transition: background var(--ease-fast);
}

.table-corporate tbody tr:hover {
    background: var(--bg-subtle);
}

/* Zebra — hafif */
.table-corporate.table-striped tbody tr:nth-child(even) {
    background: var(--bg-subtle);
}

.table-corporate tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive wrapper */
.table-responsive-corporate {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
}

.table-responsive-corporate .table-corporate {
    margin-bottom: 0;
}

/* ============================================
   BADGES — Status, durum
   Uppercase kaldırıldı, font-size yükseltildi
   ============================================ */
.badge-corporate {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--r-sm);
    /* text-transform kaldırıldı */
    line-height: 1.4;
    white-space: nowrap;
}

.badge-primary  { background: var(--accent-light);           color: var(--accent); }
.badge-success  { background: var(--color-success-bg);       color: var(--color-success); }
.badge-warning  { background: var(--color-warning-bg);       color: var(--color-warning); }
.badge-danger,
.badge-error    { background: var(--color-danger-bg);        color: var(--color-danger);  }
.badge-info     { background: var(--color-info-bg);          color: var(--color-info);    }
.badge-neutral  { background: var(--bg-muted);               color: var(--text-secondary);}

/* ============================================
   SEARCH
   ============================================ */
.search-wrapper-corporate {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
    padding: 0 var(--sp-3);
    transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
    height: 36px;
}

.search-wrapper-corporate:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.search-wrapper-corporate i {
    color: var(--text-muted);
    margin-right: var(--sp-2);
    font-size: 14px;
    flex-shrink: 0;
}

.search-wrapper-corporate input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0;
    flex: 1;
    outline: none;
    font-size: 13px;
    font-family: inherit;
    min-width: 0;
}

.search-wrapper-corporate input::placeholder {
    color: var(--text-muted);
}

/* ============================================
   ALERTS / NOTIFICATIONS
   ============================================ */
.alert-corporate {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-lg);
    border: 1px solid;
    font-size: 13px;
    line-height: 1.5;
}

.alert-corporate i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.alert-success { background: var(--color-success-bg); border-color: var(--color-success-border); color: var(--color-success); }
.alert-warning { background: var(--color-warning-bg); border-color: var(--color-warning-border); color: var(--color-warning); }
.alert-danger  { background: var(--color-danger-bg);  border-color: var(--color-danger-border);  color: var(--color-danger);  }
.alert-info    { background: var(--color-info-bg);    border-color: var(--color-info-border);    color: var(--color-info);    }

/* Bootstrap alert overrides */
.alert.alert-success { background: var(--color-success-bg); border-color: var(--color-success-border); color: var(--color-success); }
.alert.alert-danger  { background: var(--color-danger-bg);  border-color: var(--color-danger-border);  color: var(--color-danger);  }
.alert.alert-warning { background: var(--color-warning-bg); border-color: var(--color-warning-border); color: var(--color-warning); }
.alert.alert-info    { background: var(--color-info-bg);    border-color: var(--color-info-border);    color: var(--color-info);    }

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
#toast-container {
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + 16px);
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

@media (min-width: 768px) {
    #toast-container { bottom: 20px; }
}

.toast-corporate {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    pointer-events: auto;
    max-width: 320px;
    animation: toast-in 0.2s ease;
}

.toast-corporate.toast-success { border-left: 3px solid var(--color-success); }
.toast-corporate.toast-error   { border-left: 3px solid var(--color-danger);  }
.toast-corporate.toast-warning { border-left: 3px solid var(--color-warning); }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   MODALS
   ============================================ */
.modal-content {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: var(--sp-4);
}

.modal-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-strong);
}

.modal-body {
    padding: var(--sp-4);
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: var(--sp-3) var(--sp-4);
    gap: var(--sp-2);
}

.btn-close {
    filter: invert(0);
}

[data-theme="dark"] .btn-close {
    filter: invert(1) brightness(0.8);
}

/* ============================================
   TOOLTIPS
   ============================================ */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-strong);
    color: var(--text-inverse);
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--r-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ease-fast);
    z-index: 10000;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
    opacity: 1;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--sp-8) var(--sp-6);
    text-align: center;
    gap: var(--sp-3);
    color: var(--text-muted);
}

.empty-state i {
    font-size: 32px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
}

.empty-state p {
    font-size: 13px;
    margin: 0;
    max-width: 280px;
    line-height: 1.5;
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
    background: var(--bg-muted);
    border-radius: var(--r-sm);
    animation: skeleton-pulse 1.4s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton { animation: none; opacity: 0.6; }
}

/* ============================================
   GRID UTILITIES
   ============================================ */
.grid-corporate {
    display: grid;
    gap: var(--sp-4);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .md\:col-span-2  { grid-column: span 2 / span 2; }
    .md\:col-span-3  { grid-column: span 3 / span 3; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
    .lg\:col-span-2  { grid-column: span 2 / span 2; }
    .lg\:col-span-3  { grid-column: span 3 / span 3; }
    .lg\:col-span-4  { grid-column: span 4 / span 4; }
}

/* ============================================
   PHOTO / UPLOAD
   ============================================ */
.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--sp-3);
    margin-top: var(--sp-3);
}

.photo-card-corporate {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-muted);
    cursor: pointer;
    transition: box-shadow var(--ease-base);
}

.photo-card-corporate:hover { box-shadow: var(--shadow-md); }
.photo-card-corporate img { width: 100%; height: 100%; object-fit: cover; }

.photo-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--ease-fast);
}

.photo-card-corporate:hover .photo-card-overlay { opacity: 1; }
.photo-card-overlay i { color: white; font-size: 20px; }

.photo-upload-zone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--r-lg);
    padding: var(--sp-4);
    text-align: center;
    transition: border-color var(--ease-fast), background var(--ease-fast);
    background: var(--bg-muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.photo-upload-zone:hover,
.photo-upload-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.photo-upload-icon { font-size: 22px; color: var(--accent); margin-bottom: var(--sp-1); }
.photo-upload-text { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin: 0; }

/* Lightbox */
.lightbox-modal-corporate {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--sp-6);
}

.lightbox-content-corporate {
    max-width: 100%;
    max-height: 85dvh;
    border-radius: var(--r-md);
    object-fit: contain;
}

.lightbox-close-corporate {
    position: absolute;
    top: var(--sp-4);
    right: var(--sp-4);
    color: white;
    font-size: 28px;
    cursor: pointer;
    background: transparent;
    border: none;
    line-height: 1;
    opacity: 0.8;
    transition: opacity var(--ease-fast);
}
.lightbox-close-corporate:hover { opacity: 1; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn { animation: fadeIn 0.2s ease; }

/* ============================================
   UTILITY CLASSES
   ============================================ */
.d-flex  { display: flex; }
.d-grid  { display: grid; }
.d-block { display: block; }
.d-none  { display: none; }

.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }

.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }

.mb-1 { margin-bottom: var(--sp-1); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }

.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }

.text-primary-corp   { color: var(--text-primary); }
.text-secondary-corp { color: var(--text-secondary); }
.text-muted-corp     { color: var(--text-muted); }
.text-success-corp   { color: var(--color-success); }
.text-danger-corp    { color: var(--color-danger); }
.text-warning-corp   { color: var(--color-warning); }

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.text-base { font-size: 13px; }
.text-md { font-size: 14px; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cursor-pointer { cursor: pointer; }

/* Separator */
.divider-corporate {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--sp-4) 0;
}

/* Focus ring utility */
.focus-ring:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}
