/* =============================================
   Primeviare — Admin Panel
   ============================================= */

:root {
    --sidebar-width: 280px;
    --topbar-height: 72px;

    /* Ana marka — Primeviare */
    --primary: #565941;
    --primary-dark: #484b38;
    --primary-deep: #3d4030;
    --primary-light: #6d7054;
    --primary-soft: #d4d6c8;
    --primary-glow: rgba(86, 89, 65, 0.28);
    --primary-muted: rgba(86, 89, 65, 0.12);

    /* Vurgu */
    --accent: #848770;
    --accent-soft: rgba(132, 135, 112, 0.14);

    /* Semantik */
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #565941;

    /* Sidebar */
    --sb-bg: #ffffff;
    --sb-bg-2: #fafaf8;
    --sb-bg-3: #f5f5f0;
    --sb-border: rgba(86, 89, 65, 0.1);
    --sb-border-soft: rgba(86, 89, 65, 0.06);
    --sb-text: #6b6e62;
    --sb-text-hover: #484b38;
    --sb-text-muted: #8a8d7e;
    --sb-active-bg: linear-gradient(90deg, rgba(86,89,65,.14) 0%, rgba(86,89,65,.05) 65%, transparent 100%);
    --sb-active-border: #565941;
    --sb-active-text: #484b38;
    --sb-hover-bg: rgba(86, 89, 65, 0.07);
    --sb-icon-bg: #f5f5f0;
    --sb-icon-hover: rgba(86, 89, 65, 0.12);
    --sb-glow: rgba(86, 89, 65, 0.06);
    --sb-shadow: 2px 0 24px rgba(61, 64, 48, 0.06);

    /* Yüzeyler */
    --bg: #f3f4f0;
    --surface: #ffffff;
    --surface-2: #fafaf8;
    --border: rgba(86, 89, 65, 0.08);
    --border-strong: rgba(86, 89, 65, 0.14);
    --text: #2a2c22;
    --text-2: #4a4d42;
    --text-3: #8a8d7e;

    /* Menü ikon renkleri */
    --icon-blue:   #6d7054;
    --icon-green:  #3cb892;
    --icon-amber:  #d4a24e;
    --icon-rose:   #e07a8a;
    --icon-cyan:   #848770;
    --icon-purple: #9b87d9;
    --icon-teal:   #565941;

    /* Shape */
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 18px;
    --shadow-xs: 0 1px 2px rgba(21,27,36,.04);
    --shadow-sm: 0 2px 8px rgba(21,27,36,.06);
    --shadow-md: 0 8px 30px rgba(21,27,36,.08);
    --shadow-lg: 0 20px 50px rgba(21,27,36,.11);
    --ease: cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* === SHELL === */
.admin-shell {
    display: flex;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 70% 55% at 100% 0%, rgba(86,89,65,.07), transparent 52%),
        radial-gradient(ellipse 55% 45% at 0% 100%, rgba(132,135,112,.04), transparent 50%),
        var(--bg);
}

/* === LEGACY (personel / eski navbar layout) === */
body > .navbar.fixed-top ~ #wrapper {
    padding-top: 56px;
    min-height: 100vh;
}

body > .navbar.fixed-top ~ #wrapper #sidebar {
    top: 56px;
    height: calc(100vh - 56px);
    max-height: calc(100vh - 56px);
    background: #fff;
    border-right: 1px solid #e9ecef;
    box-shadow: none;
    width: 235px;
}

body > .navbar.fixed-top ~ #wrapper #sidebar .sidebar-nav .nav-link {
    color: #495057;
    border-radius: 8px;
    padding: 8px 12px;
    gap: 9px;
}

body > .navbar.fixed-top ~ #wrapper #sidebar .sidebar-nav .nav-link:hover {
    background: #e8eae2;
    color: #565941;
}

body > .navbar.fixed-top ~ #wrapper #sidebar .sidebar-nav .nav-link.active {
    background: #e8eae2;
    color: #565941;
    box-shadow: none;
}

body > .navbar.fixed-top ~ #wrapper #sidebar .sidebar-nav .nav-link.active::before {
    display: none;
}

body > .navbar.fixed-top ~ #wrapper #sidebar .nav-section-title {
    color: #adb5bd;
}

body > .navbar.fixed-top ~ #wrapper #page-content {
    margin-left: 235px;
    min-height: calc(100vh - 56px);
}

