/* =============================================
   BOOKING SYSTEM - ADMIN PANEL CSS
   Premium Dark Theme with Glassmorphism
   ============================================= */

:root {
    /* Color System - Light Professional Theme */
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-sidebar: #1e293b;
    --bg-hover: rgba(99, 102, 241, 0.08);

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --accent-primary: #4f46e5;
    --accent-secondary: #6366f1;
    --accent-glow: rgba(79, 70, 229, 0.2);

    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0891b2;

    --border-color: rgba(148, 163, 184, 0.25);
    --border-radius: 12px;
    --border-radius-sm: 8px;

    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);

    --sidebar-width: 260px;
    --topbar-height: 64px;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-secondary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-primary); }

/* ===== App Layout ===== */
.app-container { display: flex; min-height: 100vh; }

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255,255,255,0.08);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    display: flex; flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
    color: #cbd5e1;
}

.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 18px; font-weight: 700;
    color: #f1f5f9;
}
.logo i { font-size: 24px; color: var(--accent-secondary); }

.sidebar-toggle {
    background: none; border: none; color: #94a3b8;
    cursor: pointer; font-size: 18px; padding: 4px;
}

.sidebar-nav { padding: 12px 8px; flex: 1; }

.nav-section {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: #64748b;
    padding: 16px 12px 6px; margin-top: 4px;
}

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: var(--border-radius-sm);
    color: #94a3b8; font-size: 14px; font-weight: 500;
    transition: var(--transition);
    margin: 2px 0;
}
.nav-item:hover { background: rgba(99, 102, 241, 0.15); color: #e2e8f0; }
.nav-item.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff; box-shadow: 0 4px 15px var(--accent-glow);
}
.nav-item i { width: 20px; text-align: center; font-size: 15px; }

/* ===== Main Content ===== */
.main-content {
    flex: 1; margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex; flex-direction: column;
}

/* ===== Topbar ===== */
.topbar {
    height: var(--topbar-height);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 50;
}

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

.page-title { font-size: 20px; font-weight: 700; color: var(--text-primary); }

.user-menu { display: flex; align-items: center; gap: 10px; }
.user-name { font-weight: 500; font-size: 14px; }
.user-role { font-size: 11px; }

/* ===== Page Content ===== */
.page-content { padding: 24px; flex: 1; }

/* ===== Glass Card ===== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.card { margin-bottom: 20px; }
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}
.card-header h3 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-header h3 i { color: var(--accent-primary); font-size: 14px; }
.card-body { padding: 20px; }

/* ===== Stats Grid ===== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.stats-grid.grid-2 { grid-template-columns: repeat(2, 1fr); }
.stats-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }

.stat-card {
    display: flex; align-items: center; gap: 16px;
    padding: 20px; position: relative; overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute; top: -50%; right: -30px;
    width: 100px; height: 200%; border-radius: 50%;
    opacity: 0.1;
}
.gradient-blue { border-left: 4px solid #3b82f6; }
.gradient-blue .stat-icon { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.gradient-green { border-left: 4px solid var(--success); }
.gradient-green .stat-icon { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.gradient-purple { border-left: 4px solid var(--accent-primary); }
.gradient-purple .stat-icon { background: rgba(99, 102, 241, 0.15); color: var(--accent-primary); }
.gradient-orange { border-left: 4px solid var(--warning); }
.gradient-orange .stat-icon { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

.stat-icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px; font-size: 22px; flex-shrink: 0;
}
.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* ===== Floor Plan Grid ===== */
.floor-plan-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.room-card {
    padding: 14px; border-radius: var(--border-radius-sm);
    border: 2px solid transparent;
    cursor: pointer; transition: var(--transition);
    position: relative; overflow: hidden;
}
.room-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.room-card.status-available { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); }
.room-card.status-occupied { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); }
.room-card.status-cleaning { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.3); }
.room-card.status-maintenance { background: rgba(100, 116, 139, 0.1); border-color: rgba(100, 116, 139, 0.3); }
.room-card.status-inactive { background: rgba(55, 65, 81, 0.2); border-color: rgba(55, 65, 81, 0.3); }

