:root {
    --forest-dark: #081410;
    --forest: #0d2418;
    --emerald: #123c28;
    --emerald-bright: #1f6b47;
    --gold: #cda86b;
    --gold-bright: #e8caa0;
    --ivory: #f7f4ec;
    --ivory-dim: #d9d5c8;
    --charcoal: #12151a;
    --danger: #c0392b;
    --success: #1f6b47;
    --warning: #b8862f;
    --radius: 10px;
    --shadow: 0 4px 18px rgba(8, 20, 16, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--ivory);
    color: var(--charcoal);
}

a { color: inherit; text-decoration: none; }

/* ---------- Login page (split screen, fits viewport, no scroll) ---------- */
body.login-page {
    height: 100vh;
    overflow: hidden;
}

.login-split {
    height: 100vh;
    display: flex;
}

.login-hero {
    flex: 1 1 46%;
    position: relative;
    height: 100vh;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.login-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(175deg, rgba(8,20,16,0.94) 0%, rgba(18,60,40,0.9) 45%, rgba(31,107,71,0.55) 100%);
}

.login-hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: clamp(20px, 4vh, 48px) clamp(24px, 4vw, 46px);
    color: var(--ivory);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(14px, 2.6vh, 28px);
    overflow: hidden;
}

.login-hero-logo-wrap {
    text-align: center;
}

.login-hero-logo {
    width: clamp(160px, 20vw, 220px);
    display: inline-block;
}

.login-hero-text h2 {
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    margin: 0 0 8px;
    color: #fff;
}

.login-hero-text p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--ivory-dim);
    max-width: 380px;
    margin: 0;
}

.login-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.6vh, 16px);
}

.login-features li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 0.82rem;
    color: var(--ivory-dim);
    line-height: 1.35;
}

.login-feature-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(247,244,236,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.login-features strong { color: #fff; font-size: 0.86rem; }

.login-hero-footer {
    font-size: 0.73rem;
    color: rgba(217,213,200,0.6);
}

.login-panel {
    flex: 1 1 54%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ivory);
    padding: clamp(16px, 3vh, 30px);
    height: 100vh;
    overflow: hidden;
}

.login-card {
    background: #fff;
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    padding: clamp(24px, 4vh, 44px) clamp(24px, 3.5vw, 38px) clamp(22px, 3.5vh, 38px);
    box-shadow: 0 20px 50px rgba(8,20,16,0.1);
    text-align: center;
}

.login-card h1 {
    font-size: 1.3rem;
    color: var(--charcoal);
    margin: 0 0 10px;
    font-weight: 600;
    line-height: 1.4;
}

.login-card h1 span { color: var(--emerald); font-weight: 700; }

.login-divider-icon { font-size: 1.05rem; margin-bottom: 8px; }

.login-card p.subtitle {
    color: #8a8a80;
    font-size: 0.85rem;
    margin: 0 0 20px;
}

.login-card .field { margin-bottom: 14px; }

.input-icon-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--ivory-dim);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.input-icon-wrap:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(205, 168, 107, 0.25);
}

.input-icon-wrap .input-icon {
    flex-shrink: 0;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ivory);
    border-right: 1px solid var(--ivory-dim);
    font-size: 0.95rem;
    opacity: 0.75;
}

.input-icon-wrap input {
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 0;
    padding: 10px 12px;
}

.input-icon-wrap input:focus { outline: none; box-shadow: none; }

.input-toggle {
    flex-shrink: 0;
    width: 40px;
    background: none;
    border: none;
    border-left: 1px solid var(--ivory-dim);
    cursor: pointer;
    font-size: 0.88rem;
    opacity: 0.7;
}

.login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 16px;
    font-size: 0.82rem;
}

.remember-me { display: flex; align-items: center; gap: 6px; color: #555; cursor: pointer; }
.remember-me input { width: auto; accent-color: var(--emerald); }

.field { text-align: left; margin-bottom: 16px; }

.field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--emerald);
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--ivory-dim);
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
}