@media (max-width: 991.98px) {
    body > .navbar.fixed-top ~ #wrapper #sidebar {
        transform: translateX(-100%);
        z-index: 1050;
    }
    body > .navbar.fixed-top ~ #wrapper #sidebar.show {
        transform: translateX(0);
    }
    body > .navbar.fixed-top ~ #wrapper #page-content {
        margin-left: 0 !important;
    }
}

#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(21, 27, 36, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1090;
    opacity: 0;
    transition: opacity .3s var(--ease);
}
#sidebar-overlay.show { display: block; opacity: 1; }

/* === SIDEBAR (admin) === */
.admin-shell #sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse 100% 70% at 0% 0%, rgba(86,89,65,.06), transparent 55%),
        linear-gradient(180deg, var(--sb-bg) 0%, var(--sb-bg-2) 100%);
    border-right: 1px solid var(--sb-border);
    box-shadow: var(--sb-shadow);
    transition: transform .35s var(--ease);
    overflow: hidden;
}

/* Brand */
.admin-shell .sidebar-brand {
    flex-shrink: 0;
    padding: 22px 18px 18px;
    border-bottom: 1px solid var(--sb-border-soft);
    background: linear-gradient(180deg, rgba(86,89,65,.04) 0%, transparent 100%);
    position: relative;
}

.admin-shell .sidebar-brand::after {
    content: '';
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
    opacity: .35;
    border-radius: 2px;
}

.admin-shell .sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.admin-shell .sidebar-brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: linear-gradient(145deg, var(--primary-light) 0%, var(--primary) 45%, var(--primary-deep) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 6px 20px var(--primary-glow);
    flex-shrink: 0;
}

.admin-shell .sidebar-brand-logo {
    height: 42px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    flex-shrink: 0;
}

.admin-shell .sidebar-brand-logo-wide {
    height: 38px;
    width: auto;
    max-width: 210px;
    object-fit: contain;
    flex-shrink: 0;
}

.admin-shell .sidebar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-shell .sidebar-brand-text strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-shell .sidebar-brand-text small {
    font-size: 11px;
    color: var(--primary-dark);
    font-weight: 600;
    margin-top: 2px;
    opacity: .85;
}

/* User card */
.admin-shell .sidebar-header {
    flex-shrink: 0;
    padding: 12px 14px 10px;
}

.admin-shell .sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(86,89,65,.07) 0%, var(--sb-bg-3) 100%);
    border: 1px solid var(--sb-border);
    box-shadow: var(--shadow-xs);
}

.admin-shell .sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(145deg, #848770, var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--primary-glow);
    overflow: hidden;
}

.admin-shell .sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-shell .sidebar-user-info { min-width: 0; overflow: hidden; }

.admin-shell .sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-shell .sidebar-user-role {
    font-size: 11px;
    color: var(--sb-text);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.admin-shell .status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(16,185,129,.45);
}

/* Nav */
.admin-shell .sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 10px 12px !important;
    -webkit-overflow-scrolling: touch;
}

.admin-shell .nav-section-title {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .13em;
    color: var(--sb-text-muted);
    padding: 18px 12px 7px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-shell .nav-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--sb-border), transparent);
}

.admin-shell .sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    margin-bottom: 3px;
    border-radius: var(--radius-sm);
    color: var(--sb-text);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all .2s var(--ease);
    position: relative;
}

.admin-shell .sidebar-nav .nav-link .nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sb-icon-bg);
    flex-shrink: 0;
    transition: all .2s var(--ease);
    border: 1px solid var(--sb-border-soft);
}

.admin-shell .sidebar-nav .nav-link .nav-icon i { font-size: 15px; line-height: 1; }

.admin-shell .sidebar-nav .nav-link .nav-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-shell .sidebar-nav .nav-link .badge {
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 99px !important;
    font-weight: 700;
    margin-left: auto;
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 2px 6px rgba(220,38,38,.25);
}

.admin-shell .sidebar-nav .nav-link:hover {
    color: var(--sb-text-hover);
    background: var(--sb-hover-bg);
    border-color: rgba(86,89,65,.1);
}

.admin-shell .sidebar-nav .nav-link:hover .nav-icon {
    background: var(--sb-icon-hover);
    border-color: rgba(86,89,65,.15);
    transform: translateX(2px);
}

