/* File: public_html/assets/app.css */
:root {
    --bg: #e9edf7;
    --bg-soft: #e2e8f4;
    --surface: #ffffff;
    --surface-muted: #f2f5fb;
    --text: #1b2640;
    --text-muted: #6b7a93;
    --primary: #3b6ff6;
    --primary-strong: #2f5be0;
    --accent: #6aa6ff;
    --danger: #e05858;
    --border: #dde4f1;
    --shadow: 0 20px 45px rgba(24, 36, 60, 0.1);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

body.dark-mode {
    --bg: #0f1626;
    --bg-soft: #151f33;
    --surface: #111b2b;
    --surface-muted: #18233a;
    --text: #eef2ff;
    --text-muted: #9aa7bf;
    --primary: #5b8bff;
    --primary-strong: #3f70f0;
    --accent: #6aa6ff;
    --danger: #ef7474;
    --border: #23314a;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
}

h1, h2, h3, h4, h5 {
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.3px;
}

a {
    text-decoration: none;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    background: var(--bg);
}

.app-sidebar {
    background: linear-gradient(180deg, #1b2540 0%, #243254 50%, #2a3b5f 100%);
    color: #fff;
    width: 270px;
    flex: 0 0 270px;
    height: 100vh;
    position: sticky;
    top: 0;
}

body.dark-mode .app-sidebar {
    background: linear-gradient(180deg, #121a2b 0%, #19243a 50%, #1f2c45 100%);
}

.app-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    padding: 0.5rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
    position: relative;
    width: 100%;
    text-align: left;
}

.app-sidebar .nav-link span {
    flex: 1;
}

.app-sidebar .nav-link i {
    width: 16px;
    text-align: center;
    font-size: 0.95rem;
}

.app-sidebar .nav-item {
    margin: 0;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active {
    background: rgba(59, 111, 246, 0.35);
    color: #fff;
}

.app-sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: #7eb2ff;
    border-radius: 999px;
}

.app-sidebar .sidebar-brand {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.sidebar-company {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
}

.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-left: 0;
}

.sidebar-heading {
    padding: 0.4rem 2.1rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.6rem;
}

.app-sidebar .offcanvas-body {
    overflow-y: auto;
    padding: 1.1rem;
}

.app-content {
    flex: 1;
    padding: 1.5rem 2rem 2.5rem;
    min-width: 0;
}

@media (max-width: 991.98px) {
    .app-content {
        padding: 1.25rem;
    }
}

.app-content-inner {
    max-width: 1260px;
    margin: 0 auto;
}

.topbar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

body.dark-mode .topbar {
    background: var(--surface);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-title {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.brand-text {
    font-weight: 700;
    letter-spacing: 0.4px;
}

.theme-toggle {
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.85rem;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    color: var(--text);
}

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

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.btn {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.55rem 1.2rem;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-strong);
    border-color: var(--primary-strong);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: #042d22;
}

.btn-soft {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text);
}

.badge-soft {
    background: rgba(31, 138, 112, 0.15);
    color: var(--primary);
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.table thead th {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.table tbody tr {
    border-color: var(--border);
}

.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(31, 138, 112, 0.2);
}

.alert {
    border-radius: var(--radius-md);
}

.breadcrumb {
    margin-bottom: 0;
    font-size: 0.85rem;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--text);
}

.breadcrumb .active {
    color: var(--text);
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2rem;
    color: var(--primary);
}

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

.stat-card .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.stat-card .stat-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.landing-hero {
    padding: 4rem 0 5rem;
    position: relative;
}

.landing-hero::after {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(242, 182, 63, 0.5) 0%, rgba(242, 182, 63, 0) 70%);
    z-index: 0;
}

.landing-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    color: var(--text-muted);
}

body.dark-mode .footer {
    border-color: var(--border);
}

@media (max-width: 991.98px) {
    .app-sidebar {
        border-radius: 0;
        width: 100%;
        flex: 0 0 100%;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }
}
