/* ================================================================
   SKIPPER – Admin Panel CSS
   ================================================================ */

:root {
    --admin-bg:       #0f1117;
    --admin-sidebar:  #161b27;
    --admin-card:     #1c2235;
    --admin-border:   rgba(255,255,255,0.07);
    --admin-text:     #d0d7e8;
    --admin-muted:    #6b7898;
    --gold:           #c9a84c;
    --teal:           #2a9d8f;
    --danger:         #e53e3e;
    --success:        #38a169;
    --warning:        #d69e2e;
    --radius:         10px;
    --font:           'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }

body.admin-body {
    font-family: var(--font);
    background: var(--admin-bg);
    color: var(--admin-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Login ── */
.admin-body--login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a1628 0%, #112240 100%);
}

.login-wrap { width: 100%; max-width: 420px; padding: 1rem; }
.login-box {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    padding: 2.5rem;
}
.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    text-align: center;
}
.login-logo h1 { font-size: 1.25rem; color: white; }
.login-form .form-group { margin-bottom: 1.25rem; }

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

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

.admin-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    border-bottom: 1px solid var(--admin-border);
}

.admin-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0.75rem;
    flex: 1;
    gap: 0.2rem;
}

.admin-nav__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius);
    color: var(--admin-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}
.admin-nav__item:hover { background: rgba(255,255,255,0.05); color: var(--admin-text); }
.admin-nav__item.active { background: rgba(201,168,76,0.12); color: var(--gold); }

.admin-sidebar__footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--admin-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--admin-muted);
}
.admin-logout { color: var(--danger); text-decoration: none; font-weight: 500; }
.admin-logout:hover { text-decoration: underline; }

/* ── Main ── */
.admin-main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-header {
    background: var(--admin-sidebar);
    border-bottom: 1px solid var(--admin-border);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
}
.admin-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--admin-text);
    border-radius: 2px;
}

.admin-content { padding: 2rem; flex: 1; }

/* ── Page Header ── */
.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
}
.admin-page-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

/* ── Card ── */
.admin-card {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.admin-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--admin-border);
}
.admin-card__header h3 { font-size: 1rem; font-weight: 600; color: white; }

/* ── Stats ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 0;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--admin-border);
}
.stat-card--orange { background: rgba(236,153,75,0.08); border-color: rgba(236,153,75,0.2); }
.stat-card--yellow { background: rgba(201,168,76,0.08); border-color: rgba(201,168,76,0.2); }
.stat-card--teal   { background: rgba(42,157,143,0.08); border-color: rgba(42,157,143,0.2); }

.stat-card__icon { color: var(--gold); }
.stat-card--teal .stat-card__icon { color: var(--teal); }

.stat-card__num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}
.stat-card__label { font-size: 0.82rem; color: var(--admin-muted); }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.admin-table th {
    text-align: left;
    padding: 0.85rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--admin-muted);
    border-bottom: 1px solid var(--admin-border);
    white-space: nowrap;
}
.admin-table td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--admin-border);
    vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.table-note td { color: var(--admin-muted); font-size: 0.82rem; background: rgba(255,255,255,0.01); }
.table-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.text-center { text-align: center; }
.text-muted { color: var(--admin-muted); }

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge--new       { background: rgba(214,158,46,0.15); color: #ecc94b; }
.badge--confirmed { background: rgba(56,161,105,0.15); color: #68d391; }
.badge--cancelled { background: rgba(229,62,62,0.15);  color: #fc8181; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: var(--font);
    white-space: nowrap;
}
.btn--gold     { background: var(--gold); color: #0a1628; border-color: var(--gold); }
.btn--gold:hover { background: #e0bc6e; }
.btn--outline  { background: transparent; color: var(--admin-text); border-color: var(--admin-border); }
.btn--outline:hover { border-color: var(--admin-text); }
.btn--teal     { background: rgba(42,157,143,0.15); color: #3bb8aa; border-color: rgba(42,157,143,0.3); }
.btn--teal:hover { background: rgba(42,157,143,0.25); }
.btn--danger   { background: rgba(229,62,62,0.12); color: #fc8181; border-color: rgba(229,62,62,0.25); }
.btn--danger:hover { background: rgba(229,62,62,0.25); }
.btn--sm       { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn--block    { width: 100%; justify-content: center; }
.btn--icon     { width: 28px; height: 28px; padding: 0; justify-content: center; }

/* ── Forms ── */
.admin-form { display: flex; flex-direction: column; }
.admin-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1rem;
}
.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--admin-muted);
}
.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    color: var(--admin-text);
    font-size: 0.875rem;
    font-family: var(--font);
    transition: border-color 0.2s;
    width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--teal);
}
.form-group select option { background: var(--admin-card); }
.form-group--checkbox { justify-content: flex-end; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.875rem; color: var(--admin-text); }
.form-group--action { justify-content: flex-end; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 0.5rem; }
.image-preview { margin-bottom: 0.75rem; }
small.text-muted { font-size: 0.78rem; color: var(--admin-muted); margin-top: 0.25rem; }

/* ── Custom file input ── */
.file-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.file-input-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--admin-border);
    color: var(--admin-text);
    padding: 0.45rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font);
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}
.file-input-btn:hover { border-color: var(--gold); color: var(--gold); }
.file-input-name {
    font-size: 0.82rem;
    color: var(--admin-muted);
    word-break: break-all;
}

/* ── Gallery grid ── */
.admin-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
}
.admin-gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--admin-border);
    aspect-ratio: 4/3;
}
.admin-gallery-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-gallery-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.6);
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
}
.admin-gallery-delete {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
}

/* ── Alerts ── */
.alert {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}
.alert--success { background: rgba(56,161,105,0.12); border: 1px solid rgba(56,161,105,0.3); color: #68d391; }
.alert--error   { background: rgba(229,62,62,0.1);   border: 1px solid rgba(229,62,62,0.3);  color: #fc8181; }

/* ── Row highlight ── */
.row--pending { background: rgba(214,158,46,0.04); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: fixed;
        left: -240px;
        top: 0; bottom: 0;
        z-index: 200;
        transition: left 0.3s ease;
        height: 100vh;
    }
    .admin-sidebar.open { left: 0; }
    .admin-menu-toggle { display: flex; }
    .stats-grid { grid-template-columns: 1fr; }
    .admin-form .form-row { grid-template-columns: 1fr; }
}

/* ── Voyage media grid (admin form) ── */
.voyage-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.voyage-media-item { background: var(--admin-bg); border-radius: var(--radius); padding: 0.5rem; }

.form-inline-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-end;
}
.form-inline-row .form-input { flex: 1; min-width: 160px; }
