@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Fraunces:wght@600;700&display=swap');

:root {
    --p-teal-950: #0A2E2A;
    --p-teal-900: #0E3B36;
    --p-teal-700: #17564D;
    --p-brass: #C79A4B;
    --p-sand: #F5F6F5;
    --p-ink: #1B2523;
    --p-border: #E4E8E6;
    --p-coral: #E76F51;
    --p-green: #1E6B4C;
    --p-red: #B23B22;
    --p-blue: #2563A8;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    background: var(--p-sand);
    color: var(--p-ink);
}
a { color: inherit; text-decoration: none; }

.app-shell { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--p-teal-950);
    color: #C9D9D4;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
}
.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0 8px 24px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar .mark {
    width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(145deg,#E4C480,#C79A4B);
    display:flex; align-items:center; justify-content:center;
    color: var(--p-teal-950); font-weight:800; font-size:.85rem;
}
.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    font-size: .89rem;
    font-weight: 600;
    color: #B9CCC6;
    margin-bottom: 3px;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: var(--p-brass); color: var(--p-teal-950); }
.sidebar .spacer { flex: 1; }
.sidebar .user-box {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 16px;
    font-size: .82rem;
}
.sidebar .user-box .name { color: #fff; font-weight: 700; }
.sidebar .user-box .role { color: #8FA8A1; text-transform: capitalize; }
.sidebar .logout {
    display: block;
    margin-top: 10px;
    font-size: .8rem;
    color: #E9A796;
    font-weight: 700;
}

/* ---- Main ---- */
.main { flex: 1; min-width: 0; }
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--p-border);
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topbar h1 { font-size: 1.15rem; margin: 0; font-family: 'Fraunces', serif; }
.content { padding: 26px 28px 60px; }

/* ---- Cards / Stat ---- */
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 26px; }
.stat-card {
    background: #fff;
    border: 1px solid var(--p-border);
    border-radius: 14px;
    padding: 18px 20px;
}
.stat-card .label { font-size: .78rem; color: #7A8B86; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.stat-card .value { font-family: 'Fraunces', serif; font-size: 1.7rem; margin-top: 6px; color: var(--p-teal-950); }
.stat-card .value.coral { color: var(--p-coral); }

.card {
    background: #fff;
    border: 1px solid var(--p-border);
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 20px;
}
.card h2, .card h3 { font-family: 'Fraunces', serif; margin-top: 0; }

/* ---- Table ---- */
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th {
    text-align: left;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #7A8B86;
    padding: 10px 12px;
    border-bottom: 2px solid var(--p-border);
}
table.data td { padding: 12px; border-bottom: 1px solid var(--p-border); vertical-align: middle; }
table.data tr:hover td { background: #FAFBFA; }

/* ---- Badges ---- */
.badge { display:inline-block; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.badge-pending { background:#FDF1DA; color:#8A5A0A; }
.badge-confirmed { background:#DCEEFB; color:#1D5C8C; }
.badge-checkedin { background:#DFF3E8; color:var(--p-green); }
.badge-checkedout { background:#E7E9EC; color:#4A5560; }
.badge-cancelled { background:#FBE1DC; color:var(--p-red); }
.badge-unpaid { background:#FBE1DC; color:var(--p-red); }
.badge-paid { background:#DFF3E8; color:var(--p-green); }

/* ---- Forms / buttons ---- */
.field { margin-bottom: 14px; }
.field label { display:block; font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:#5A6B66; margin-bottom:6px; }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--p-border);
    border-radius: 9px;
    font-family: inherit;
    font-size: .92rem;
    background: #FAFBFA;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--p-teal-700); background: #fff; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: none; cursor: pointer;
    font-family: inherit; font-weight: 700; font-size: .87rem;
    padding: 10px 18px; border-radius: 9px;
    transition: opacity .12s, transform .12s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--p-teal-900); color: #fff; }
.btn-coral { background: var(--p-coral); color: #fff; }
.btn-green { background: var(--p-green); color: #fff; }
.btn-outline { background:#fff; border:1.5px solid var(--p-border); color: var(--p-ink); }
.btn-outline:hover { border-color: var(--p-teal-700); }
.btn-sm { padding: 7px 13px; font-size: .8rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.alert { padding: 12px 16px; border-radius: 10px; font-size: .88rem; margin-bottom: 16px; font-weight: 600; }
.alert-error { background:#FBE1DC; color:var(--p-red); }
.alert-success { background:#DFF3E8; color:var(--p-green); }

.empty-state { text-align:center; padding: 50px 20px; color: #8B9A95; }

/* ---- Login page ---- */
.login-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(120% 140% at 15% 0%, var(--p-teal-700) 0%, var(--p-teal-950) 60%);
    padding: 20px;
}
.login-card {
    background: #fff;
    border-radius: 18px;
    padding: 38px 34px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 30px 60px -20px rgba(0,0,0,.4);
}
.login-card .mark {
    width: 46px; height: 46px; border-radius: 12px;
    background: linear-gradient(145deg,#E4C480,#C79A4B);
    display:flex; align-items:center; justify-content:center;
    color: var(--p-teal-950); font-weight:800; margin-bottom: 18px;
}
.login-card h2 { font-family:'Fraunces', serif; margin: 0 0 4px; }
.login-card p.sub { color:#7A8B86; font-size:.88rem; margin: 0 0 24px; }

@media (max-width: 900px) {
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .sidebar { position: fixed; z-index: 40; height: 100vh; transform: translateX(-100%); transition: transform .2s; }
    .sidebar.open { transform: translateX(0); }
}
