/* Howlwaadag Property — custom theme
   Layered on top of Bootstrap 5. No build step required. */

:root {
    --brand-950: #0b1324;
    --brand-900: #10192f;
    --brand-800: #16213d;
    --brand-700: #1d2c4f;
    --brand-600: #2a3d6b;
    --brand-500: #3654a3;
    --brand-400: #4f6fc4;
    --accent: #5b8def;
    --accent-2: #7c5cff;
    --accent-warm: #ff8a5b;

    --surface: #f4f6fb;
    --surface-card: #ffffff;
    --surface-border: #e7eaf2;
    --text-strong: #131a2c;
    --text-muted: #6b7386;

    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;

    --shadow-sm: 0 1px 2px rgba(16, 25, 47, 0.06);
    --shadow-md: 0 8px 24px -8px rgba(16, 25, 47, 0.16);
    --shadow-lg: 0 20px 48px -16px rgba(16, 25, 47, 0.28);

    --sidebar-w: 264px;
}

* { box-sizing: border-box; }

html, body {
    background: var(--surface);
    color: var(--text-strong);
    font-family: 'Instrument Sans', 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

a { text-decoration: none; }

/* ---------- App shell ---------- */

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

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--brand-950) 0%, var(--brand-900) 100%);
    color: #dbe3f7;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    padding: 1.5rem 1.1rem;
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .35rem .4rem 1.5rem;
    color: #fff;
}

.sidebar-brand .mark {
    width: 38px; height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.05rem;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.sidebar-brand .name { font-weight: 700; font-size: 1.02rem; line-height: 1.15; }
.sidebar-brand .tagline { font-size: .72rem; color: #8b96b8; }

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    margin-top: .5rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: .25rem;
}
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 999px; }

.sidebar-nav .nav-section {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6c7794;
    margin: 1.1rem .6rem .4rem;
    font-weight: 600;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .62rem .75rem;
    border-radius: var(--radius-sm);
    color: #b7c0dc;
    font-weight: 500;
    font-size: .92rem;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

.sidebar-link i { font-size: 1.05rem; width: 20px; text-align: center; opacity: .9; }

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: var(--shadow-md);
}

.sidebar-foot {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.main-area {
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(244, 246, 251, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--surface-border);
    padding: .85rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.topbar .page-eyebrow { font-size: .78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.topbar .page-title { font-size: 1.28rem; font-weight: 700; color: var(--text-strong); margin: 0; }

.user-chip {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .3rem .55rem .3rem .3rem;
    border-radius: 999px;
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
}

.user-chip .avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem;
}

.content-area { padding: 1.75rem; flex: 1; }

/* ---------- Cards / stats ---------- */

.stat-card {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    transition: transform .15s ease, box-shadow .15s ease;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-card .label { font-size: .8rem; color: var(--text-muted); font-weight: 600; margin-bottom: .35rem; }
.stat-card .value { font-size: 1.7rem; font-weight: 800; color: var(--text-strong); line-height: 1; }
.stat-card .sub { font-size: .78rem; color: var(--text-muted); margin-top: .4rem; }

.stat-icon {
    width: 44px; height: 44px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    flex-shrink: 0;
}

.bg-grad-blue { background: linear-gradient(135deg, #5b8def, #3654a3); }
.bg-grad-violet { background: linear-gradient(135deg, #8b6cff, #5b3cd6); }
.bg-grad-green { background: linear-gradient(135deg, #34c795, #16916a); }
.bg-grad-orange { background: linear-gradient(135deg, #ff9d5b, #e56b2f); }

.surface-card {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-header-clean {
    background: transparent;
    border-bottom: 1px solid var(--surface-border);
    padding: 1.1rem 1.4rem;
    font-weight: 700;
}

/* ---------- Buttons ---------- */

.btn-brand {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.btn-brand:hover { color: #fff; filter: brightness(1.06); box-shadow: var(--shadow-md); }

.btn, .form-control, .form-select {
    border-radius: var(--radius-sm) !important;
}

.btn { font-weight: 600; }

/* ---------- Tables ---------- */

.table-modern thead th {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--surface-border);
    background: #fafbfd;
    padding: .85rem 1rem;
}

.table-modern tbody td {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--surface-border);
    vertical-align: middle;
}

.table-modern tbody tr:last-child td { border-bottom: none; }
.table-modern tbody tr:hover { background: #f8faff; }

.row-thumb {
    width: 38px; height: 38px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--surface-border);
}

.row-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .82rem; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    flex-shrink: 0;
}

/* ---------- Status badges ---------- */

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .32rem .65rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: .01em;
}

.badge-status::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.st-green { background: #e6f7ee; color: #16916a; }
.st-blue { background: #e9f0ff; color: #3654a3; }
.st-orange { background: #fff2e6; color: #c9601a; }
.st-red { background: #fdeaea; color: #c0392b; }
.st-gray { background: #eef0f5; color: #6b7386; }
.st-violet { background: #f1ecff; color: #6a3fd6; }

/* ---------- Search box ---------- */

.search-box {
    position: relative;
    max-width: 320px;
}
.search-box i {
    position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted);
}
.search-box input {
    padding-left: 2.2rem;
    background: var(--surface-card);
}

/* ---------- Empty state ---------- */

.empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
}
.empty-state .icon-wrap {
    width: 64px; height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #eef1fb;
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
}

/* ---------- Forms ---------- */

.form-section-title {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
    color: var(--text-muted);
    margin: 1.6rem 0 .9rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--surface-border);
}
.form-section-title:first-child { margin-top: 0; }

.form-label { font-weight: 600; font-size: .86rem; color: var(--text-strong); }

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 .2rem rgba(91, 141, 239, .18);
}

/* ---------- Auth (guest) layout ---------- */

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
}

.auth-visual {
    background:
        radial-gradient(circle at 15% 20%, rgba(124, 92, 255, .35), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(91, 141, 239, .35), transparent 45%),
        linear-gradient(160deg, var(--brand-950), var(--brand-800));
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
}

.auth-visual .mark {
    width: 46px; height: 46px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
}

.auth-visual h2 { font-weight: 800; font-size: 2rem; line-height: 1.25; max-width: 22ch; }
.auth-visual p { color: #aeb8d9; max-width: 34ch; }

.auth-visual .quote {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.4rem;
    backdrop-filter: blur(6px);
}

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--surface);
}

.auth-card {
    width: 100%;
    max-width: 400px;
}

.auth-card .brand-mobile { display: none; }
@media (max-width: 900px) {
    .auth-card .brand-mobile {
        display: flex; align-items: center; gap: .6rem; margin-bottom: 1.5rem;
    }
    .auth-card .brand-mobile .mark {
        width: 38px; height: 38px; border-radius: 11px;
        background: linear-gradient(135deg, var(--accent), var(--accent-2));
        display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700;
    }
}

.input-icon-group { position: relative; }
.input-icon-group i {
    position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: .95rem;
}
.input-icon-group input { padding-left: 2.3rem; }

/* ---------- Progress / occupancy bar ---------- */

.occupancy-bar {
    height: 10px;
    border-radius: 999px;
    background: #eef1fb;
    overflow: hidden;
    display: flex;
}
.occupancy-bar .seg { height: 100%; }

/* Mobile sidebar toggle */
.sidebar-toggle { display: none; }
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: translateX(0); }
    .main-area { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; }
    .sidebar-backdrop {
        display: none;
        position: fixed; inset: 0; background: rgba(11, 19, 36, .5); z-index: 1035;
    }
    .sidebar-backdrop.open { display: block; }
}