.admin-shell .sidebar-nav .nav-link.active {
    color: var(--sb-active-text);
    background: var(--sb-active-bg);
    border-color: rgba(86,89,65,.18);
    font-weight: 600;
}

.admin-shell .sidebar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary-light), var(--primary-dark));
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 8px rgba(86,89,65,.35);
}

.admin-shell .sidebar-nav .nav-link.active .nav-icon {
    background: linear-gradient(145deg, var(--primary-light), var(--primary-dark));
    border-color: transparent;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Bölüm bazlı ikon kutusu renkleri — açık tema */
.admin-shell .nav-link[data-color="blue"]   .nav-icon { background: rgba(86,89,65,.12);  border-color: rgba(86,89,65,.15); }
.admin-shell .nav-link[data-color="green"]  .nav-icon { background: rgba(60,184,146,.12); border-color: rgba(60,184,146,.15); }
.admin-shell .nav-link[data-color="amber"]  .nav-icon { background: rgba(212,162,78,.12);  border-color: rgba(212,162,78,.15); }
.admin-shell .nav-link[data-color="rose"]   .nav-icon { background: rgba(224,122,138,.12); border-color: rgba(224,122,138,.15); }
.admin-shell .nav-link[data-color="cyan"]   .nav-icon { background: rgba(132,135,112,.12);  border-color: rgba(132,135,112,.15); }
.admin-shell .nav-link[data-color="purple"] .nav-icon { background: rgba(155,135,217,.12); border-color: rgba(155,135,217,.15); }
.admin-shell .nav-link[data-color="teal"]   .nav-icon { background: rgba(86,89,65,.1);   border-color: rgba(86,89,65,.15); }

.admin-shell .nav-link[data-color="blue"]   .nav-icon i { color: #565941; }
.admin-shell .nav-link[data-color="green"]  .nav-icon i { color: #059669; }
.admin-shell .nav-link[data-color="amber"]  .nav-icon i { color: #b45309; }
.admin-shell .nav-link[data-color="rose"]   .nav-icon i { color: #db2777; }
.admin-shell .nav-link[data-color="cyan"]   .nav-icon i { color: #6d7054; }
.admin-shell .nav-link[data-color="purple"] .nav-icon i { color: #7c3aed; }
.admin-shell .nav-link[data-color="teal"]   .nav-icon i { color: var(--primary-dark); }
.admin-shell .nav-link.active .nav-icon i { color: #fff !important; }

/* Sidebar footer */
.admin-shell .sidebar-footer {
    flex-shrink: 0;
    padding: 14px 16px !important;
    border-top: 1px solid var(--sb-border) !important;
    background: var(--sb-bg-3);
}

.admin-shell .sidebar-footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-bottom: 5px;
}

.admin-shell .sidebar-footer-brand i {
    color: var(--primary);
    font-size: 14px;
}

.admin-shell .sidebar-footer-brand span {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-2);
}

.admin-shell .sidebar-footer-meta {
    text-align: center;
    font-size: 10px;
    color: var(--sb-text-muted);
    line-height: 1.6;
}

.admin-shell .version-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 99px;
    background: var(--primary-muted);
    color: var(--primary-dark);
    border: 1px solid rgba(86,89,65,.15);
    font-weight: 700;
    font-size: 9.5px;
    letter-spacing: .04em;
}

.admin-shell .sidebar-nav::-webkit-scrollbar { width: 4px; }
.admin-shell .sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(21,27,36,.12);
    border-radius: 4px;
}
.admin-shell .sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(86,89,65,.3);
}

/* === MAIN CONTENT === */
.admin-shell #page-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* === TOPBAR (Header) === */
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--topbar-height);
    min-height: var(--topbar-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.topbar-left { flex: 1; }
.topbar-right { flex-shrink: 0; }

.topbar-page-info { min-width: 0; }

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    margin-bottom: 2px;
}

.topbar-breadcrumb a {
    color: var(--text-3);
    text-decoration: none;
    transition: color .15s;
}
.topbar-breadcrumb a:hover { color: var(--primary); }
.topbar-breadcrumb i { font-size: 10px; opacity: .5; }
.topbar-breadcrumb span { color: var(--text-2); }

.topbar-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--text);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Topbar buttons */
.topbar-btn {
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    transition: all .18s var(--ease);
    white-space: nowrap;
    line-height: 1;
}

.topbar-btn:hover,
.topbar-btn.show {
    background: var(--surface-2);
    border-color: rgba(86,89,65,.22);
    color: var(--primary-dark);
}

.topbar-btn-icon {
    width: 40px;
    padding: 0;
    position: relative;
}

.topbar-btn-primary {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 50%, var(--primary-dark) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.topbar-btn-primary:hover,
.topbar-btn-primary.show {
    background: linear-gradient(135deg, #848770 0%, var(--primary-light) 50%, var(--primary) 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.topbar-btn.dropdown-toggle::after,
.topbar-user.dropdown-toggle::after { display: none; }

.topbar-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 9px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    background: var(--danger);
    color: #fff;
    border-radius: 99px;
    border: 2px solid var(--surface);
}

.topbar-divider {
    width: 1px;
    height: 28px;
    background: var(--border-strong);
    margin: 0 4px;
}

/* User button */
.topbar-user {
    height: 44px;
    padding: 4px 10px 4px 4px;
    border: 1px solid var(--border-strong);
    border-radius: 99px;
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font-family: inherit;
    transition: all .18s var(--ease);
}

.topbar-user:hover,
.topbar-user.show {
    border-color: rgba(86,89,65,.28);
    background: var(--surface-2);
    box-shadow: var(--shadow-sm);
}

.topbar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.topbar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topbar-user-info {
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.topbar-user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-user-role {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 500;
}

.topbar-user-caret {
    font-size: 11px;
    color: var(--text-3);
    margin-left: 2px;
}

/* Dropdowns */
.admin-dropdown {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 6px !important;
    min-width: 230px;
    margin-top: 10px !important;
    animation: dropIn .2s var(--ease);
}

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

.admin-dropdown .dropdown-header {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-3);
    padding: 8px 12px 4px;
}

.admin-dropdown .dropdown-item {
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background .15s;
}

.admin-dropdown .dropdown-item i {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.admin-dropdown .dropdown-item:hover { background: var(--surface-2); }

.icon-primary { background: var(--primary-muted); color: var(--primary-dark); }
.icon-success  { background: rgba(5,150,105,.12); color: var(--success); }
.icon-warning  { background: rgba(217,119,6,.12); color: var(--warning); }
.icon-danger   { background: rgba(220,38,38,.12); color: var(--danger); }

.admin-dropdown-user { padding: 14px 14px 10px !important; }
.admin-dropdown-user .user-name { font-weight: 700; font-size: 14px; }
.admin-dropdown-user .user-role { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.admin-dropdown-notify { min-width: 320px !important; }
.notify-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
}
.notify-empty i { display: block; font-size: 30px; margin-bottom: 8px; opacity: .35; }

/* Content */
.content-wrapper {
    flex: 1;
    padding: 24px 28px 28px;
}

/* Page footer */
.admin-page-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--text-3);
    font-weight: 500;
}

.admin-page-footer a {
    color: var(--text-2);
    text-decoration: none;
    transition: color .15s;
}
.admin-page-footer a:hover { color: var(--primary-dark); }

.admin-page-footer-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.admin-page-footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

/* === PAGE HEADER === */
.page-header {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 18px 24px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h4 {
    margin: 0;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -.02em;
}

/* === CARDS === */
.card {
    border-radius: var(--radius) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-xs) !important;
}

.stat-card {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md) !important;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

/* === TABLES === */
.table-card {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    overflow: hidden;
    box-shadow: var(--shadow-xs) !important;
}

.table th {
    background: var(--surface-2);
    font-weight: 700;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-3);
    padding: 12px 16px;
    border-top: none;
}

.table td {
    padding: 12px 16px;
    vertical-align: middle;
    font-size: 13.5px;
    border-color: var(--border);
}

.table-hover tbody tr:hover { background: rgba(86,89,65,.03); }

/* === FORMS === */
.form-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 5px;
}

