/* =========================================================
   Barangay Ilayang Nangka — Admin Panel
   Same identity as the public site: white ledger paper,
   forest green throughout, no blue/gold/red accents.
   ========================================================= */

:root {
    --ink:         #1f2a20;
    --ink-soft:     #56635a;
    --paper:       #ffffff;
    --paper-deep:  #eef6ee;
    --forest:      #1e6b34;
    --forest-deep: #123d1e;
    --forest-mid:  #2f8a44;
    --sunset:      #2f8a44;
    --seal-red:    #1e6b34;
    --line:        #d7e6da;
    --radius: 6px;
}

* { box-sizing: border-box; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'Public Sans', 'Segoe UI', Roboto, Arial, sans-serif;
}

h1, h2, h3, .display-font { font-family: 'Fraunces', Georgia, serif; }
.mono { font-family: 'IBM Plex Mono', 'Courier New', monospace; }

/* ---------- Login Page ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--forest-deep);
    background-image: repeating-linear-gradient(transparent, transparent 38px, rgba(255,255,255,.03) 39px);
}
.login-wrapper { width: 100%; max-width: 420px; padding: 20px; }
.login-card {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    border-top: 4px solid var(--sunset);
}
.login-brand { text-align: center; margin-bottom: 1.5rem; }
.login-logo {
    width: 72px !important; height: 72px !important;
    object-fit: cover; border-radius: 50%;
    margin-bottom: .75rem; border: 2px solid var(--forest);
}
.login-brand h1 { font-size: 1.3rem; font-weight: 600; margin: 0; color: var(--forest-deep); }
.login-brand p { font-size: .85rem; color: var(--ink-soft); margin: 0; }
.login-page .btn-primary { background: var(--forest); border-color: var(--forest); }
.login-page .btn-primary:hover { background: var(--forest-deep); border-color: var(--forest-deep); }
.login-footer { text-align: center; font-size: .75rem; color: #9a8f7d; margin: 1.5rem 0 0; font-family: 'IBM Plex Mono', monospace; }

/* ---------- App Shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px;
    background: var(--forest-deep);
    color: #fff;
    flex-shrink: 0;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 1030;
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
    border-right: 3px solid var(--sunset);
}
.sidebar-brand {
    padding: 1.25rem 1rem;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.sidebar-logo {
    width: 32px !important; height: 32px !important;
    object-fit: cover; border-radius: 50%;
    flex: 0 0 auto;
}
.sidebar-nav { padding: .75rem 0; overflow-y: auto; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.25rem;
    color: rgba(255,255,255,.82);
    text-decoration: none;
    font-size: .93rem;
    border-left: 3px solid transparent;
}
.sidebar-nav a i { width: 18px; text-align: center; }
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active {
    background: rgba(255,255,255,.1);
    border-left-color: var(--sunset);
    color: #fff;
    font-weight: 600;
}

.main-content { flex: 1; margin-left: 250px; display: flex; flex-direction: column; min-width: 0; }

.topbar {
    background: #fff;
    padding: .9rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1020;
}
.topbar-title { font-family: 'Fraunces', Georgia, serif; font-size: 1.2rem; font-weight: 600; color: var(--forest-deep); margin: 0; flex: 1; }
.topbar-user a { color: var(--ink); }

.page-content { padding: 1.5rem; }

/* ---------- Stat Cards ---------- */
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
    border: 1px solid var(--line);
    height: 100%;
}
.stat-card i { font-size: 1.7rem; padding: .7rem; border-radius: 12px; }
.stat-card h3 { margin: 0; font-size: 1.4rem; font-weight: 700; font-family: 'IBM Plex Mono', monospace; }
.stat-card p { margin: 0; font-size: .8rem; color: var(--ink-soft); }
.stat-blue i  { background: rgba(30,107,52,.12);  color: var(--forest); }
.stat-green i { background: rgba(18,61,30,.14);  color: var(--forest-deep); }
.stat-gold i  { background: rgba(47,138,68,.16); color: var(--forest-mid); }
.stat-red i   { background: rgba(30,107,52,.12);  color: var(--seal-red); }

/* ---------- Chart / Table Cards ---------- */
.chart-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
    border: 1px solid var(--line);
    margin-bottom: 0;
}
.chart-card h5 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; color: var(--forest-deep); margin-bottom: 1rem; font-size: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
}