/* ============================================================
   Feniks Priority Hotel - Admin Panel CSS
   ============================================================ */

:root {
    --primary: #0B2545;
    --primary-light: #1a3a6b;
    --primary-dark: #061830;
    --accent: #C9A641;
    --accent-light: #e0be6a;
    --accent-dark: #a8892e;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --text-light: #f8f9fa;
    --text-muted: #8a9bb0;
    --bg-body: #f0f2f5;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --danger: #dc3545;
    --success: #28a745;
    --warning: #ffc107;
    --info: #17a2b8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);
    --radius: 10px;
    --radius-sm: 6px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-body);
    color: #2d3748;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.admin-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    overflow-y: auto;
    overflow-x: hidden;
}

.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

/* Sidebar Logo */
.sidebar-logo {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.sidebar-logo .logo-icon {
    width: 44px;
    height: 44px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(201,166,65,0.4);
}

.sidebar-logo .logo-icon i {
    font-size: 20px;
    color: var(--primary);
}

.sidebar-logo .hotel-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
    display: block;
    line-height: 1.2;
}

.sidebar-logo .admin-label {
    font-size: 10px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-top: 2px;
    display: block;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.nav-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.35);
    font-weight: 600;
    padding: 14px 20px 6px;
    display: block;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
    border-radius: 0;
    position: relative;
    margin: 1px 0;
}

.sidebar-nav a .nav-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    transition: var(--transition);
    flex-shrink: 0;
    font-size: 14px;
}

.sidebar-nav a:hover {
    color: #fff;
    background: rgba(255,255,255,0.07);
}

.sidebar-nav a:hover .nav-icon {
    background: rgba(201,166,65,0.2);
    color: var(--accent);
}

.sidebar-nav a.active {
    color: #fff;
    background: rgba(201,166,65,0.12);
}

.sidebar-nav a.active .nav-icon {
    background: var(--accent);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(201,166,65,0.35);
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 28px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.sidebar-nav a.text-danger-nav {
    color: rgba(255, 100, 100, 0.75);
}
.sidebar-nav a.text-danger-nav:hover {
    color: #ff6464;
    background: rgba(220,53,69,0.1);
}
.sidebar-nav a.text-danger-nav:hover .nav-icon {
    background: rgba(220,53,69,0.2);
    color: #ff6464;
}

/* Badge */
.sidebar-nav .nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    line-height: 1.6;
    min-width: 20px;
    text-align: center;
}

.sidebar-nav .nav-text { flex: 1; }

/* Sidebar footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-footer .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--primary);
    flex-shrink: 0;
}

.sidebar-footer .user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    display: block;
    line-height: 1.2;
}

.sidebar-footer .user-role {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    text-transform: capitalize;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.admin-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

/* ============================================================
   TOPBAR
   ============================================================ */

.admin-topbar {
    height: var(--topbar-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition);
}

.sidebar-toggle:hover { background: var(--bg-body); }

.breadcrumb {
    margin: 0;
    padding: 0;
    font-size: 13px;
    background: transparent;
}

.breadcrumb-item { color: var(--text-muted); }
.breadcrumb-item.active { color: var(--primary); font-weight: 600; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--border-color); }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-action {
    width: 38px;
    height: 38px;
    background: var(--bg-body);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 16px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    position: relative;
    text-decoration: none;
}

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

.topbar-action .badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid #fff;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
    color: var(--primary);
    border: none;
    background: transparent;
}

.topbar-user:hover { background: var(--bg-body); }

.topbar-user .t-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: var(--accent);
}

.topbar-user .t-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.topbar-user .t-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ============================================================
   PAGE CONTENT
   ============================================================ */

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

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i {
    font-size: 20px;
    color: var(--accent);
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin: 2px 0 0;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.card-header-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.card-header-title i { color: var(--accent); }

.card-body { padding: 20px; }

/* ============================================================
   STAT CARDS
   ============================================================ */

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
}