.room-code { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.room-name { font-size: 15px; font-weight: 600; margin: 4px 0; }
.room-status-badge { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.room-guest { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }
.room-time { font-size: 11px; color: var(--warning); }

.status-available .room-status-badge { color: var(--success); }
.status-occupied .room-status-badge { color: var(--danger); }
.status-cleaning .room-status-badge { color: var(--warning); }
.status-maintenance .room-status-badge { color: var(--text-muted); }

/* ===== Room Status Grid ===== */
.room-status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.room-status-item {
    text-align: center; padding: 16px; border-radius: var(--border-radius-sm);
}
.room-status-item .count { display: block; font-size: 28px; font-weight: 700; }
.room-status-item .label { font-size: 12px; color: var(--text-secondary); }
.room-status-item.status-available { background: rgba(16, 185, 129, 0.1); }
.room-status-item.status-available .count { color: var(--success); }
.room-status-item.status-occupied { background: rgba(239, 68, 68, 0.1); }
.room-status-item.status-occupied .count { color: var(--danger); }
.room-status-item.status-cleaning { background: rgba(245, 158, 11, 0.1); }
.room-status-item.status-cleaning .count { color: var(--warning); }
.room-status-item.status-maintenance { background: rgba(100, 116, 139, 0.1); }
.room-status-item.status-maintenance .count { color: var(--text-muted); }

/* ===== Booking List ===== */
.booking-list { display: flex; flex-direction: column; gap: 6px; }
.booking-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; border-radius: var(--border-radius-sm);
    background: rgba(255,255,255,0.02); border: 1px solid var(--border-color);
    transition: var(--transition); gap: 12px;
}
.booking-item:hover { background: var(--bg-hover); border-color: var(--accent-primary); }
.booking-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.booking-info strong { font-size: 13px; font-weight: 600; }
.booking-info span { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booking-time { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* ===== Badges ===== */
.badge {
    display: inline-flex; align-items: center; padding: 3px 10px;
    font-size: 11px; font-weight: 600; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 0.3px;
}
.badge-primary { background: rgba(99, 102, 241, 0.15); color: var(--accent-secondary); }
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-info { background: rgba(6, 182, 212, 0.15); color: var(--info); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 18px; border: none; border-radius: var(--border-radius-sm);
    font-family: var(--font-family); font-size: 14px; font-weight: 500;
    cursor: pointer; transition: var(--transition);
    text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff; box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 6px 20px var(--accent-glow); color: #fff; }

.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }

.btn-outline {
    background: transparent; border: 1px solid var(--border-color); color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent-primary); color: var(--accent-secondary); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 18px; padding: 8px; }

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 500; color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-group label i { font-size: 12px; color: var(--text-muted); }

.form-control {
    width: 100%; padding: 10px 14px;
    background: #ffffff; border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm); color: var(--text-primary);
    font-family: var(--font-family); font-size: 14px;
    transition: var(--transition);
}
.form-control:focus {
    outline: none; border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text-muted); }

select.form-control { appearance: none; cursor: pointer; }

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

.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ===== Tables ===== */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
    padding: 12px 16px; font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted); text-align: left;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
}
tbody tr { transition: var(--transition); }
tbody tr:hover { background: var(--bg-hover); }
tbody td {
    padding: 12px 16px; font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

/* ===== Pagination ===== */
.pagination { display: flex; align-items: center; gap: 4px; justify-content: center; margin-top: 20px; }
.pagination a, .pagination span {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--border-radius-sm);
    font-size: 14px; font-weight: 500;
    transition: var(--transition);
}
.pagination a { background: rgba(255,255,255,0.05); color: var(--text-secondary); }
.pagination a:hover { background: var(--bg-hover); color: var(--accent-secondary); }
.pagination .active { background: var(--accent-primary); color: #fff; }

/* ===== Alerts ===== */
.alert {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px; margin: 0 24px; border-radius: var(--border-radius-sm);
    font-size: 14px; animation: slideDown 0.3s ease;
}
.alert-success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: var(--success); }
.alert-error { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--danger); }
.alert-warning { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); color: var(--warning); }
.alert-info { background: rgba(6, 182, 212, 0.15); border: 1px solid rgba(6, 182, 212, 0.3); color: var(--info); }
.alert-close { background: none; border: none; color: inherit; cursor: pointer; font-size: 18px; }

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

