:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --text: #14213d;
    --muted: #6c7a92;
    --primary: #14532d;
    --primary-soft: #dff4e7;
    --accent: #b45309;
    --border: #dde5f0;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', sans-serif;
    background:
        radial-gradient(circle at top right, rgba(20, 83, 45, 0.10), transparent 35%),
        radial-gradient(circle at bottom left, rgba(180, 83, 9, 0.08), transparent 30%),
        var(--bg);
    color: var(--text);
}

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

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.brand-mark,
.login-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), #1d7a45);
    color: #fff;
    font-size: 1.4rem;
}

.brand-name {
    font-weight: 800;
    letter-spacing: -0.03em;
}

.sidebar .nav-link {
    color: var(--text);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.sidebar .nav-link:hover,
.sidebar .nav-link:focus {
    background: var(--primary-soft);
    color: var(--primary);
}

.main-content {
    flex: 1;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.page-title {
    font-weight: 800;
    letter-spacing: -0.04em;
}

.topbar-date,
.stat-card,
.panel-card,
.mini-stat {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
}

.topbar-date {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.stat-card {
    border-radius: 22px;
    padding: 1.4rem;
    border: 1px solid var(--border);
    height: 100%;
}

.stat-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.stat-card h3 {
    font-size: 1.65rem;
    margin: 0;
    font-weight: 800;
}

.panel-card {
    border-radius: 24px;
}

.mini-stat {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
}

.mini-stat span {
    display: block;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.mini-stat strong {
    font-size: 1.1rem;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.login-shell {
    width: 100%;
    max-width: 460px;
}

.login-card {
    border-radius: 28px;
}

.receipt-card {
    max-width: 900px;
}

.manual-cover {
    background:
        linear-gradient(160deg, rgba(20, 83, 45, 0.96), rgba(20, 83, 45, 0.86)),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 35%);
}

.manual-meta {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    padding: 1rem;
    min-height: 100%;
}

.manual-meta small {
    display: block;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.manual-title {
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: var(--text);
}

.manual-index-item,
.manual-box {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fbfcfe;
}

.manual-index-item {
    padding: 0.95rem 1rem;
    font-weight: 600;
}

.manual-box {
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}

.receipt-code {
    font-size: 1.2rem;
    font-weight: 800;
}

.signature-box {
    margin-top: 2rem;
    padding-top: 3rem;
    border-top: 1px dashed #9ca3af;
    width: 280px;
}

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

.btn-primary:hover,
.btn-primary:focus {
    background: #0f4123;
    border-color: #0f4123;
}

.table > :not(caption) > * > * {
    border-bottom-color: #edf1f7;
}

@media (max-width: 991.98px) {
    .layout-shell {
        display: block;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
}

@media print {
    .sidebar,
    .topbar,
    .no-print,
    .alert {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .main-content,
    .container-fluid {
        padding: 0 !important;
        margin: 0 !important;
    }
}
