/* ═══════════════════════════════════════════════════
   ÇÖZÜM MERKEZİ - ADMIN DARK THEME STYLESHEET
   ═══════════════════════════════════════════════════ */

:root {
    --bg-dark: #090d16;
    --bg-surface: #111827;
    --bg-surface-hover: #1f2937;
    --border: #374151;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text-1: #f3f4f6;
    --text-2: #9ca3af;
    --text-3: #6b7280;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #10b981;
    
    --font: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --r-sm: 6px;
    --r-md: 10px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.admin-body {
    font-family: var(--font);
    background-color: var(--bg-dark);
    color: var(--text-2);
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

/* ───────────────────────────────────────────────────────
   ADMIN LAYOUT
   ─────────────────────────────────────────────────────── */
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    width: 38px;
    height: 38px;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.sidebar-brand-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-1);
}

.sidebar-brand-badge {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
}

.nav-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 12px;
    padding-left: 12px;
    letter-spacing: 0.5px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: var(--text-2);
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.admin-nav-item:hover {
    color: var(--text-1);
    background-color: var(--bg-surface-hover);
}

.admin-nav-item.active {
    color: var(--text-1);
    background-color: var(--primary);
}

.admin-nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.admin-nav-item.danger:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

/* Main Area */
.admin-main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.admin-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-1);
}

.header-spacer {
    margin-left: auto;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-1);
    font-weight: 500;
}

.admin-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-surface-hover);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
}

.admin-content {
    padding: 32px;
    flex: 1;
}

/* ───────────────────────────────────────────────────────
   UI ELEMENTS & CARDS
   ─────────────────────────────────────────────────────── */
.admin-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 24px;
    box-shadow: var(--shadow);
}

.admin-card h2 {
    font-size: 18px;
    color: var(--text-1);
    margin-bottom: 12px;
}

/* Dashboard Stats Grid */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--r-sm);
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-3);
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 6px;
}

.admin-input {
    width: 100%;
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-1);
    border-radius: var(--r-sm);
    padding: 10px 14px;
    font-family: var(--font);
    font-size: 14px;
    outline: none;
}

.admin-input:focus {
    border-color: var(--primary);
}

textarea.admin-input {
    resize: vertical;
}

/* Buttons */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--r-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-btn-primary {
    background-color: var(--primary);
    color: var(--text-white);
}

.admin-btn-primary:hover {
    background-color: var(--primary-hover);
}

/* Page Toolbar */
.page-toolbar {
    display: flex;
    margin-bottom: 20px;
}

/* Tables */
.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th, .admin-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--text-1);
    font-weight: 600;
}

.admin-table tr:hover {
    background-color: rgba(255, 255, 255, 0.01);
}

.admin-action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-1);
    font-size: 13px;
}

.admin-action-btn.edit {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.admin-action-btn.edit:hover {
    background-color: var(--primary);
    color: #fff;
}

.admin-action-btn.delete {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.admin-action-btn.delete:hover {
    background-color: var(--danger);
    color: #fff;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-2);
}

/* ───────────────────────────────────────────────────────
   LOGIN CARD
   ─────────────────────────────────────────────────────── */
.login-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 40px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 52px;
    height: 52px;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    font-size: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    margin-bottom: 16px;
}

.login-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 4px;
}

.login-header p {
    font-size: 12px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 12px;
    border-radius: var(--r-sm);
    margin-bottom: 20px;
    font-size: 13px;
}

/* Toast System */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-1);
    padding: 14px 20px;
    border-radius: var(--r-sm);
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

/* ───────────────────────────────────────────────────────
   MOBILE RESPONSIVENESS
   ─────────────────────────────────────────────────────── */
.mobile-sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-1);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    margin-right: 16px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 991px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        position: fixed;
        left: -260px;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: var(--shadow);
    }
    
    .admin-sidebar.show {
        left: 0;
    }
    
    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }
    
    .mobile-sidebar-toggle {
        display: block;
    }
}

/* Telefonlar ve Küçük Tabletler İçin Ekstra Optimizasyonlar */
@media (max-width: 768px) {
    .admin-content {
        padding: 16px;
    }
    
    .admin-header {
        padding: 12px 16px;
        height: 60px;
    }
    
    .page-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch !important;
    }
    
    .page-toolbar .admin-btn {
        width: 100%;
        justify-content: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr !important;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .admin-table-wrap {
        overflow-x: auto;
        border: 1px solid var(--border);
        border-radius: var(--r-sm);
        margin-top: 10px;
    }
    
    .admin-table th, .admin-table td {
        padding: 12px 10px;
        white-space: nowrap;
        font-size: 13px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}