.form-control,
.form-select {
    border-radius: var(--radius-sm) !important;
    font-size: 13.5px;
    padding: 10px 14px;
    border-color: var(--border-strong);
    font-family: inherit;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-muted);
}

/* === BUTTONS === */
.btn {
    border-radius: var(--radius-sm) !important;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 50%, var(--primary-dark) 100%) !important;
    border: none !important;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #848770 0%, var(--primary-light) 50%, var(--primary) 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-success {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-success:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: rgba(86, 89, 65, 0.35) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary-muted) !important;
    border-color: var(--primary) !important;
    color: var(--primary-dark) !important;
}

.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }

.btn-sm { font-size: 12px !important; padding: 6px 12px !important; }

/* === MODALS === */
/* Sidebar z-index 1100 — modal üstüne çıksın */
.admin-shell .modal {
    z-index: 1200 !important;
}
.admin-shell .modal-backdrop {
    z-index: 1190 !important;
}

.modal-content {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-lg) !important;
}

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

.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
}

/* === ALERT / BADGE === */
.alert { border-radius: var(--radius-sm) !important; border: none !important; }
.badge { font-weight: 700; font-size: 11px; border-radius: 6px !important; }

.card-header {
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
}

.card-header h6 { font-size: 14px; font-weight: 800; letter-spacing: -.01em; }

