*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

:root{
    --ink:#172331;
    --muted:#64748b;
    --line:#dbe4ee;
    --soft:#f6f8fb;
    --white:#ffffff;
    --primary:#0f766e;
    --primary-dark:#115e59;
    --primary-soft:#dff5f1;
    --accent:#f97316;
    --accent-soft:#fff1e7;
    --blue:#2563eb;
    --green:#15803d;
    --danger:#b42318;
    --warning:#a16207;
    --sidebar:#12333a;
    --shadow:0 18px 44px rgba(23,35,49,.10);
    --shadow-sm:0 8px 22px rgba(23,35,49,.07);
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:Arial, Helvetica, sans-serif;
    background:
        linear-gradient(180deg,#fbfdff 0%,#f4f7fb 42%,#eef6f3 100%);
    color:var(--ink);
    line-height:1.58;
}

a{
    color:inherit;
}

::selection{
    background:var(--primary-soft);
    color:var(--primary-dark);
}

.site-header{
    position:sticky;
    top:0;
    z-index:10;
    background:rgba(255,255,255,.88);
    border-bottom:1px solid rgba(219,228,238,.86);
    backdrop-filter:blur(16px);
}

.nav{
    max-width:1180px;
    margin:0 auto;
    padding:14px 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
}

.brand{
    display:flex;
    flex-direction:column;
    text-decoration:none;
    font-weight:800;
    letter-spacing:0;
    color:var(--ink);
}

.brand small{
    color:var(--muted);
    font-weight:400;
    font-size:12px;
}

.nav-actions,
.hero-buttons{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    justify-content:flex-end;
}

.btn-primary,
.btn-outline,
.btn-ghost,
.btn-danger,
button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:44px;
    padding:11px 18px;
    border-radius:8px;
    border:1px solid transparent;
    text-decoration:none;
    font-weight:800;
    cursor:pointer;
    transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.btn-primary,
button{
    background:var(--primary);
    color:white;
    box-shadow:0 10px 22px rgba(15,118,110,.20);
}

.btn-primary:hover,
button:hover{
    background:var(--primary-dark);
    transform:translateY(-1px);
}

.btn-outline{
    border-color:rgba(15,118,110,.35);
    color:var(--primary-dark);
    background:white;
}

.btn-outline:hover{
    border-color:var(--primary);
    box-shadow:var(--shadow-sm);
    transform:translateY(-1px);
}

.btn-ghost{
    color:var(--primary-dark);
    background:transparent;
}

.btn-danger{
    background:#fff1f0;
    border-color:#ffd0cc;
    color:var(--danger);
    box-shadow:none;
}

.btn-danger:hover{
    background:#ffe4e1;
    transform:translateY(-1px);
}

.hero{
    position:relative;
    overflow:hidden;
    background:
        linear-gradient(115deg,#ffffff 0%,#f1fbf8 52%,#fff6ee 100%);
}

.hero:before{
    content:"";
    position:absolute;
    inset:auto 0 0 0;
    height:118px;
    background:linear-gradient(180deg,rgba(255,255,255,0),rgba(246,248,251,.95));
    pointer-events:none;
}

.hero-inner{
    position:relative;
    max-width:1180px;
    min-height:620px;
    margin:0 auto;
    padding:64px 20px 48px;
    display:grid;
    grid-template-columns:minmax(0,1.15fr) minmax(310px,.85fr);
    gap:42px;
    align-items:center;
}

.hero-copy h1{
    font-size:48px;
    line-height:1.08;
    margin:16px 0 18px;
    max-width:850px;
    color: var(--primary-dark);
}

.hero-copy p{
    max-width:730px;
    color:#4b6178;
    font-size:18px;
}

.badge,
.panel-kicker{
    display:inline-flex;
    width:max-content;
    align-items:center;
    gap:8px;
    background:var(--primary-soft);
    color:var(--primary-dark);
    padding:7px 11px;
    border-radius:999px;
    font-size:13px;
    font-weight:800;
}

.hero-buttons{
    justify-content:flex-start;
    margin-top:26px;
}

.hero-metrics{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
    margin-top:28px;
    max-width:720px;
}

.hero-metrics div{
    padding:14px;
    border-radius:8px;
    background:rgba(255,255,255,.78);
    border:1px solid rgba(219,228,238,.84);
}

.hero-metrics strong{
    display:block;
    font-size:22px;
    color:var(--primary-dark);
}

.hero-metrics span{
    display:block;
    color:var(--muted);
    font-size:13px;
}

.quick-panel,
.card,
.auth-card,
.table-box,
.info-card{
    background:rgba(255,255,255,.96);
    border:1px solid rgba(219,228,238,.92);
    border-radius:8px;
    box-shadow:var(--shadow-sm);
}

.quick-panel{
    position:relative;
    padding:24px;
    box-shadow:var(--shadow);
}

.quick-panel:before{
    content:"";
    display:block;
    height:5px;
    margin:-24px -24px 20px;
    border-radius:8px 8px 0 0;
    background:linear-gradient(90deg,var(--primary),var(--accent),var(--blue));
}

.quick-panel h2{
    font-size:24px;
    margin:12px 0 16px;
}

.aid-list{
    display:grid;
    gap:12px;
}

.aid-item{
    border:1px solid #ffe0c5;
    border-left:5px solid var(--accent);
    background:linear-gradient(180deg,#fffaf6,#ffffff);
    padding:13px 14px;
    border-radius:8px;
}

.aid-item strong{
    display:block;
    color:#7c3e08;
    margin-bottom:3px;
}

.source-pills{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-top:16px;
}

.source-pills span{
    display:inline-flex;
    padding:6px 9px;
    border-radius:999px;
    background:#f1f5f9;
    color:#475569;
    font-size:12px;
    font-weight:700;
}

.section{
    max-width:1180px;
    margin:0 auto;
    padding:48px 20px;
}

.section h2{
    font-size:32px;
    margin-bottom:10px;
}

.section-lead{
    color:var(--muted);
    max-width:780px;
    margin-bottom:24px;
}

.info-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
}

.info-card{
    padding:28px;
    border-radius:16px;
    transition:transform .22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .22s cubic-bezier(0.16, 1, 0.3, 1), border-color .22s ease;
    box-shadow:0 4px 6px -1px rgba(15, 118, 110, 0.03), 0 2px 4px -1px rgba(15, 118, 110, 0.02);
    display:flex;
    flex-direction:column;
}

.info-card:hover{
    transform:translateY(-4px);
    box-shadow:0 20px 25px -5px rgba(15, 118, 110, 0.06), 0 10px 10px -5px rgba(15, 118, 110, 0.04);
}

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

/* Card custom soft-tint colors */
.info-card-academic{
    background:#f0fdfa;
    border:1px solid #ccfbf1;
    --card-accent:#0f766e;
    --bullet-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230f766e' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4.5 12.75l6 6 9-13.5'/%3E%3C/svg%3E");
}
.info-card-academic:hover{
    border-color:#99f6e4;
}

.info-card-document{
    background:#eff6ff;
    border:1px solid #dbeafe;
    --card-accent:#2563eb;
    --bullet-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232563eb' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4.5 12.75l6 6 9-13.5'/%3E%3C/svg%3E");
}
.info-card-document:hover{
    border-color:#bfdbfe;
}

.info-card-rules{
    background:#fff7ed;
    border:1px solid #ffedd5;
    --card-accent:#f97316;
    --bullet-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23f97316' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4.5 12.75l6 6 9-13.5'/%3E%3C/svg%3E");
}
.info-card-rules:hover{
    border-color:#fed7aa;
}

.info-card-header{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:20px;
}

.info-card-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:var(--card-accent);
    flex-shrink:0;
}

.info-card h3{
    margin:0;
    font-size:18px;
    font-weight:700;
    color:var(--ink);
}

.info-card ul{
    list-style:none;
    padding-left:0;
    margin:0;
}

.info-card ul li{
    position:relative;
    padding-left:26px;
    margin-bottom:12px;
    line-height:1.6;
    color:#475569;
    font-size:14px;
}

.info-card ul li:last-child{
    margin-bottom:0;
}

.info-card ul li::before{
    content:"";
    position:absolute;
    left:0;
    top:4px;
    width:16px;
    height:16px;
    background-image:var(--bullet-icon);
    background-repeat:no-repeat;
    background-size:contain;
}

.process-steps{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
}

.step{
    min-height:180px;
    padding:18px;
    background:white;
    border-radius:8px;
    border:1px solid var(--line);
    box-shadow:var(--shadow-sm);
}

.step span{
    display:inline-flex;
    width:34px;
    height:34px;
    align-items:center;
    justify-content:center;
    margin-bottom:14px;
    border-radius:50%;
    background:var(--primary-soft);
    color:var(--primary-dark);
    font-weight:800;
    font-size:13px;
}

.step strong{
    display:block;
    margin-bottom:8px;
}

.step p{
    color:var(--muted);
}

.auth-wrapper{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:28px 16px;
    background:
        linear-gradient(130deg,#eefaf6 0%,#ffffff 48%,#fff4eb 100%);
}

.auth-card{
    width:100%;
    max-width:540px;
    padding:30px;
    box-shadow:var(--shadow);
}

.auth-card h2{
    margin-bottom:10px;
    font-size:28px;
}

.auth-card p{
    color:var(--muted);
    margin-bottom:18px;
}

.form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
}

label{
    display:block;
    font-weight:800;
    font-size:14px;
    margin-bottom:6px;
}

input,
select,
textarea{
    width:100%;
    padding:12px 13px;
    margin-bottom:14px;
    border:1px solid #cbd8e6;
    border-radius:8px;
    background:white;
    color:var(--ink);
    font:inherit;
    transition:border-color .18s ease, box-shadow .18s ease;
}

input:focus,
select:focus,
textarea:focus{
    outline:none;
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(15,118,110,.12);
}

textarea{
    min-height:112px;
    resize:vertical;
}

.form-note{
    color:var(--muted);
    font-size:13px;
    margin-top:-4px;
}

.flash{
    padding:12px 14px;
    border-radius:8px;
    margin-bottom:16px;
    border:1px solid transparent;
    font-weight:700;
}

.flash.success{
    background:#eaf7f1;
    border-color:#b9e2cf;
    color:var(--green);
}

.flash.error{
    background:#fff1f0;
    border-color:#ffd0cc;
    color:var(--danger);
}

.dashboard{
    display:flex;
    min-height:100vh;
    background:#f6f8fb;
}

.sidebar{
    width:270px;
    background:
        linear-gradient(180deg,#12333a 0%,#0f2a30 100%);
    color:white;
    padding:24px;
}

.sidebar h2{
    margin-bottom:24px;
    font-size:22px;
}

.sidebar ul{
    list-style:none;
    display:grid;
    gap:5px;
}

.sidebar a{
    display:block;
    color:white;
    text-decoration:none;
    padding:12px 14px;
    border-radius:8px;
    transition:background .18s ease, transform .18s ease;
}

.sidebar a:hover{
    background:rgba(255,255,255,.12);
    transform:translateX(2px);
}

.sidebar a.active{
    background:rgba(255,255,255,.15) !important;
    color:#38bdf8 !important;
    font-weight:600;
}

.main-content{
    flex:1;
    padding:30px;
    min-width:0;
}

.topbar{
    margin-bottom:24px;
    display:flex;
    justify-content:space-between;
    gap:16px;
    align-items:flex-start;
}

.topbar h1{
    font-size:30px;
}

.topbar p{
    color:var(--muted);
}

.grid-cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:16px;
}

.card{
    padding:20px;
    transition:transform .18s ease, box-shadow .18s ease;
}

.card h3{
    margin-bottom:8px;
}

.card p{
    color:var(--muted);
}

.card-link{
    text-decoration:none;
}

.table-box{
    margin-top:22px;
    padding:18px;
    overflow:auto;
}

.table-box h2{
    margin-bottom:14px;
}

table{
    width:100%;
    border-collapse:collapse;
    min-width:720px;
}

th,
td{
    padding:13px;
    border-bottom:1px solid var(--line);
    text-align:left;
    vertical-align:top;
}

tr:hover td{
    background:#fbfdff;
}

th{
    color:#475569;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:0;
    background:#f8fafc;
}

.status{
    display:inline-flex;
    border-radius:999px;
    padding:5px 9px;
    font-size:12px;
    font-weight:800;
    background:#eef2f7;
    color:#42526a;
    white-space:nowrap;
}

.status.accepted,
.status.approved,
.status.active,
.status.admin_passed,
.status.recommended,
.status.completed{
    background:#e9f7ef;
    color:var(--green);
}

.status.pending,
.status.review,
.status.submitted,
.status.revision,
.status.reserve{
    background:#fff7e6;
    color:var(--warning);
}

.status.processed{
    background:#e0f2fe;
    color:#0369a1;
}

.status.rejected{
    background:#fff1f0;
    color:var(--danger);
}

.inline-form{
    display:flex;
    gap:8px;
    align-items:center;
    flex-wrap:wrap;
}

.action-stack,
.doc-row{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.action-stack{
    align-items:flex-start;
}

.doc-row{
    justify-content:space-between;
    padding:6px 0;
    border-bottom:1px solid #eef2f7;
}

.doc-row:last-child{
    border-bottom:0;
}

.mini-row{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:8px;
    padding:6px 0;
    border-bottom:1px solid #eef2f7;
}

.mini-row small{
    display:block;
    color:var(--muted);
}

.term-form{
    margin-top:12px;
    padding-top:12px;
    border-top:1px solid var(--line);
}

.doc-row form,
.action-stack form,
.mini-row form{
    margin:0;
}

.doc-row button,
.action-stack button,
.mini-row button,
.action-stack .btn-outline{
    min-height:34px;
    padding:7px 10px;
    font-size:12px;
}

.inline-form select,
.inline-form input{
    margin-bottom:0;
    width:auto;
    min-width:150px;
}

.footer-note{
    color:var(--muted);
    font-size:13px;
    margin-top:18px;
}

.report-filter{
    display:flex;
    align-items:flex-end;
    gap:12px;
    flex-wrap:wrap;
    padding:16px;
    margin-bottom:20px;
    background:white;
    border:1px solid var(--line);
    border-radius:8px;
    box-shadow:var(--shadow-sm);
}

.report-filter input,
.report-filter select{
    margin-bottom:0;
    min-width:190px;
}

.report-sheet{
    background:white;
    border:1px solid var(--line);
    border-radius:8px;
    box-shadow:var(--shadow);
    padding:28px;
}

.report-title{
    text-align:center;
    margin-bottom:22px;
}

.report-title h1{
    font-size:22px;
    line-height:1.35;
}

.report-title p{
    color:var(--muted);
    margin-top:6px;
}

.report-table{
    min-width:0;
}

.report-table th{
    background:#eef6f4;
    color:var(--primary-dark);
}

.money{
    text-align:right;
    white-space:nowrap;
}

.subtotal-row td{
    font-weight:800;
    background:#fff7ed;
}

.total-row td{
    font-weight:900;
    background:#dff5f1;
    color:var(--primary-dark);
}

.report-note{
    margin-top:16px;
    color:var(--muted);
    font-size:13px;
}

@media(max-width:900px){
    .hero-inner,
    .info-grid,
    .process-steps{
        grid-template-columns:1fr;
    }

    .hero-inner{
        min-height:auto;
        padding-top:38px;
    }

    .hero-copy h1{
        font-size:36px;
    }

    .dashboard{
        flex-direction:column;
    }

    .sidebar{
        width:100%;
        position:sticky;
        top:0;
        z-index:40;
        padding:12px 14px 14px;
        border-radius:0 0 18px 18px;
        box-shadow:0 12px 28px rgba(15,23,42,.18);
    }

    .sidebar h2{
        margin-bottom:10px;
        font-size:18px;
        line-height:1.2;
        letter-spacing:.01em;
    }

    .sidebar ul{
        display:flex;
        gap:8px;
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
        scroll-snap-type:x proximity;
        padding-bottom:2px;
        margin-left:-2px;
        margin-right:-2px;
    }

    .sidebar ul::-webkit-scrollbar{
        display:none;
    }

    .sidebar li{
        flex:0 0 auto;
        scroll-snap-align:start;
    }

    .sidebar a{
        min-height:38px;
        padding:9px 12px;
        border-radius:999px;
        background:rgba(255,255,255,.10);
        border:1px solid rgba(255,255,255,.12);
        white-space:nowrap;
        font-size:13px;
        font-weight:800;
    }

    .sidebar a:hover{
        transform:none;
        background:rgba(255,255,255,.18);
    }

    .main-content{
        padding:20px;
    }

    .topbar{
        flex-direction:column;
    }

    .table-box{
        margin-left:-20px;
        margin-right:-20px;
        border-left:0;
        border-right:0;
        border-radius:0;
    }
}



/* Home closing quotes - lebih proporsional */
.home-closing-quotes {
    padding-top: 32px;
    padding-bottom: 48px;
}

.closing-quote-card {
    background: linear-gradient(135deg, #eef8ef 0%, #f7fbf7 100%);
    border: 1px solid #d7ead9;
    border-radius: 28px;
    padding: 34px 38px;
    max-width: 980px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.closing-quote-mark {
    position: absolute;
    top: 10px;
    left: 24px;
    font-size: 72px;
    line-height: 1;
    color: rgba(22, 163, 74, 0.14);
    font-family: Georgia, serif;
}

.closing-quote-content {
    position: relative;
    z-index: 1;
}

.closing-quote-main {
    font-size: 22px;
    line-height: 1.45;
    font-weight: 700;
    color: #153d22;
    margin-bottom: 12px;
}

.closing-quote-content p {
    font-size: 16px;
    line-height: 1.7;
    color: #365143;
}

.closing-quote-subtitle {
    margin-top: 24px;
    font-weight: 700;
    color: #153d22 !important;
}

.closing-quote-content blockquote {
    margin: 12px 0 20px;
    padding: 14px 18px;
    border-left: 4px solid #16a34a;
    background: rgba(255, 255, 255, 0.62);
    border-radius: 0 14px 14px 0;
    font-size: 17px;
    line-height: 1.75;
    color: #1f3d2a;
    font-style: italic;
}

.closing-quote-signature {
    margin-top: 18px;
    font-weight: 700;
    color: #153d22 !important;
}

/* Mobile */
@media (max-width: 768px) {
    .home-closing-quotes {
        padding-top: 20px;
        padding-bottom: 34px;
    }

    .closing-quote-card {
        border-radius: 22px;
        padding: 26px 20px;
    }

    .closing-quote-mark {
        font-size: 54px;
        top: 8px;
        left: 16px;
    }

    .closing-quote-main {
        font-size: 17px;
        line-height: 1.55;
    }

    .closing-quote-content p {
        font-size: 14.5px;
        line-height: 1.65;
    }

    .closing-quote-content blockquote {
        font-size: 14.8px;
        line-height: 1.7;
        padding: 12px 14px;
    }
}

@media print{
    body{
        background:white;
        color:#111827;
    }

    .no-print,
    .site-header,
    .sidebar,
    .topbar,
    .report-filter{
        display:none !important;
    }

    .dashboard{
        display:block;
        min-height:auto;
        background:white;
    }

    .main-content{
        padding:0;
    }

    .report-sheet{
        box-shadow:none;
        border:0;
        padding:0;
    }

    table{
        min-width:0;
        font-size:12px;
    }

    th,
    td{
        padding:8px;
    }

    a{
        text-decoration:none;
    }
}


.optional-label {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #15803d;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}


/* Mobile hamburger menu for home header. Desktop layout remains unchanged. */
.nav-toggle{
    display:none;
}

@media(max-width:768px){
    .site-header .nav{
        position:relative;
        flex-direction:row !important;
        align-items:center !important;
        justify-content:space-between !important;
        gap:12px;
        padding:12px 16px;
    }

    .site-header .brand{
        flex:1;
        min-width:0;
    }

    .site-header .brand small{
        font-size:11px;
        line-height:1.35;
    }

    .nav-toggle{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        gap:8px;
        min-height:40px;
        padding:9px 12px;
        border:1px solid rgba(15,118,110,.20);
        border-radius:999px;
        background:#ffffff;
        color:var(--primary-dark);
        font-weight:800;
        box-shadow:0 8px 18px rgba(23,35,49,.08);
    }

    .nav-toggle span{
        display:block;
        width:16px;
        height:2px;
        border-radius:999px;
        background:currentColor;
        position:absolute;
        opacity:0;
    }

    .nav-toggle::before{
        content:"☰";
        font-size:18px;
        line-height:1;
    }

    .nav-toggle strong{
        font-size:13px;
        line-height:1;
    }

    .site-header .nav-actions{
        display:none !important;
        position:absolute;
        top:calc(100% + 8px);
        left:16px;
        right:16px;
        width:auto !important;
        padding:12px;
        border:1px solid rgba(15,118,110,.14);
        border-radius:16px;
        background:#ffffff;
        box-shadow:0 18px 42px rgba(23,35,49,.14);
        z-index:30;
        flex-direction:column;
        gap:10px;
    }

    .site-header .nav-actions.is-open{
        display:flex !important;
    }

    .site-header .nav-actions a{
        width:100%;
        justify-content:center;
    }
}


/* =========================================================
   FINAL MOBILE MENU FIX
   - Desktop: hamburger buttons are always hidden.
   - Mobile: hamburger buttons show as 3-line icon.
   - Sidebar pages: sidebar opens as a slide menu on mobile.
   ========================================================= */
.hamburger-lines{
    display:inline-flex;
    flex-direction:column;
    justify-content:center;
    gap:4px;
    width:22px;
    height:18px;
    flex:0 0 auto;
}

.hamburger-lines span{
    display:block;
    width:100%;
    height:2px;
    border-radius:999px;
    background:currentColor;
}

.nav-toggle,
.mobile-sidebar-toggle,
.sidebar-backdrop{
    display:none !important;
}

@media (min-width:769px){
    .site-header .nav-toggle{
        display:none !important;
    }

    .site-header .nav-actions{
        display:flex !important;
        position:static !important;
        width:auto !important;
        padding:0 !important;
        border:0 !important;
        box-shadow:none !important;
        background:transparent !important;
        flex-direction:row !important;
    }
}

@media (max-width:768px){
    .site-header .nav{
        position:relative;
        flex-direction:row !important;
        align-items:center !important;
        justify-content:space-between !important;
        gap:12px;
        padding:12px 16px;
    }

    .site-header .brand{
        flex:1;
        min-width:0;
    }

    .site-header .brand small{
        font-size:11px;
        line-height:1.35;
    }

    .site-header .nav-toggle{
        display:inline-flex !important;
        align-items:center;
        justify-content:center;
        width:44px;
        min-width:44px;
        height:44px;
        min-height:44px;
        padding:0;
        border:1px solid rgba(15,118,110,.20);
        border-radius:999px;
        background:#ffffff;
        color:var(--primary-dark);
        box-shadow:0 8px 18px rgba(23,35,49,.08);
    }

    .site-header .nav-toggle::before{
        content:none !important;
    }

    .site-header .nav-actions{
        display:none !important;
        position:absolute;
        top:calc(100% + 8px);
        left:16px;
        right:16px;
        width:auto !important;
        padding:12px;
        border:1px solid rgba(15,118,110,.14);
        border-radius:16px;
        background:#ffffff;
        box-shadow:0 18px 42px rgba(23,35,49,.14);
        z-index:50;
        flex-direction:column;
        gap:10px;
    }

    .site-header .nav-actions.is-open{
        display:flex !important;
    }

    .site-header .nav-actions a{
        width:100%;
        justify-content:center;
    }
}

@media (min-width:901px){
    .mobile-sidebar-toggle,
    .sidebar-backdrop{
        display:none !important;
    }

    .dashboard .sidebar{
        transform:none !important;
    }
}

@media (max-width:900px){
    .dashboard{
        display:block;
        position:relative;
    }

    .mobile-sidebar-toggle{
        display:inline-flex !important;
        align-items:center;
        justify-content:center;
        gap:9px;
        position:sticky;
        top:0;
        z-index:1000;
        margin:12px 16px 0;
        min-height:42px;
        padding:9px 14px;
        border:1px solid rgba(15,118,110,.20);
        border-radius:999px;
        background:#ffffff;
        color:var(--primary-dark);
        font-weight:800;
        box-shadow:0 8px 18px rgba(23,35,49,.10);
    }

    .mobile-sidebar-toggle:hover{
        transform:none;
        background:#ffffff;
    }

    .mobile-sidebar-label{
        font-size:13px;
        line-height:1;
    }

    .dashboard .sidebar{
        display:block !important;
        position:fixed !important;
        top:0 !important;
        left:0 !important;
        bottom:0 !important;
        width:min(84vw, 310px) !important;
        max-width:310px !important;
        height:100vh !important;
        z-index:1101 !important;
        overflow-y:auto;
        padding:22px 18px !important;
        border-radius:0 22px 22px 0 !important;
        box-shadow:0 24px 60px rgba(15,23,42,.28) !important;
        transform:translateX(-108%);
        transition:transform .24s ease;
    }

    .dashboard .sidebar.is-open{
        transform:translateX(0);
    }

    .dashboard .sidebar h2{
        margin-bottom:18px;
        font-size:20px;
    }

    .dashboard .sidebar ul{
        display:block !important;
        overflow:visible !important;
        padding:0 !important;
        margin:0 !important;
    }

    .dashboard .sidebar li{
        display:block;
        margin:0 0 8px !important;
    }

    .dashboard .sidebar a{
        display:flex !important;
        width:100%;
        min-height:42px;
        align-items:center;
        justify-content:flex-start;
        padding:10px 12px !important;
        border-radius:12px !important;
        white-space:normal !important;
        font-size:14px !important;
    }

    .sidebar-backdrop.is-open{
        display:block !important;
        position:fixed;
        inset:0;
        z-index:1100;
        background:rgba(15,23,42,.48);
        backdrop-filter:blur(2px);
    }

    body.sidebar-open{
        overflow:hidden;
    }

    .main-content{
        padding:20px;
    }
}


/* =========================================================
   FINAL FIX: icon-only hamburger menu
   - Desktop: hamburger buttons are hidden.
   - Mobile: hamburger shows as visible 3 lines only, no "Menu" text.
   ========================================================= */
.nav-toggle,
.mobile-sidebar-toggle {
    display: none !important;
}

.mobile-sidebar-label {
    display: none !important;
}

.hamburger-lines {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    width: 22px !important;
    height: 18px !important;
    line-height: 1 !important;
}

.hamburger-lines span,
.nav-toggle .hamburger-lines span,
.mobile-sidebar-toggle .hamburger-lines span {
    display: block !important;
    position: static !important;
    opacity: 1 !important;
    width: 22px !important;
    height: 2px !important;
    min-height: 2px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: currentColor !important;
    transform: none !important;
}

@media (min-width: 769px) {
    .site-header .nav-toggle,
    .mobile-sidebar-toggle,
    .sidebar-backdrop {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .site-header .nav-toggle {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
        gap: 0 !important;
        border: 1px solid rgba(15, 118, 110, .24) !important;
        border-radius: 999px !important;
        background: #ffffff !important;
        color: var(--primary-dark) !important;
        box-shadow: 0 8px 18px rgba(23, 35, 49, .08) !important;
    }

    .site-header .nav-toggle::before,
    .site-header .nav-toggle::after {
        content: none !important;
    }
}

@media (max-width: 900px) {
    .mobile-sidebar-toggle {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
        gap: 0 !important;
        border: 1px solid rgba(15, 118, 110, .24) !important;
        border-radius: 999px !important;
        background: #ffffff !important;
        color: var(--primary-dark) !important;
        box-shadow: 0 8px 18px rgba(23, 35, 49, .10) !important;
        font-size: 0 !important;
        line-height: 1 !important;
    }

    .mobile-sidebar-toggle::before,
    .mobile-sidebar-toggle::after {
        content: none !important;
    }
}

/* =========================================================
   HOME HAMBURGER LINE VISIBILITY FIX
   Fixes hidden 3-line icon caused by older .nav-toggle span rule.
   ========================================================= */
@media (max-width: 768px) {
    .site-header .nav-toggle > .hamburger-lines {
        display: inline-flex !important;
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        width: 22px !important;
        height: 18px !important;
        background: transparent !important;
        color: inherit !important;
        transform: none !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
    }

    .site-header .nav-toggle > .hamburger-lines > span {
        display: block !important;
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        width: 22px !important;
        height: 2px !important;
        min-height: 2px !important;
        background: #0f766e !important;
        border-radius: 999px !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }
}

/* Password visibility toggle */
.password-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 14px;
}
.password-wrapper input {
    margin-bottom: 0 !important;
    padding-right: 44px !important;
}
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 6px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted) !important;
    transition: color 0.18s ease;
    min-height: unset !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}
.toggle-password:hover {
    color: var(--ink) !important;
    background: none !important;
}
.toggle-password svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Clickable cards hover style */
.card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block !important;
}
.card-link:hover .card {
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow) !important;
    border-color: var(--primary) !important;
}

/* Global utility classes */
.is-hidden {
    display: none !important;
}

/* Responsive Form Grid for mobile */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
}