.stat-card.stat-primary::before { background: var(--primary); }
.stat-card.stat-success::before { background: var(--success); }
.stat-card.stat-warning::before { background: var(--warning); }
.stat-card.stat-danger::before { background: var(--danger); }
.stat-card.stat-info::before { background: var(--info); }
.stat-card.stat-accent::before { background: var(--accent); }

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon.bg-primary-soft { background: rgba(11,37,69,0.08); color: var(--primary); }
.stat-icon.bg-success-soft { background: rgba(40,167,69,0.1); color: var(--success); }
.stat-icon.bg-warning-soft { background: rgba(255,193,7,0.12); color: #e6a800; }
.stat-icon.bg-danger-soft { background: rgba(220,53,69,0.1); color: var(--danger); }
.stat-icon.bg-info-soft { background: rgba(23,162,184,0.1); color: var(--info); }
.stat-icon.bg-accent-soft { background: rgba(201,166,65,0.12); color: var(--accent-dark); }

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

.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
    display: block;
}

.stat-label {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    margin-top: 6px;
}

.stat-trend.up { background: rgba(40,167,69,0.1); color: var(--success); }
.stat-trend.down { background: rgba(220,53,69,0.1); color: var(--danger); }

/* ============================================================
   TABLES
   ============================================================ */