/* === LOGIN === */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(145deg, #565941 0%, #484b38 50%, #3d4030 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 30px 80px rgba(0,0,0,.3);
}

.login-logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-deep));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 30px;
    color: #fff;
    box-shadow: 0 10px 30px var(--primary-glow);
}

.portal-wrapper {
    min-height: 100vh;
    background: var(--bg);
}

/* === MOBILE === */
@media (max-width: 991.98px) {
    .admin-shell #sidebar { transform: translateX(-100%); }
    .admin-shell #sidebar.show { transform: translateX(0); }
    .admin-shell #page-content { margin-left: 0; }

    .admin-topbar { padding: 0 16px; height: 64px; min-height: 64px; }
    .topbar-title { font-size: 17px; }
    .content-wrapper { padding: 16px; }

    .admin-page-footer {
        padding: 14px 16px;
        flex-direction: column;
        text-align: center;
    }
    .admin-page-footer-links { justify-content: center; flex-wrap: wrap; }

    .page-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 767.98px) {
    .topbar-title { font-size: 16px; max-width: 180px; }
    .page-header h4 { font-size: 16px; }
    .page-header .btn { width: 100%; justify-content: center; }
}

@media (max-width: 575.98px) {
    .content-wrapper { padding: 12px; }
    .topbar-btn-primary span { display: none; }
    .topbar-btn-primary { width: 40px; padding: 0; }

    .dashboard-actions,
    .quick-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .dashboard-actions .btn,
    .quick-actions .btn { width: 100%; }
}

/* === PRINT === */
@media print {
    .admin-shell #sidebar, #sidebar-overlay, .admin-topbar, .admin-page-footer, .btn, .modal { display: none !important; }
    .admin-shell #page-content { margin-left: 0 !important; }
    .card { box-shadow: none !important; }
}

/* === KURUMSAL HERO — sayfa özel başlık şeritleri === */
.dashboard-hero,
.kul-hero,
.personel-vardiya-hero,
.daire-hero,
.aidat-tanim-hero,
.blok-hero,
.gider-hero,
.detay-hero,
.rapor-hero,
.odeme-hero,
.ob-hero,
.ayar-hero,
.emlak-dash-hero {
    background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 52%, var(--primary-light) 100%) !important;
    box-shadow: 0 16px 34px var(--primary-glow) !important;
}

.admin-hero {
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 52%, var(--primary-light) 100%);
    box-shadow: 0 16px 34px var(--primary-glow);
}

.admin-hero .kpi,
.admin-hero-kpi {
    border-radius: 12px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .26);
    padding: 8px 10px;
}

.admin-hero .kpi small,
.admin-hero-kpi small {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: rgba(255, 255, 255, .82);
}

.admin-hero .kpi .v,
.admin-hero-kpi .v {
    font-size: 21px;
    font-weight: 750;
    line-height: 1.1;
}

.admin-surface {
    border: 1px solid var(--border-strong) !important;
    box-shadow: 0 10px 24px rgba(61, 64, 48, .07) !important;
    border-radius: var(--radius) !important;
}

.admin-avatar-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(86, 89, 65, .18), rgba(72, 75, 56, .28));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--primary);
    font-size: 13px;
    flex-shrink: 0;
    overflow: hidden;
}

.admin-avatar-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-avatar-lg {
    width: 88px;
    height: 88px;
    border-radius: 18px;
    background: linear-gradient(145deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    overflow: hidden;
    box-shadow: 0 8px 22px var(--primary-glow);
}

.admin-avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-modal .modal-body {
    background: linear-gradient(180deg, #fff, var(--surface-2));
}

.admin-modal .form-control:focus,
.admin-modal .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem var(--primary-muted);
}