/* ===== Auth Page ===== */
.auth-page {
    display: flex; align-items: center; justify-content: center; min-height: 100vh;
    background: var(--bg-primary);
    background-image: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
}
.auth-container { width: 100%; max-width: 420px; padding: 20px; }
.auth-card { padding: 40px 32px; }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo i { font-size: 48px; color: var(--accent-primary); margin-bottom: 16px; display: block; }
.auth-logo h1 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.auth-logo p { color: var(--text-secondary); font-size: 14px; }
.auth-form .btn-block { padding: 12px; font-size: 15px; font-weight: 600; margin-top: 8px; }

/* ===== Filter Bar ===== */
.filter-bar {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px; flex-wrap: wrap;
}
.filter-bar .form-control { max-width: 200px; }
.filter-bar .search-input { flex: 1; min-width: 200px; }

/* ===== Action Buttons ===== */
.actions { display: flex; gap: 6px; }

/* ===== Utility ===== */
.text-muted { color: var(--text-muted) !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.d-flex { display: flex; }
.gap-2 { gap: 8px; }
.mb-0 { margin-bottom: 0; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid.grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; }
    .filter-bar .form-control, .filter-bar .search-input { max-width: 100%; }
    .d-md-none { display: block; }
}
@media (min-width: 769px) { .d-md-none { display: none; } }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.3); }

/* ===== Animations ===== */
.stat-card, .card, .room-card { animation: fadeInUp 0.5s ease; }
@keyframes fadeInUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* =============================================================
   SETTINGS PAGE � PROFESSIONAL REDESIGN
   ============================================================= */

/* Page header */
.st-page { max-width: 860px; }
.st-page-header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 28px;
}
.st-page-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff; flex-shrink: 0;
    box-shadow: 0 6px 18px var(--accent-glow);
}
.st-page-title { font-size: 22px; font-weight: 800; color: var(--text-primary); margin: 0 0 4px; }
.st-page-sub   { font-size: 13px; color: var(--text-muted); margin: 0; }

/* Setting group */
.st-group {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.st-group-header {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 20px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-color);
}
.st-group-icon {
    width: 34px; height: 34px; border-radius: 8px;
    background: color-mix(in srgb, var(--g-color) 15%, transparent);
    color: var(--g-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.st-group-title {
    font-size: 14px; font-weight: 700;
    color: var(--text-primary); flex: 1;
}
.st-group-count {
    font-size: 11px; font-weight: 600;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px; padding: 2px 10px;
}

/* Setting rows */
.st-settings-list { padding: 4px 0; }
.st-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px; gap: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.2s;
}
.st-row:last-child { border: none; }
.st-row:hover { background: rgba(255,255,255,0.02); }

.st-row-info {
    display: flex; align-items: flex-start; gap: 12px;
    flex: 1; min-width: 0;
}
.st-row-icon {
    width: 32px; height: 32px; border-radius: 7px; flex-shrink: 0; margin-top: 2px;
    background: color-mix(in srgb, var(--g-color) 10%, transparent);
    color: var(--g-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
}
.st-row-text { min-width: 0; }
.st-row-label {
    font-size: 14px; font-weight: 600; color: var(--text-primary);
    margin-bottom: 2px;
}
.st-row-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; margin-bottom: 4px; }
.st-row-key code {
    font-size: 10px; color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px; padding: 1px 5px;
    font-family: 'Courier New', monospace;
}

.st-row-control { flex-shrink: 0; }

/* Input */
.st-input {
    width: 180px; padding: 8px 12px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary); font-size: 13px;
    font-family: var(--font-family);
    transition: var(--transition);
}
.st-input:focus {
    outline: none; border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.st-select { width: 160px; }

/* Toggle switch */
.st-toggle {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.st-toggle-input { display: none; }
.st-toggle-track {
    width: 44px; height: 24px; border-radius: 12px;
    background: rgba(255,255,255,0.1);
    border: 1.5px solid var(--border-color);
    position: relative; transition: all 0.25s;
    flex-shrink: 0;
}
.st-toggle-thumb {
    position: absolute; top: 2px; left: 2px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.25s;
}
.st-toggle-input:checked + .st-toggle-track {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-glow);
}
.st-toggle-input:checked + .st-toggle-track .st-toggle-thumb {
    transform: translateX(20px);
    background: #fff;
}
.st-toggle-text {
    font-size: 13px; font-weight: 600; min-width: 28px;
    color: var(--text-secondary);
}
.st-toggle-input:checked ~ .st-toggle-text { color: var(--accent-secondary); }

/* Save bar */
.st-save-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    position: sticky; bottom: 20px;
    backdrop-filter: blur(16px);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
}
.st-save-info {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text-muted);
}
.st-save-info i { color: var(--info); }
.st-save-btn { padding: 10px 24px; font-size: 14px; font-weight: 700; }

