:root {
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --brand-color: #2563eb;
    --sidebar-bg: #0f172a;
    --sidebar-text: #cbd5e1;
    --sidebar-active: #1e293b;
}

* {
    box-sizing: border-box;
}

body.admin-body {
    margin: 0;
    background: #f1f5f9;
    color: #0f172a;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    overflow-y: auto;
    transition: transform 0.2s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand i {
    color: #60a5fa;
    font-size: 1.5rem;
}

.sidebar-brand-logo {
    display: block;
    width: auto;
    max-width: 180px;
    max-height: 44px;
    height: auto;
    object-fit: contain;
}

.sidebar-nav {
    padding: 1rem 0.75rem 2rem;
}

.sidebar-section {
    padding: 0.75rem 0.75rem 0.35rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.sidebar-group {
    margin-top: 0.35rem;
}

.sidebar-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    background: transparent;
    border: 0;
    border-radius: 0.5rem;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-group-toggle:hover {
    background: var(--sidebar-active);
    color: #fff;
}

.sidebar-group-caret {
    font-size: 0.9rem;
    transition: transform 0.25s ease;
}

.sidebar-group.open .sidebar-group-caret {
    transform: rotate(180deg);
}

.sidebar-group-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.sidebar-group.open .sidebar-group-body {
    max-height: 800px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.15rem;
    border-radius: 0.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover:not(.disabled) {
    background: var(--sidebar-active);
    color: #fff;
}

.sidebar-link.active {
    background: var(--brand-color);
    color: #fff;
}

.sidebar-link.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.admin-main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.sidebar-toggle {
    color: #334155;
    text-decoration: none;
    padding: 0;
}

.admin-content {
    flex: 1;
    padding: 1.5rem;
}

.admin-footer {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.stat-card .card-body {
    position: relative;
    padding-top: 1.25rem;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
}

.notification-dropdown {
    width: min(360px, 92vw);
    max-height: 420px;
    overflow: hidden;
}

.notification-dropdown-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.notification-list {
    max-height: 340px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s ease;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    background: #eff6ff;
}

.notification-item-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.notification-item-message {
    color: #64748b;
    font-size: 0.825rem;
    margin-top: 0.15rem;
}

.notification-item-time {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-top: 0.35rem;
}

.notification-empty {
    padding: 2rem 1rem;
    text-align: center;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1035;
}

.sidebar-backdrop.show {
    display: block;
}

body.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a1520 0%, #0d1b2a 55%, #0c2a33 100%);
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 440px;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: #e2e8f0;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45) !important;
}

.login-card .text-muted {
    color: rgba(226, 232, 240, 0.6) !important;
}

.login-card .form-label {
    color: rgba(226, 232, 240, 0.85);
    font-weight: 500;
}

.login-card .form-control {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f8fafc;
}

.login-card .form-control::placeholder {
    color: rgba(226, 232, 240, 0.4);
}

.login-card .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #14b8a6;
    box-shadow: 0 0 0 0.2rem rgba(20, 184, 166, 0.25);
    color: #f8fafc;
}

.login-card .form-check-label {
    color: rgba(226, 232, 240, 0.75);
}

.login-card .btn-primary {
    background: #14b8a6;
    border-color: #14b8a6;
}

.login-card .btn-primary:hover,
.login-card .btn-primary:focus {
    background: #0f9c8d;
    border-color: #0f9c8d;
}

.login-logo {
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo img {
    display: block;
    width: auto;
    max-width: 300px;
    max-height: 72px;
    height: auto;
    object-fit: contain;
}

.login-demo {
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.login-demo .fw-semibold {
    color: rgba(226, 232, 240, 0.9);
}

.profile-details dt {
    color: #64748b;
    font-weight: 500;
}

.profile-details dd {
    margin-bottom: 0.75rem;
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
        width: 100%;
    }
}

/* Bootstrap 5.1: text-bg-* sınıfları yok; badge arka planı olmayınca beyaz yazı görünmez */
.badge.text-bg-success { background-color: var(--bs-success); color: #fff; }
.badge.text-bg-secondary { background-color: var(--bs-secondary); color: #fff; }
.badge.text-bg-primary { background-color: var(--bs-primary); color: #fff; }
.badge.text-bg-danger { background-color: var(--bs-danger); color: #fff; }
.badge.text-bg-warning { background-color: var(--bs-warning); color: var(--bs-dark); }
.badge.text-bg-info { background-color: var(--bs-info); color: var(--bs-dark); }
.badge.text-bg-light { background-color: var(--bs-light); color: var(--bs-dark); border: 1px solid var(--bs-border-color, #dee2e6); }
.badge.text-bg-dark { background-color: var(--bs-dark); color: #fff; }

/* Boş validation summary: alert-danger sınıfı kırmızı kutu bırakır, hata yokken gizle */
.validation-summary-valid {
    display: none;
}