/* WhatsApp action button styling */
.action-stack .btn-wa {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
    background: #25d366;
    color: white !important;
    border: none;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.18s ease;
}

.action-stack .btn-wa:hover {
    background: #1ebe57;
}

/* Soft pastel card styles */
.donor-card-teal {
    background: #f0fdfa !important;
    border: 1px solid #ccfbf1 !important;
    border-radius: 12px !important;
}
.donor-card-teal h3 {
    color: #0f766e !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}
.donor-card-teal p {
    color: #475569 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

.donor-card-blue {
    background: #f0f9ff !important;
    border: 1px solid #e0f2fe !important;
    border-radius: 12px !important;
}
.donor-card-blue h3 {
    color: #0369a1 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}
.donor-card-blue p {
    color: #475569 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

.donor-card-purple {
    background: #faf5ff !important;
    border: 1px solid #f3e8ff !important;
    border-radius: 12px !important;
}
.donor-card-purple h3 {
    color: #7e22ce !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}
.donor-card-purple p {
    color: #475569 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

.donor-card-pink {
    background: #fdf2f8 !important;
    border: 1px solid #fbcfe8 !important;
    border-radius: 12px !important;
}
.donor-card-pink h3 {
    color: #db2777 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}
.donor-card-pink p {
    color: #475569 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

/* Clickable beneficiary name styles */
.beneficiary-history-link {
    color: #0f766e !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}
.beneficiary-history-link:hover {
    text-decoration: underline !important;
}

/* Equal height and styling for dashboard/exploration cards */
.grid-cards {
    align-items: stretch !important;
}
.grid-cards .card-link {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    text-decoration: none !important;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.grid-cards .card-link:hover {
    transform: translateY(-4px) !important;
}
.grid-cards .card-link .card {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    height: 100% !important;
    transition: box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.grid-cards .card-link:hover .card {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02) !important;
}
    justify-content: flex-start !important;
}

/* Specific styling for clickable dashboard and exploration cards to make them smaller and not bold */
.card-link .card p,
.card-link .card.donor-card-teal p,
.card-link .card.donor-card-blue p,
.card-link .card.donor-card-purple p,
.card-link .card.donor-card-pink p {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #475569 !important;
    line-height: 1.5 !important;
}

/* Modal styles moved from dashboard.php for global use */
.application-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 24px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
}

.application-modal.is-open {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-card {
    background: #fff;
    width: 100%;
    max-width: 780px;
    border-radius: 16px;
    margin: 32px auto;
    padding: 28px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.35);
    box-sizing: border-box;
    position: relative;
    flex-shrink: 0;
    align-self: flex-start;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.modal-header h3 {
    margin: 0 0 4px;
}

.modal-close {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}

/* ── Native <dialog> detail modal ── */
.detail-dialog {
    border: none;
    border-radius: 16px;
    padding: 0;
    margin: auto;
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.35);
    box-sizing: border-box;
}

.detail-dialog::backdrop {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.detail-dialog-inner {
    padding: 28px;
}

@media (max-width: 600px) {
    .detail-dialog {
        max-width: calc(100% - 24px);
        max-height: 95vh;
        border-radius: 12px;
    }
    .detail-dialog-inner {
        padding: 18px;
    }
}

/* Responsive adjustments for Applicant History Modal */
@media (max-width: 768px) {
    #applicant-history-modal .modal-card {
        width: 95% !important;
        max-height: 90vh !important;
    }
    #applicant-history-modal .modal-card > div:nth-child(2) {
        padding: 12px 16px !important;
    }
    #applicant-history-modal .modal-card > div:nth-child(2) > div:first-child {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }
    #applicant-history-modal .modal-card > div:nth-child(2) > div:first-child > div {
        padding: 8px 6px !important;
    }
    #applicant-history-modal .modal-card > div:nth-child(2) > div:first-child strong {
        font-size: 14px !important;
    }
    #applicant-history-modal .modal-card > div:nth-child(2) > div:first-child span {
        font-size: 9px !important;
    }
    #applicant-history-modal .modal-card > div:last-child {
        flex-direction: column !important;
        gap: 8px !important;
        padding: 12px 16px !important;
    }
    #applicant-history-modal .modal-card > div:last-child button {
        width: 100% !important;
        justify-content: center !important;
        padding: 10px !important;
        font-size: 13px !important;
    }
}

/* ==========================================
   Home Page Footer Styles
   ========================================== */
.site-footer-home {
    background: var(--sidebar); /* #12333a, beautiful deep teal */
    color: var(--white);
    padding: 64px 24px 32px;
    margin-top: 64px;
    font-size: 14px;
    border-top: 4px solid var(--primary); /* subtle teal top line */
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
    line-height: 1.2;
    display: inline-flex;
    flex-direction: column;
}

.footer-logo small {
    font-size: 11px;
    color: var(--primary-soft); /* light teal */
    font-weight: 500;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-tagline {
    color: #cbd5e1; /* soft grey */
    line-height: 1.6;
    max-width: 520px;
}

.footer-links-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-links-column h3 {
    font-size: 16px;
    color: var(--white);
    font-weight: 700;
    position: relative;
    padding-bottom: 8px;
}

.footer-links-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--primary);
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-list li a {
    color: #cbd5e1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s, transform 0.2s;
}

.footer-links-list li a:hover {
    color: #38bdf8; /* light blue or bright cyan */
    transform: translateX(4px);
}

.footer-icon {
    color: var(--primary-soft);
    flex-shrink: 0;
    transition: color 0.2s;
}

.footer-links-list li a:hover .footer-icon {
    color: #38bdf8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
}

.footer-bottom-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #94a3b8;
    font-size: 12px;
}

@media (max-width: 768px) {
    .site-footer-home {
        padding: 48px 16px 24px;
        margin-top: 40px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-bottom: 32px;
    }
    
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

/* Global Image Preview Lighbox Modal styles */
.preview-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.preview-modal.show {
    display: flex;
    opacity: 1;
}
.preview-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    object-fit: contain;
    border: 4px solid rgba(255,255,255,0.1);
}
.preview-modal.show .preview-modal-content {
    transform: scale(1);
}
.preview-modal-close {
    position: absolute;
    top: 24px;
    right: 32px;
    color: #f8fafc;
    font-size: 38px;
    font-weight: 700;
    transition: color 0.2s, transform 0.2s;
    cursor: pointer;
    line-height: 1;
    background: rgba(255,255,255,0.1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.preview-modal-close:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}
.preview-modal-close:active {
    transform: scale(0.95);
}
#modal-caption {
    margin: 12px auto;
    text-align: center;
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

