/* ─── Digital BnB Admin Panel CSS ─────────────────────────────── */
/* Sidebar layout · Inter font · Clean modern · Brand accent       */

:root {
    --cyan:    #00d4ff;
    --purple:  #7c3aed;
    --blue:    #2563eb;
    --grad:    linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);

    --sidebar-w:   240px;
    --sidebar-bg:  #0f0f14;
    --sidebar-border: rgba(255,255,255,.06);

    --text:    #1d1d1f;
    --text-2:  #6e6e73;
    --text-3:  #aeaeb2;
    --bg:      #e8e8ed;
    --card-bg: #ffffff;
    --border:  #d8d8de;

    --radius:  12px;
    --radius-sm: 8px;
    --shadow:  0 2px 16px rgba(0,0,0,.06);
    --transition: 0.2s ease;
}

/* ─── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.admin-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ─── SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid var(--sidebar-border);
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 18px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}
.sidebar-logo img {
    height: 28px;
    width: auto;
    filter: brightness(0) invert(1);
}
.sidebar-logo-text   { font-size: 0.88rem; font-weight: 700; color: #fff; line-height: 1.2; }
.sidebar-logo-sub    { font-size: 0.68rem; color: rgba(255,255,255,.35); font-weight: 400; }
.sidebar-nav         { flex: 1; padding: 10px 0; }
.sidebar-section {
    padding: 12px 16px 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.22);
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    margin: 1px 8px;
    border-radius: 8px;
    color: rgba(255,255,255,.5);
    font-size: 0.83rem;
    font-weight: 500;
    transition: var(--transition);
}
.sidebar-link:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.85); }
.sidebar-link.active {
    background: linear-gradient(135deg, rgba(0,212,255,.15), rgba(124,58,237,.2));
    color: #fff;
    border: 1px solid rgba(124,58,237,.25);
}
.sidebar-icon { font-size: 0.95rem; width: 18px; text-align: center; flex-shrink: 0; }
ion-icon { font-size: inherit; }
.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}
.sidebar-user { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; }
.sidebar-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; color: #fff; font-weight: 700; flex-shrink: 0;
}
.sidebar-username { font-size: 0.8rem; font-weight: 600; color: rgba(255,255,255,.75); }
.sidebar-role     { font-size: 0.68rem; color: rgba(255,255,255,.3); }
.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    width: 100%;
    background: rgba(255,255,255,.05);
    border-radius: 8px;
    color: rgba(255,255,255,.45);
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
    text-align: left;
}
.sidebar-logout:hover { background: rgba(239,68,68,.15); color: #f87171; }

/* ─── MAIN CONTENT ───────────────────────────────────────────── */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.admin-topbar {
    height: 52px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-title { font-size: 0.92rem; font-weight: 700; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-preview {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-2);
    transition: var(--transition);
}
.topbar-preview:hover { border-color: var(--purple); color: var(--purple); }
.admin-content { padding: 24px; flex: 1; }

/* ─── CARDS ──────────────────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.card-title { font-size: 0.93rem; font-weight: 700; }
.card-sub   { font-size: 0.78rem; color: var(--text-2); margin-top: 2px; }

/* ─── STATS ──────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}
.stat-card-icon  { font-size: 1.3rem; margin-bottom: 10px; }
.stat-card-num   {
    font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em;
    background: var(--grad);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-card-label { font-size: 0.75rem; color: var(--text-2); font-weight: 500; margin-top: 3px; }

/* ─── QUICK ACTIONS ──────────────────────────────────────────── */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}
.quick-btn {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 18px 12px;
    background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
    cursor: pointer; transition: var(--transition); text-align: center; box-shadow: var(--shadow);
}
.quick-btn:hover { border-color: var(--purple); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(124,58,237,.1); }
.qb-icon  { font-size: 1.4rem; }
.qb-label { font-size: 0.78rem; font-weight: 600; color: var(--text); }