/* -- Sidebar fix: text truncation -- */
.nav-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}
.sidebar { overflow-x: hidden; }

@media (max-width: 768px) {
    .st-row { flex-direction: column; align-items: flex-start; gap: 12px; }
    .st-input { width: 100%; }
    .st-page { max-width: 100%; }
    .st-save-bar { flex-direction: column; gap: 10px; align-items: stretch; }
    .st-save-btn { justify-content: center; }
}


/* =============================================
   POLICIES MODULE - ADMIN STYLES
   ============================================= */

/* Policy list cards */
.policy-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.policy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition);
    display: flex; flex-direction: column;
}
.policy-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--accent-primary);
}

.policy-card-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 12px;
}

.policy-card-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; flex-shrink: 0;
}

.policy-card-title {
    font-size: 16px; font-weight: 600;
    color: var(--text-primary);
}

.policy-card-slug {
    font-size: 12px; color: var(--text-muted);
    margin-top: 2px;
}

.policy-card-preview {
    font-size: 13px; color: var(--text-secondary);
    line-height: 1.6; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
}

.policy-card-actions {
    margin-top: 14px; padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* TinyMCE Wrapper */
.tinymce-wrapper {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.tinymce-wrapper .tox-tinymce {
    border: none !important;
    border-radius: var(--border-radius) !important;
}

.policy-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 20px; }
.policy-admin-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--border-radius); overflow: hidden; transition: all 0.3s ease; }
.policy-admin-card:hover { border-color: rgba(99,102,241,0.3); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.policy-admin-card-header { display: flex; gap: 16px; padding: 20px; border-left: 4px solid var(--accent-primary); background: rgba(99,102,241,0.04); }
.policy-admin-card-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; color: #fff; font-size: 18px; flex-shrink: 0; }
.policy-admin-card-title h3 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.policy-admin-card-title p { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.policy-admin-card-body { padding: 16px 20px; }
.policy-admin-preview { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.policy-admin-card-footer { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--border-color); background: rgba(0,0,0,0.1); }
.policy-admin-key code { font-size: 12px; color: var(--accent-secondary); background: rgba(99,102,241,0.1); padding: 3px 8px; border-radius: 4px; }
.policy-edit-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--border-radius) var(--border-radius) 0 0; margin-bottom: -1px; flex-wrap: wrap; }
.policy-edit-info { display: flex; align-items: center; gap: 10px; }
.policy-edit-info code { font-size: 12px; color: var(--accent-secondary); background: rgba(99,102,241,0.1); padding: 4px 10px; border-radius: 4px; }
.policy-edit-actions { display: flex; gap: 8px; }
.policy-textarea { min-height: 500px; font-family: 'Consolas','Monaco',monospace; font-size: 14px; line-height: 1.6; resize: vertical; background: var(--bg-primary); color: var(--text-primary); border-color: var(--border-color); border-radius: 0 0 var(--border-radius) var(--border-radius); padding: 20px; width: 100%; }
.policy-textarea:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.policy-edit-preview-toggle { margin-top: 12px; }
.policy-edit-preview { margin-top: 12px; }
.policy-edit-preview .policy-article { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 32px; }
.policy-edit-preview .policy-article h2 { font-size: 24px; color: var(--text-primary); }
.policy-edit-preview .policy-article h3 { font-size: 17px; color: var(--accent-secondary); margin-top: 20px; }
.policy-edit-preview .policy-article p { color: var(--text-secondary); line-height: 1.7; }
@media (max-width: 768px) { .policy-admin-grid { grid-template-columns: 1fr; } .policy-edit-toolbar { flex-direction: column; align-items: stretch; } }