.field input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(205, 168, 107, 0.25);
}

.btn {
    display: inline-block;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    padding: 11px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    color: var(--forest-dark);
    width: 100%;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(205,168,107,0.4); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--emerald);
    color: var(--emerald);
}

.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

.alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    text-align: left;
}
.alert-error { background: #fbeae8; color: var(--danger); border: 1px solid #f2c6c0; }
.alert-success { background: #e9f5ee; color: var(--success); border: 1px solid #bfe3cf; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--forest-dark), var(--emerald));
    color: var(--ivory);
    padding: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar .brand {
    /*background: #f4e7c3;*/
    text-align: center;
    padding: 22px 16px;
}

.sidebar .brand img { width: 100%; max-width: 165px; }

.sidebar nav { padding: 14px 0; flex: 1; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    font-size: 0.88rem;
    color: var(--ivory-dim);
    border-left: 3px solid transparent;
}

.nav-link:hover { background: rgba(247,244,236,0.06); color: var(--ivory); }

.nav-link.active {
    background: rgba(205,168,107,0.12);
    border-left-color: var(--gold);
    color: var(--gold-bright);
    font-weight: 600;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(247,244,236,0.4);
    padding: 16px 20px 6px;
}

.main { flex: 1; min-width: 0; }

.topbar {
    background: #fff;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--ivory-dim);
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar h1 { font-size: 1.15rem; margin: 0; color: var(--emerald); }

.topbar .user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}

.content { padding: 26px 28px 60px; }

/* ---------- Cards / stats ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--gold);
}

.stat-card .value { font-size: 1.8rem; font-weight: 700; color: var(--emerald); }
.stat-card .label { font-size: 0.8rem; color: #7a7a70; margin-top: 4px; }

.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 22px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header h2 { font-size: 1.05rem; margin: 0; color: var(--emerald); }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--ivory-dim); vertical-align: middle; }
th { color: #7a7a70; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.4px; }
tr:hover td { background: #fbfaf6; }
.table-wrap { overflow-x: auto; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}
.badge-available, .badge-new { background: #e9f5ee; color: var(--success); }
.badge-sold_out, .badge-closed { background: #f0f0ee; color: #666; }
.badge-coming_soon, .badge-interested { background: #fdf3e3; color: var(--warning); }
.badge-contacted { background: #e6f0f9; color: #2b6ab0; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

.field textarea, .field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ivory-dim);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
}
.field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(205,168,107,0.25); }

.actions-row { display: flex; gap: 10px; margin-top: 18px; }

.thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 6px; background: #eee; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.gallery-item { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.gallery-item .meta { padding: 8px 10px; font-size: 0.75rem; }

.filters-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters-row select, .filters-row input { padding: 8px 10px; border: 1px solid var(--ivory-dim); border-radius: 8px; font-size: 0.85rem; }

.icon-btn { background: none; border: none; cursor: pointer; padding: 4px; color: var(--emerald); }
.icon-btn.danger { color: var(--danger); }

.empty-state { text-align: center; padding: 40px 20px; color: #999; }

.pagination { display: flex; gap: 6px; margin-top: 16px; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--ivory-dim); font-size: 0.82rem; }
.pagination a:hover { background: var(--ivory); }
.pagination .current { background: var(--emerald); color: #fff; border-color: var(--emerald); }

#sidebarToggle { display: none; }

@media (max-width: 900px) {
    .login-hero { display: none; }
    .login-panel { flex: 1 1 100%; overflow-y: auto; }
    body.login-page { overflow-y: auto; height: auto; min-height: 100vh; }
}

@media (max-width: 860px) {
    .sidebar { position: fixed; left: -240px; z-index: 50; transition: left 0.2s; box-shadow: 4px 0 20px rgba(0,0,0,0.2); }
    .sidebar.open { left: 0; }
    .content { padding: 18px 16px 50px; }
    .topbar { padding: 12px 16px; }
    #sidebarToggle { display: inline-block; }
}