.table-wrapper {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.table {
    margin: 0;
    font-size: 13.5px;
}

.table thead th {
    background: #f7f8fc;
    border-bottom: 2px solid var(--border-color);
    color: var(--primary);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    color: #374151;
}

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

.table tbody tr:hover { background: #f7f9fc; }

.table-img {
    width: 52px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

/* ============================================================
   BADGES
   ============================================================ */

.badge {
    font-size: 11.5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.badge-pending { background: #fff3cd; color: #856404; }
.badge-confirmed { background: #d1e7dd; color: #0f5132; }
.badge-cancelled { background: #f8d7da; color: #842029; }
.badge-checked_in { background: #cfe2ff; color: #084298; }
.badge-checked_out { background: #e2e3e5; color: #41464b; }
.badge-active { background: #d1e7dd; color: #0f5132; }
.badge-inactive { background: #f8d7da; color: #842029; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    font-weight: 500;
    font-size: 13.5px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-light); border-color: var(--primary-light); }

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--primary);
    font-weight: 600;
}
.btn-accent:hover { background: var(--accent-light); border-color: var(--accent-light); color: var(--primary); }

.btn-sm { font-size: 12px; padding: 5px 11px; }
.btn-xs { font-size: 11px; padding: 3px 9px; }

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* ============================================================
   FORMS
   ============================================================ */

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.form-control,
.form-select {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    color: #374151;
    padding: 9px 14px;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201,166,65,0.15);
    outline: none;
}

textarea.form-control { min-height: 100px; resize: vertical; }

.input-group-text {
    background: #f7f8fc;
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
    font-size: 14px;
}

/* File upload area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 36px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #fafbfc;
    position: relative;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--accent);
    background: rgba(201,166,65,0.04);
}

.upload-area i {
    font-size: 36px;
    color: var(--border-color);
    margin-bottom: 10px;
    display: block;
}

.upload-area .upload-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.upload-area .upload-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* Image preview grid */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.image-preview-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border-color);
    aspect-ratio: 4/3;
    background: var(--bg-body);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-preview-item .img-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(220,53,69,0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: var(--transition);
}

.image-preview-item .img-remove:hover { background: var(--danger); }

.image-preview-item .img-main-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: var(--accent);
    color: var(--primary);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Feature checkboxes */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}

.feature-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    background: #fafbfc;
}

.feature-check:hover { border-color: var(--accent); background: rgba(201,166,65,0.04); }
.feature-check input[type="checkbox"] { display: none; }
.feature-check.checked { border-color: var(--accent); background: rgba(201,166,65,0.08); }
.feature-check .check-icon { width: 18px; height: 18px; border: 2px solid var(--border-color); border-radius: 4px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 10px; transition: var(--transition); }
.feature-check.checked .check-icon { background: var(--accent); border-color: var(--accent); color: var(--primary); }
.feature-check .check-text { font-size: 13px; color: #374151; font-weight: 500; }

/* Tabs */
.admin-tabs .nav-tabs { border-bottom: 2px solid var(--border-color); margin-bottom: 20px; }
.admin-tabs .nav-link { color: var(--text-muted); font-weight: 500; font-size: 13.5px; border: none; border-bottom: 3px solid transparent; padding: 10px 18px; border-radius: 0; transition: var(--transition); display: flex; align-items: center; gap: 7px; }
.admin-tabs .nav-link:hover { color: var(--primary); border-bottom-color: rgba(201,166,65,0.4); }
.admin-tabs .nav-link.active { color: var(--primary); border-bottom-color: var(--accent); font-weight: 600; background: transparent; }
.admin-tabs .nav-link .flag { font-size: 16px; }

/* ============================================================
   ALERTS / FLASH
   ============================================================ */

.alert {
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    border: none;
    border-left: 4px solid;
    padding: 13px 16px;
}

.alert-success { background: #f0fdf4; border-left-color: var(--success); color: #166534; }
.alert-danger { background: #fff5f5; border-left-color: var(--danger); color: #991b1b; }
.alert-warning { background: #fffbeb; border-left-color: var(--warning); color: #92400e; }
.alert-info { background: #f0f9ff; border-left-color: var(--info); color: #1e40af; }

/* ============================================================
   DRAG & DROP SORT
   ============================================================ */

.sortable-row { cursor: grab; }
.sortable-row:active { cursor: grabbing; }
.sortable-row.dragging { opacity: 0.5; background: rgba(201,166,65,0.08) !important; }
.drag-handle { color: var(--text-muted); cursor: grab; font-size: 16px; padding: 0 4px; }
.drag-handle:hover { color: var(--accent); }

/* ============================================================
   TOGGLE SWITCH
   ============================================================ */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #cbd5e0;
    transition: var(--transition);
    border-radius: 22px;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: white;
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ============================================================
   MODALS
   ============================================================ */

.modal-header {
    background: var(--primary);
    color: #fff;
    padding: 16px 20px;
}

.modal-header .modal-title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.modal-header .btn-close { filter: invert(1); opacity: 0.8; }
.modal-header .btn-close:hover { opacity: 1; }

.modal-content { border-radius: var(--radius); border: none; box-shadow: var(--shadow-lg); overflow: hidden; }

/* ============================================================
   CHARTS
   ============================================================ */

.chart-wrapper {
    position: relative;
    padding: 10px 0;
}

/* ============================================================
   SIDEBAR OVERLAY (mobile)
   ============================================================ */

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

/* ============================================================
   UTILITIES
   ============================================================ */

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

.border-accent { border-color: var(--accent) !important; }

.rounded-custom { border-radius: var(--radius) !important; }

.shadow-custom { box-shadow: var(--shadow-md) !important; }

/* Section divider */
.section-divider {
    border: none;
    border-top: 1px dashed var(--border-color);
    margin: 20px 0;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 14px;
    opacity: 0.3;
    display: block;
}

.empty-state h5 { color: #9ca3af; font-size: 16px; font-weight: 600; }
.empty-state p { font-size: 13.5px; }

/* Login page */
.admin-login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #1c4a8a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo .logo-circle {
    width: 68px;
    height: 68px;
    background: var(--accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 8px 24px rgba(201,166,65,0.4);
}

.login-logo .logo-circle i { font-size: 28px; color: var(--primary); }
.login-logo h2 { font-size: 22px; font-weight: 800; color: var(--primary); margin: 0 0 4px; }
.login-logo p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* Page footer */
.admin-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 14px 28px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

/* Permission badges */
.perm-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin: 2px;
}

.perm-badge.granted { background: #d1e7dd; color: #0f5132; }
.perm-badge.denied { background: #f8d7da; color: #842029; }

/* DataTables custom */
.dataTables_wrapper .dataTables_filter input {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 13px;
}

.dataTables_wrapper .dataTables_length select {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    font-size: 13px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary);
    border-color: var(--primary);
    color: white !important;
    border-radius: var(--radius-sm);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: white !important;
}

/* Settings tabs vertical */
.settings-nav .nav-link {
    text-align: left;
    color: var(--text-muted);
    border: none;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: var(--transition);
}

.settings-nav .nav-link:hover { background: var(--bg-body); color: var(--primary); }
.settings-nav .nav-link.active { background: var(--primary); color: #fff; }
.settings-nav .nav-link.active i { color: var(--accent); }

/* Slider preview */
.slider-preview-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--bg-body);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
    transition: var(--transition);
}

.slider-preview-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }

.slider-preview-item img {
    width: 90px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
    .admin-sidebar {
        left: calc(-1 * var(--sidebar-width));
    }

    .admin-sidebar.open {
        left: 0;
    }

    .sidebar-overlay.visible {
        display: block;
    }

    .admin-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: flex;
    }

    .admin-content {
        padding: 18px;
    }
}

@media (max-width: 768px) {
    .admin-content { padding: 14px; }

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

    .stat-number { font-size: 22px; }

    .topbar-user .t-name, .topbar-user .t-role { display: none; }

    .admin-footer { flex-direction: column; gap: 4px; text-align: center; }

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

@media (max-width: 480px) {
    .admin-topbar { padding: 0 14px; }
    .admin-content { padding: 12px; }
    .stat-card { padding: 14px; }
    .stat-icon { width: 44px; height: 44px; font-size: 18px; }
}

/* ============================================================
   MOBİL FOUNDATION & UX BİLEŞENLERİ
   ============================================================ */

/* Body scroll lock when mobile sidebar açık */
body.sidebar-open { overflow: hidden; }

/* Sidebar overlay */
.sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(11,37,69,0.55);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0; visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}
.sidebar-overlay.visible { opacity: 1; visibility: visible; }

/* Sidebar drawer transition */
.admin-sidebar { transition: transform .25s cubic-bezier(.4,0,.2,1); }

/* Touch target minimum (mobil) */
@media (max-width: 1024px) {
    .btn-icon, .topbar-action, .sidebar-link, .btn-group-sm > .btn,
    .admin-table .btn-sm, .pagination .page-link {
        min-height: 40px; min-width: 40px;
        display: inline-flex; align-items: center; justify-content: center;
    }
    .form-control, .form-select { font-size: 16px; min-height: 42px; }
    #sidebarToggle { width: 44px; height: 44px; padding: 10px; }
}

/* ============================================================
   TABLO MOBİL KART GÖRÜNÜMÜ
   ============================================================ */
@media (max-width: 768px) {
    .table-mobile-cards thead { display: none; }
    .table-mobile-cards, .table-mobile-cards tbody { display: block; }
    .table-mobile-cards tbody tr {
        display: block;
        background: #fff;
        border: 1px solid var(--border-color);
        border-radius: var(--radius);
        padding: 14px;
        margin-bottom: 12px;
        box-shadow: var(--shadow-sm);
    }
    .table-mobile-cards tbody tr:hover { background: #fff; }
    .table-mobile-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 7px 0;
        border: none !important;
        text-align: right;
        white-space: normal;
    }
    .table-mobile-cards tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: .4px;
        flex-shrink: 0;
        text-align: left;
    }
    .table-mobile-cards tbody td[data-label="İşlem"],
    .table-mobile-cards tbody td.actions-cell {
        justify-content: flex-end;
    }
    .table-mobile-cards tbody td:first-child {
        font-size: 15px;
        font-weight: 700;
        color: var(--primary);
        padding-bottom: 10px;
        border-bottom: 1px dashed var(--border-color) !important;
        margin-bottom: 6px;
    }
    .table-mobile-cards tbody td:first-child::before { display: none; }
    .table-responsive { border: none; }
}

/* ============================================================
   FAB - FLOATING ACTION BUTTON (Sadece mobilde)
   ============================================================ */
.fab {
    display: none;
    position: fixed;
    bottom: 78px; right: 18px;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--primary);
    border: none;
    box-shadow: 0 6px 20px rgba(201,166,65,0.45);
    font-size: 22px;
    align-items: center;
    justify-content: center;
    z-index: 800;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    text-decoration: none;
}
.fab:hover, .fab:focus {
    transform: scale(1.07);
    box-shadow: 0 10px 26px rgba(201,166,65,0.55);
    color: var(--primary);
}
.fab__label {
    position: absolute;
    right: 64px;
    background: var(--primary);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
}
@media (max-width: 768px) {
    .fab { display: inline-flex; }
}

/* ============================================================
   MOBILE BOTTOM NAVIGATION
   ============================================================ */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: #fff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
    z-index: 700;
    justify-content: space-around;
    align-items: stretch;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10.5px;
    font-weight: 600;
    transition: color .15s ease;
    border-top: 2px solid transparent;
}
.mobile-bottom-nav__item i { font-size: 18px; }
.mobile-bottom-nav__item:hover { color: var(--primary); }
.mobile-bottom-nav__item.is-active {
    color: var(--accent);
    border-top-color: var(--accent);
    background: rgba(201,166,65,0.06);
}
@media (max-width: 768px) {
    .mobile-bottom-nav { display: flex; }
    body { padding-bottom: 60px; }
    .fab { bottom: 78px; }
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast-container {
    position: fixed;
    top: 84px; right: 20px;
    display: flex; flex-direction: column; gap: 10px;
    z-index: 9999;
    max-width: 360px;
}
.toast-msg {
    display: flex; align-items: center; gap: 12px;
    background: #fff;
    border-left: 4px solid var(--info);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    font-size: 13.5px;
    color: #2d3748;
    transform: translateX(120%);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
    min-width: 260px;
}
.toast-msg.is-visible { transform: translateX(0); opacity: 1; }
.toast-msg i { font-size: 18px; flex-shrink: 0; color: var(--info); }
.toast-msg__text { flex: 1; line-height: 1.45; }
.toast-msg__close {
    background: none; border: none; color: #9ca3af;
    cursor: pointer; font-size: 18px; padding: 0; line-height: 1;
}
.toast-success { border-left-color: var(--success); }
.toast-success i { color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-error i { color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-warning i { color: var(--warning); }
@media (max-width: 768px) {
    .toast-container { top: auto; bottom: 80px; left: 12px; right: 12px; max-width: none; }
    .toast-msg { min-width: 0; transform: translateY(120%); }
    .toast-msg.is-visible { transform: translateY(0); }
}

/* ============================================================
   FILTER COLLAPSIBLE BAR
   ============================================================ */
details.filter-bar {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
}
details.filter-bar > summary {
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
    display: flex; align-items: center; gap: 10px;
    font-weight: 600;
    color: var(--primary);
    user-select: none;
}
details.filter-bar > summary::-webkit-details-marker { display: none; }
details.filter-bar > summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
    transition: transform .2s ease;
}
details.filter-bar[open] > summary::after { transform: rotate(180deg); }
details.filter-bar > .filter-bar__body { padding: 0 18px 18px; }
.filter-bar__badge {
    background: var(--accent);
    color: var(--primary);
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
}

/* Sticky page-header (mobil) */
@media (max-width: 768px) {
    .page-header.sticky-mobile {
        position: sticky;
        top: 56px;
        z-index: 50;
        background: var(--bg-body);
        margin: -12px -12px 16px;
        padding: 12px;
        border-bottom: 1px solid var(--border-color);
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}
.empty-state__icon {
    font-size: 56px;
    color: var(--border-color);
    margin-bottom: 16px;
}
.empty-state__title { font-size: 17px; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.empty-state__desc { font-size: 13.5px; margin-bottom: 18px; }

/* Modal mobile sizing */
@media (max-width: 768px) {
    .modal-dialog {
        max-width: calc(100vw - 16px);
        margin: 10px auto;
    }
    .modal-content { max-height: calc(100vh - 20px); overflow: hidden; }
    .modal-body { max-height: calc(100vh - 200px); overflow-y: auto; }
}

/* Tablet narrow sidebar (1024-768) */
@media (min-width: 769px) and (max-width: 1024px) {
    .admin-sidebar:not(.open) { transform: translateX(0); width: 70px; }
    .admin-sidebar:not(.open) .sidebar-link .label,
    .admin-sidebar:not(.open) .sidebar-section,
    .admin-sidebar:not(.open) .sidebar-brand,
    .admin-sidebar:not(.open) .sidebar-user-info { display: none; }
    .admin-sidebar:not(.open) .sidebar-link { justify-content: center; }
    .admin-main { margin-left: 70px; }
}

/* a11y focus */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
