@font-face {
    font-family: 'Noto Sans Lao';
    src: url('../fonts/NotoSansLao-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Noto Sans Lao';
    src: url('../fonts/NotoSansLao-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

:root {
    --primary: #a8d08d;
    --primary-dark: #7ba863;
    --surface: #f5f8f3;
    --text: #1d251c;
    --border: #d6e2ce;
}

* {
    font-family: 'Noto Sans Lao', 'Segoe UI', sans-serif;
}

body {
    background: var(--surface);
    color: var(--text);
    min-height: 100vh;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    transition: grid-template-columns 0.2s ease;
}

body.sidebar-collapsed .app-shell {
    grid-template-columns: 90px 1fr;
}

.sidebar {
    background: #ffffff;
    border-right: 1px solid var(--border);
    padding: 1.25rem;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.2s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar .brand span {
    font-weight: 700;
    font-size: 1.1rem;
}

.sidebar-toggle {
    border-radius: 999px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.sidebar-nav::-webkit-scrollbar {
    width: 0;
}

.sidebar-nav {
    scrollbar-width: none;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.9rem;
    margin-bottom: 0.25rem;
    border-radius: 0.8rem;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    font-size: 0.95rem;
}

.sidebar nav a span,
.sidebar .brand .sidebar-title,
.sidebar-hideable {
    transition: opacity 0.2s ease;
}

.sidebar nav a.active,
.sidebar nav a:hover {
    background: var(--primary);
    color: #0f2a0b;
}

.app-main {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-topbar {
    background: #fff;
    border-radius: 1.2rem;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 35px rgba(72, 94, 67, 0.08);
    gap: 1rem;
    flex-wrap: wrap;
}

.app-topbar-user-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.app-topbar-user-actions .btn,
.app-topbar .btn {
    border-radius: 0.9rem;
}

.app-topbar-user-actions strong {
    margin-right: 0.25rem;
}

.app-main-content {
    flex: 1 0 auto;
}

.card {
    border-radius: 1.2rem;
    border: none;
    box-shadow: 0 10px 35px rgba(72, 94, 67, 0.12);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #0f2a0b;
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.table thead {
    background: var(--surface);
}

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

.page-title {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #0f2a0b;
}

.stat-card h4 {
    font-weight: 700;
}

.app-footer {
    margin-top: auto;
    padding: 1.5rem 0;
}

.auth-body {
    background: linear-gradient(135deg, #f7fbf4, #dcecd1);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    border-radius: 1.5rem;
    border: none;
    background: #fff;
}

body.sidebar-collapsed .sidebar .brand .sidebar-title,
body.sidebar-collapsed .sidebar-nav a span,
body.sidebar-collapsed .sidebar-hideable {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

body.sidebar-collapsed .sidebar nav a {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-footer .btn {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

@media (max-width: 992px) {
    .app-shell {
        grid-template-columns: 240px 1fr;
    }
    body.sidebar-collapsed .app-shell {
        grid-template-columns: 0 1fr;
    }
}