/* ─── FORMS ──────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block; font-size: 0.75rem; font-weight: 700;
    color: var(--text-2); margin-bottom: 5px;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%; padding: 8px 11px;
    background: var(--bg); border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-family: inherit; font-size: 0.86rem;
    color: var(--text); transition: border-color var(--transition); outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--purple); background: #fff;
}
.form-group textarea { resize: vertical; min-height: 76px; }
.form-group.full { grid-column: 1 / -1; }
.section-divider {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-3); margin: 24px 0 12px;
    padding-bottom: 7px; border-bottom: 1px solid var(--border);
}

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn-save {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 20px; background: var(--grad); color: #fff;
    font-size: 0.84rem; font-weight: 700; border-radius: 99px;
    transition: var(--transition); box-shadow: 0 2px 10px rgba(124,58,237,.25);
}
.btn-save:hover { box-shadow: 0 4px 16px rgba(124,58,237,.4); transform: translateY(-1px); }
.btn-add {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; background: var(--grad); color: #fff;
    font-size: 0.8rem; font-weight: 700; border-radius: 99px;
    transition: var(--transition);
}
.btn-add:hover { transform: translateY(-1px); }
.btn-cancel {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 20px; background: var(--bg); border: 1.5px solid var(--border);
    color: var(--text-2); font-size: 0.84rem; font-weight: 600; border-radius: 99px;
    transition: var(--transition);
}
.btn-cancel:hover { border-color: var(--purple); color: var(--purple); }
.btn-icon {
    width: 28px; height: 28px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.82rem; transition: var(--transition); cursor: pointer; border: none;
}
.btn-edit   { background: rgba(37,99,235,.1);  color: var(--blue);  }
.btn-delete { background: rgba(239,68,68,.1);  color: #ef4444;      }
.btn-edit:hover   { background: rgba(37,99,235,.18);  }
.btn-delete:hover { background: rgba(239,68,68,.18);  }

/* ─── TABLE ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead th {
    padding: 9px 13px; text-align: left; font-size: 0.72rem; font-weight: 700;
    color: var(--text-2); background: var(--bg); border-bottom: 1px solid var(--border);
    text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
}
tbody td {
    padding: 11px 13px; font-size: 0.84rem; border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }
.table-thumb { width: 52px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--bg); }
.table-actions { display: flex; gap: 5px; align-items: center; }

/* ─── BADGES ─────────────────────────────────────────────────── */
.badge         { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 0.7rem; font-weight: 700; background: rgba(124,58,237,.1); color: var(--purple); }
.badge-green   { background: rgba(16,185,129,.1); color: #059669; }
.badge-red     { background: rgba(239,68,68,.1);  color: #ef4444; }
.badge-blue    { background: rgba(37,99,235,.1);  color: var(--blue); }
.badge-yellow  { background: rgba(245,158,11,.1); color: #b45309; }
.status-active   { padding: 2px 9px; border-radius: 99px; font-size: 0.7rem; font-weight: 700; background: rgba(16,185,129,.1);  color: #059669; }
.status-inactive { padding: 2px 9px; border-radius: 99px; font-size: 0.7rem; font-weight: 700; background: rgba(239,68,68,.1);   color: #ef4444; }

/* ─── MODAL ──────────────────────────────────────────────────── */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.4); backdrop-filter: blur(4px);
    z-index: 500; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--card-bg); border-radius: var(--radius);
    width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,.2);
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px 14px; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: var(--card-bg); z-index: 1;
}
.modal-title { font-size: 0.93rem; font-weight: 700; }
.modal-close {
    width: 26px; height: 26px; border-radius: 6px; background: var(--bg);
    border: 1px solid var(--border); display: flex; align-items: center;
    justify-content: center; font-size: 0.9rem; color: var(--text-2);
    cursor: pointer; line-height: 1; transition: var(--transition);
}
.modal-close:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }
.modal-body   { padding: 18px 22px; }
.modal-footer {
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 14px 22px; border-top: 1px solid var(--border);
    background: var(--card-bg); position: sticky; bottom: 0;
}

/* ─── NOTIFICATION ───────────────────────────────────────────── */
#notification {
    position: fixed; top: 18px; right: 18px; z-index: 999;
    padding: 10px 18px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 700;
    box-shadow: 0 8px 28px rgba(0,0,0,.12);
    opacity: 0; transform: translateY(-8px); transition: opacity 0.3s, transform 0.3s; pointer-events: none;
}
#notification.show    { opacity: 1; transform: translateY(0); }
#notification.success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
#notification.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* image uploader */
.img-preview-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.img-preview { width: 90px; height: 62px; border-radius: 7px; object-fit: cover; border: 2px solid var(--border); display: none; }
.img-pick-btn {
    padding: 6px 14px; background: var(--bg); border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 600;
    color: var(--text-2); cursor: pointer; transition: var(--transition);
}
.img-pick-btn:hover { border-color: var(--purple); color: var(--purple); }
.img-hint { font-size: 0.7rem; color: var(--text-3); margin-top: 3px; }

/* ─── LOGIN PAGE ─────────────────────────────────────────────── */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-box {
    width: 100%; max-width: 380px; background: var(--card-bg);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 36px 32px; box-shadow: var(--shadow);
}
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.login-logo img { height: 34px; }
.login-logo span { font-weight: 700; font-size: 1.1rem; }
.login-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 5px; }
.login-sub   { font-size: 0.83rem; color: var(--text-2); margin-bottom: 22px; }
.login-error { background: #fee2e2; color: #991b1b; border-radius: 8px; padding: 9px 13px; font-size: 0.83rem; font-weight: 600; margin-bottom: 14px; }
.login-btn {
    width: 100%; padding: 10px;
    background: var(--grad); color: #fff; font-weight: 700; font-size: 0.9rem;
    border-radius: 99px; transition: var(--transition); box-shadow: 0 4px 14px rgba(124,58,237,.3);
}
.login-btn:hover { box-shadow: 0 6px 22px rgba(124,58,237,.42); transform: translateY(-1px); }

/* ─── FAQ list ───────────────────────────────────────────────── */
.faq-list-item {
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px;
}
.faq-list-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.faq-list-q   { font-size: 0.88rem; font-weight: 700; margin-bottom: 4px; }
.faq-list-a   { font-size: 0.82rem; color: var(--text-2); line-height: 1.55; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid  { grid-template-columns: 1fr; }
    .sidebar { transform: translateX(-100%); transition: transform 0.28s; }
    .sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .admin-topbar { padding: 0 16px; }
    .admin-content { padding: 14px; }
}
@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
