:root{
    --brand:#0d7a5c;
    --brand2:#073f34;
    --brand3:#0f5f4c;
    --gold:#d3a62d;
    --soft:#f2fbf7;
    --soft2:#e8f6ef;
    --line:#d7e9df;
    --text:#10251d;
    --muted:#64746d;
    --shadow:0 18px 45px rgba(13,122,92,.10);
}

/* =========================
   RESET
========================= */

*{
    box-sizing:border-box;
}

body{
    margin:0;
    font-family:system-ui,'Noto Sans Bengali',Arial,sans-serif;
    background:
        radial-gradient(circle at 8% 2%, rgba(211,166,45,.14), transparent 26%),
        linear-gradient(180deg,#f3fbf7 0%,#ffffff 42%,#f8fcfa 100%);
    color:var(--text);
    line-height:1.65;
}

/* Shared portal shell: both desktop layouts and compact mobile navigation. */
.portal-main{min-height:calc(100vh - 230px);padding-top:28px;padding-bottom:48px}.portal-footer{margin-top:36px;padding:24px 0;border-top:1px solid var(--line);background:rgba(255,255,255,.72)}.portal-footer__inner{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}.portal-footer strong,.portal-footer span{display:block}.portal-footer span,.portal-footer__links,.portal-footer__credit{color:var(--muted);font-size:13px}.portal-footer span{margin-top:4px}.portal-footer__links{display:flex;flex-wrap:wrap;gap:16px}.portal-footer__links a{color:var(--brand2);font-weight:700;text-decoration:none}.portal-footer__credit{padding-top:0}

/* =========================
   CONTAINER
========================= */

.wrap{
    max-width:100%;
    margin:auto;
    padding:18px 28px;
}

/* =========================
   HEADER
========================= */

.site-header{
    background:rgba(255,255,255,.94);
    border-top:4px solid var(--gold);
    border-bottom:1px solid rgba(215,233,223,.9);
    margin-bottom:18px;
    box-shadow:0 10px 30px rgba(7,63,52,.06);
    position:sticky;
    top:0;
    z-index:30;
    backdrop-filter:blur(12px);
}

.site-nav{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}

/* =========================
   LOGO
========================= */

.logo{
    display:flex;
    align-items:center;
    gap:14px;
    text-decoration:none;
    color:var(--brand2) !important;
    font-weight:900;
    font-size:34px;
    line-height:1;
    white-space:nowrap;
}

.logo img{
    height:52px;
    width:52px;
    object-fit:contain;
    display:block;
    transform:scale(1.15);
    transform-origin:center;
}
/* =========================
   NAVIGATION
========================= */

.top-nav{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.mobile-menu-toggle{
    display:none;
    width:44px;
    height:44px;
    padding:0;
    border-radius:10px;
    background:var(--brand2);
    box-shadow:none;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:5px;
}

.mobile-menu-toggle span{
    width:5px;
    height:5px;
    border-radius:50%;
    background:#fff;
    display:block;
}

.top-nav a{
    background:#f4fbf8;
    color:var(--brand2) !important;
    text-decoration:none;
    padding:10px 14px;
    font-weight:700;
    transition:.2s;
    border:1px solid #e1eee7;
    border-radius:999px;
}

.top-nav a:hover{
    background:var(--brand);
    color:#fff !important;
    border-color:var(--brand);
}

.top-nav form{
    margin:0;
}

.menu-btn,
.top-nav button{
    background:var(--gold);
    color:#fff !important;
    border:0;
    padding:10px 14px;
    font-weight:700;
    cursor:pointer;
    transition:.2s;
    border-radius:999px;
}

.menu-btn:hover,
.top-nav button:hover{
    background:#b98b16;
}

/* =========================
   ADMIN MENU
========================= */

.admin-menu-wrap{
    margin-bottom:20px;
}

.admin-menu{
    background:#fff;
    border:1px solid var(--line);
    border-radius:16px;
    padding:18px;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

/* =========================
   GRID
========================= */

.grid{
    display:grid;
    grid-template-columns:300px 1fr;
    gap:24px;
    align-items:start;
}

/* =========================
   CARD
========================= */

.card{
    background:rgba(255,255,255,.96);
    border:1px solid var(--line);
    border-radius:16px;
    padding:24px;
    margin-bottom:20px;
    box-shadow:var(--shadow);
}

.page{
    max-width:860px;
    margin-inline:auto;
}

/* =========================
   BUTTONS
========================= */

.btn,
button{
    background:var(--brand);
    color:white;
    border:0;
    border-radius:999px;
    padding:11px 18px;
    cursor:pointer;
    text-decoration:none;
    display:inline-block;
    font-weight:800;
    box-shadow:0 10px 24px rgba(13,122,92,.18);
    transition:.2s;
}

.btn.light{
    background:#fff;
    color:var(--brand2);
    border:1px solid var(--line);
    box-shadow:none;
}

.btn.google{
    width:100%;
    text-align:center;
    background:#fff;
    color:#1f2937;
    border:1px solid var(--line);
}

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

.danger-btn{
    background:#b42318;
    padding:7px 10px;
    margin-top:5px;
}

/* =========================
   FORM
========================= */

input:not([type=checkbox]):not([type=radio]),
select,
textarea{
    width:100%;
    padding:12px 13px;
    border:1px solid #cddbd4;
    border-radius:12px;
    margin:6px 0 14px;
    background:#fff;
    font:inherit;
}

input[type=checkbox],
input[type=radio]{
    width:16px;
    height:16px;
    margin:0;
    padding:0;
    vertical-align:middle;
    flex-shrink:0;
}

input:focus,
select:focus,
textarea:focus{
    outline:2px solid #bdebd6;
    border-color:var(--brand);
}

textarea{
    min-height:150px;
}

.wysiwyg-toolbar{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin:6px 0 0;
}

.wysiwyg-toolbar button{
    border-radius:8px;
    padding:7px 10px;
    box-shadow:none;
}

.wysiwyg-editor{
    min-height:260px;
    padding:13px;
    border:1px solid #cddbd4;
    border-radius:12px;
    margin:6px 0 14px;
    background:#fff;
}

.wysiwyg-editor:focus{
    outline:2px solid #bdebd6;
    border-color:var(--brand);
}

.wysiwyg-editor img,
.page-content img{
    max-width:100%;
    height:auto;
}

.page-content a{
    color:#0d6efd;
    text-decoration:underline;
}

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

.inline input{
    width:auto;
    margin:0;
}

.form-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:10px;
}

.form-card{
    max-width:760px;
}

.auth-card{
    max-width:520px;
    margin:35px auto;
}

/* =========================
   TYPOGRAPHY
========================= */

h1{
    margin-top:0;
    font-size:34px;
    line-height:1.1;
}

h2{
    margin-top:0;
    color:var(--brand2);
    font-size:28px;
    line-height:1.2;
}

.qtitle{
    font-size:17px;
    margin:0 0 8px;
}

.muted{
    color:var(--muted);
    font-size:14px;
}

.divider{
    text-align:center;
    color:var(--muted);
    margin:18px 0;
    position:relative;
}

/* =========================
   ALERT
========================= */

.alert{
    background:#e6fff3;
    border:1px solid #9fe0bd;
    border-radius:12px;
    padding:12px;
    margin:15px 0;
}

.alert.danger{
    background:#fff0f0;
    border-color:#ffc9c9;
}

/* =========================
   WAITING BOX
========================= */

.waiting{
    display:none;
    margin-top:15px;
    padding:15px;
    background:#eef8f1;
    border:1px solid #b7e0c2;
    border-radius:12px;
    color:#146c2e;
    font-weight:700;
}

/* =========================
   TABLE
========================= */

.admin-table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    background:#fff;
    border:1px solid var(--line);
    border-radius:14px;
    overflow:hidden;
}

.admin-table th,
.admin-table td{
    border-bottom:1px solid #e8f0eb;
    padding:10px;
    text-align:left;
    vertical-align:top;
}

.admin-table th{
    background:#f4fbf7;
    color:var(--brand2);
}

/* =========================
   PAGINATION
========================= */

.pagination-nav{
    margin:22px 0 8px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    flex-wrap:wrap;
}

.pagination-summary{
    color:var(--muted);
    font-size:14px;
    font-weight:700;
}

.pagination{
    display:flex;
    align-items:center;
    gap:7px;
    flex-wrap:wrap;
    margin:0;
    padding:0;
    list-style:none;
}

.page-link{
    min-width:38px;
    height:38px;
    padding:0 12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
    color:var(--brand2);
    text-decoration:none;
    font-weight:800;
    line-height:1;
    box-shadow:0 8px 18px rgba(13,122,92,.08);
}

.page-item:not(.disabled) .page-link:hover{
    background:var(--brand);
    border-color:var(--brand);
    color:#fff;
}

.page-item.active .page-link{
    background:var(--brand2);
    border-color:var(--brand2);
    color:#fff;
}

.page-item.disabled .page-link{
    background:#f3f7f5;
    color:#9aa7a1;
    box-shadow:none;
    cursor:not-allowed;
}

.simple-pagination{
    margin:22px 0 8px;
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.simple-pagination a,
.simple-pagination span{
    padding:9px 13px;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
    color:var(--brand2);
    text-decoration:none;
    font-weight:800;
}

.simple-pagination a:hover{
    background:var(--brand);
    border-color:var(--brand);
    color:#fff;
}

nav[role="navigation"][aria-label="Pagination Navigation"]:not(.pagination-nav){
    margin:22px 0 8px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    flex-wrap:wrap;
}

nav[role="navigation"][aria-label="Pagination Navigation"]:not(.pagination-nav) > div{
    display:flex;
    align-items:center;
    gap:12px;
}

nav[role="navigation"][aria-label="Pagination Navigation"]:not(.pagination-nav) .hidden{
    display:flex;
}

nav[role="navigation"][aria-label="Pagination Navigation"]:not(.pagination-nav) .sm\:hidden{
    display:none;
}

nav[role="navigation"][aria-label="Pagination Navigation"]:not(.pagination-nav) p{
    margin:0;
    color:var(--muted);
    font-size:14px;
    font-weight:700;
}

nav[role="navigation"][aria-label="Pagination Navigation"]:not(.pagination-nav) span[aria-current="page"] > span,
nav[role="navigation"][aria-label="Pagination Navigation"]:not(.pagination-nav) a,
nav[role="navigation"][aria-label="Pagination Navigation"]:not(.pagination-nav) span[aria-disabled="true"] > span{
    min-width:38px;
    height:38px;
    padding:0 12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
    color:var(--brand2);
    text-decoration:none;
    font-weight:800;
    line-height:1;
    box-shadow:0 8px 18px rgba(13,122,92,.08);
}

nav[role="navigation"][aria-label="Pagination Navigation"]:not(.pagination-nav) a:hover{
    background:var(--brand);
    border-color:var(--brand);
    color:#fff;
}

nav[role="navigation"][aria-label="Pagination Navigation"]:not(.pagination-nav) span[aria-current="page"] > span{
    background:var(--brand2);
    border-color:var(--brand2);
    color:#fff;
}

nav[role="navigation"][aria-label="Pagination Navigation"]:not(.pagination-nav) span[aria-disabled="true"] > span{
    background:#f3f7f5;
    color:#9aa7a1;
    box-shadow:none;
    cursor:not-allowed;
}

nav[role="navigation"][aria-label="Pagination Navigation"]:not(.pagination-nav) svg{
    width:18px;
    height:18px;
    display:block;
}

/* =========================
   STATS
========================= */

.stats{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
    gap:14px;
}

/* =========================
   FOOTER
========================= */

footer{
    border-top:1px solid var(--line);
    margin-top:40px;
    color:var(--muted);
    background:#fff;
}

/* =========================
   HOME
========================= */

.hero-card{
    padding:34px;
    overflow:hidden;
    position:relative;
    border-color:#cfe6da;
    background:
        linear-gradient(135deg,rgba(255,255,255,.98),rgba(241,250,246,.96)),
        radial-gradient(circle at 92% 18%,rgba(211,166,45,.16),transparent 28%);
}

.hero-card:before{
    content:"";
    position:absolute;
    inset:0 0 auto auto;
    width:190px;
    height:190px;
    border:1px solid rgba(13,122,92,.16);
    border-radius:0 0 0 100%;
    pointer-events:none;
}

.hero-kicker{
    display:inline-flex;
    align-items:center;
    color:var(--brand3);
    background:#edf8f3;
    border:1px solid #d8eee4;
    border-radius:999px;
    padding:5px 12px;
    font-size:13px;
    font-weight:800;
    margin-bottom:14px;
}

.hero-card h1{
    max-width:760px;
    margin-bottom:12px;
    font-size:42px;
    letter-spacing:0;
    color:var(--brand2);
}

.hero-lead{
    max-width:660px;
    margin:0 0 22px;
    color:var(--muted);
    font-size:17px;
}

.hero-search{
    position:relative;
    display:flex;
    align-items:center;
    gap:0;
    max-width:780px;
}

.hero-search input{
    margin:0;
    padding:16px 116px 16px 18px;
    border-radius:999px;
    box-shadow:inset 0 0 0 1px rgba(13,122,92,.04);
}

.hero-search button{
    position:absolute;
    right:7px;
    top:50%;
    transform:translateY(-50%);
    padding:10px 20px;
    border-radius:999px;
    box-shadow:none;
}

.hero-search button:hover{
    transform:translateY(-50%);
}

.hero-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:18px;
}

.sidebar-widget h3{
    margin-top:0;
    margin-bottom:14px;
    color:var(--brand2);
    font-size:20px;
}

.left-menu{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.left-menu a{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:12px 14px;
    border:1px solid #edf3ef;
    border-radius:12px;
    color:var(--brand2);
    background:#f8fcfa;
    text-decoration:none;
    font-weight:800;
    transition:.2s;
}

.left-menu a:hover{
    color:#fff;
    background:var(--brand);
    border-color:var(--brand);
}

.stat-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:0;
    overflow:hidden;
    border-radius:16px;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.28);
}

.stat-box{
    min-height:98px;
    padding:16px 10px;
    color:#fff;
    text-align:center;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.stat-box strong{
    font-size:34px;
    line-height:1;
    letter-spacing:1px;
}

.stat-box span{
    margin-top:8px;
    text-transform:uppercase;
    font-weight:800;
    font-size:13px;
}

.stat-green{background:#119a71;}
.stat-teal{background:#17b99a;}
.stat-yellow{background:#d8aa24;color:#fff;}
.stat-orange{background:#d47c23;}

.visit-box{
    background:#fff9d7;
    border:1px solid #f0df93;
    margin-top:16px;
    padding:16px;
    border-radius:14px;
    text-align:center;
}

.visit-box p{
    margin:4px 0;
}

.visit-box b{
    color:#e00000;
}

.category-link{
    display:flex;
    justify-content:space-between;
    gap:10px;
    padding:10px 0;
    color:var(--brand2);
    text-decoration:none;
    border-bottom:1px solid #edf3ef;
}

.category-link:hover{
    color:var(--brand);
}

.question-row{
    padding:14px 0;
    border-bottom:1px solid #edf3ef;
}

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

.question-row .qtitle{
    margin-bottom:3px;
    font-size:19px;
    line-height:1.35;
}

.question-row .qtitle a{
    color:#063f9f;
    text-decoration-thickness:1px;
    text-underline-offset:3px;
}

/* =========================
   MARKDOWN
========================= */

.markdown-body{
    font-size:16px;
    line-height:1.9;
    color:#111827;
}

.markdown-body p{
    margin:0 0 14px;
}

.markdown-body strong{
    font-weight:700;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4{
    margin:22px 0 10px;
    line-height:1.35;
    font-weight:700;
    color:#0f172a;
}

.markdown-body h1{font-size:24px;}
.markdown-body h2{font-size:21px;}
.markdown-body h3{font-size:18px;}
.markdown-body h4{font-size:17px;}

.markdown-body ul,
.markdown-body ol{
    margin:0 0 16px 24px;
    padding:0;
}

.markdown-body li{
    margin-bottom:8px;
}

.markdown-body blockquote{
    margin:16px 0;
    padding:12px 16px;
    border-left:4px solid #0d6efd;
    background:#f8fafc;
}

.markdown-body a{
    color:#0d6efd;
    text-decoration:underline;
}

.school-highlight{
    color:#dc2626;
    font-weight:900;
    background:#fff1f2;
    border:2px solid #dc2626;
    border-radius:6px;
    padding:2px 6px;
}

.publisher-filter{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:12px;
    align-items:end;
    margin:14px 0 20px;
}

.publisher-filter input{
    margin-bottom:0;
}

.table-scroll{
    overflow-x:auto;
}

.publisher-table th,
.publisher-table td{
    white-space:nowrap;
}

.publisher-table .muted{
    display:block;
    margin-top:4px;
    white-space:normal;
}

.answer-preview-card{
    box-shadow:none;
    background:#f8fcfa;
}

.admin-logout-form{
    margin:0;
}

.admin-logout-form button{
    margin:0;
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:900px){

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

    .top-nav{
        width:100%;
    }

    .top-nav a,
    .menu-btn,
    .top-nav button{
        flex:1 1 auto;
        text-align:center;
    }

}

@media(max-width:800px){

    .grid{
        grid-template-columns:1fr;
    }

    .wrap{
        padding:14px;
    }

    .card{
        padding:16px;
    }

    .admin-table{
        display:block;
        overflow-x:auto;
    }

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

    nav[role="navigation"][aria-label="Pagination Navigation"]:not(.pagination-nav){
        align-items:flex-start;
        flex-direction:column;
    }

    h1{
        font-size:30px;
    }

    .hero-card{
        padding:22px;
    }

    .hero-card h1{
        font-size:34px;
    }

    .hero-search input{
        padding-right:92px;
    }

    .hero-search button{
        padding:8px 13px;
    }

}

@media(max-width:600px){

    .site-nav{
        display:grid;
        grid-template-columns:1fr 44px;
        gap:12px;
        align-items:center;
    }

    .logo{
        font-size:24px;
    }

    .logo img{
        height:52px;
        width:52px;
        transform:scale(1.35);
    }

    .mobile-menu-toggle{
        display:flex;
        justify-self:end;
    }

    .top-nav{
        display:none;
        grid-column:1 / -1;
        grid-template-columns:1fr 1fr;
        gap:6px;
        width:100%;
    }

    .site-nav.menu-open .top-nav{
        display:grid;
    }

    .site-nav .translate-box{
        display:none;
        grid-column:1 / -1;
        width:100%;
        margin:2px 0 0;
    }

    .site-nav.menu-open .translate-box{
        display:flex;
    }

    .top-nav a,
    .top-nav button{
        width:100%;
        padding:12px 10px;
        font-size:14px;
        text-align:center;
    }

}

@media(max-width:420px){

    .logo{
        font-size:20px;
    }

    .logo img{
        height:46px;
        width:46px;
    }

    h1{
        font-size:28px;
    }

    .hero-card h1{
        font-size:30px;
    }

    .top-nav{
        grid-template-columns:1fr;
    }

}










/* =========================
   GOOGLE TRANSLATE
========================= */

.translate-box{
    display:flex;
    align-items:center;
    gap:8px;
    margin-left:12px;
}

.translate-label{
    color:var(--brand2);
    font-size:14px;
    font-weight:700;
    white-space:nowrap;
}

/* =========================
   UIS SCHOOL PORTAL
========================= */

.brand-copy{
    display:flex;
    flex-direction:column;
    gap:5px;
    min-width:0;
}

.brand-name{
    display:block;
    font-size:21px;
    line-height:1.05;
    letter-spacing:-.35px;
}

.brand-portal{
    display:block;
    width:max-content;
    padding:3px 10px;
    border-radius:999px;
    background:var(--gold);
    color:#fff;
    font-size:11px;
    line-height:1.2;
    letter-spacing:1.8px;
    text-transform:uppercase;
}

.portal-home main.wrap{
    max-width:1220px;
}

.portal-hero{
    position:relative;
    isolation:isolate;
    min-height:440px;
    overflow:hidden;
    display:grid;
    grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);
    align-items:center;
    gap:30px;
    padding:58px 64px;
    border:1px solid rgba(13,122,92,.18);
    border-radius:28px;
    background:
        radial-gradient(circle at 82% 18%,rgba(255,221,92,.32),transparent 27%),
        linear-gradient(135deg,#effaf5 0%,#fffdf4 54%,#e9f7f0 100%);
    box-shadow:0 28px 70px rgba(7,63,52,.13);
}

.portal-hero:before,
.portal-hero:after{
    content:"";
    position:absolute;
    z-index:-1;
    border-radius:50%;
    border:1px solid rgba(13,122,92,.13);
}

.portal-hero:before{
    width:420px;
    height:420px;
    right:-120px;
    top:-155px;
}

.portal-hero:after{
    width:250px;
    height:250px;
    right:52px;
    bottom:-150px;
}

.portal-hero-copy{
    position:relative;
    z-index:1;
}

.portal-eyebrow{
    display:inline-flex;
    padding:7px 13px;
    margin-bottom:17px;
    border:1px solid rgba(13,122,92,.2);
    border-radius:999px;
    background:rgba(255,255,255,.75);
    color:var(--brand3);
    font-size:12px;
    font-weight:900;
    letter-spacing:1.4px;
    text-transform:uppercase;
}

.portal-hero h1{
    max-width:710px;
    margin:0;
    color:var(--brand2);
    font-family:Georgia,'Times New Roman',serif;
    font-size:52px;
    line-height:1.08;
    letter-spacing:-1.2px;
}

.portal-hero h2{
    margin:11px 0 17px;
    color:var(--gold);
    font-size:25px;
    line-height:1.2;
    letter-spacing:2.8px;
    text-transform:uppercase;
}

.portal-hero p{
    max-width:650px;
    margin:0;
    color:#49645a;
    font-size:18px;
}

.scan-cta{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    width:100%;
    max-width:460px;
    margin-top:24px;
    padding:20px 24px;
    font-size:19px;
    font-weight:900;
    text-align:center;
    border-radius:18px;
    background:linear-gradient(135deg,#0d7a5c,#08382c);
    color:#fff;
    box-shadow:0 16px 34px rgba(13,122,92,.38);
}
.scan-cta:hover{
    transform:translateY(-1px);
}

.portal-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:28px;
}

.portal-actions .btn{
    padding:13px 21px;
}

.portal-quick-actions{
    margin-top:24px;
    padding:22px 26px;
    border:1px solid rgba(13,122,92,.16);
    border-radius:20px;
    background:#fff;
    box-shadow:0 12px 30px rgba(7,63,52,.06);
}

.portal-quick-actions-row{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:12px;
}

.portal-hero-mark{
    position:relative;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    min-height:315px;
}

.portal-hero-mark:before{
    content:"";
    position:absolute;
    inset:20px;
    border-radius:50%;
    background:rgba(255,255,255,.7);
    box-shadow:0 24px 55px rgba(7,63,52,.14),inset 0 0 0 1px rgba(13,122,92,.12);
}

.portal-hero-mark img{
    position:relative;
    width:min(245px,90%);
    aspect-ratio:1;
    object-fit:contain;
    filter:drop-shadow(0 18px 22px rgba(7,63,52,.16));
}

.portal-hero-mark strong{
    position:relative;
    margin-top:-3px;
    color:var(--brand2);
    font-size:13px;
    letter-spacing:5px;
}

.portal-section{
    margin-top:28px;
    padding:34px;
    border:1px solid var(--line);
    border-radius:24px;
    background:#fff;
    box-shadow:var(--shadow);
}

.portal-section-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:24px;
    margin-bottom:23px;
}

.portal-section-head span{
    color:var(--gold);
    font-size:12px;
    font-weight:900;
    letter-spacing:1.2px;
    text-transform:uppercase;
}

.portal-section-head h2{
    margin:3px 0 0;
    color:var(--brand2);
    font-size:30px;
}

.portal-section-head p{
    max-width:420px;
    margin:0;
    color:var(--muted);
    text-align:right;
}

.portal-modules{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:15px;
}

.portal-module{
    min-height:220px;
    display:flex;
    flex-direction:column;
    padding:23px;
    border:1px solid #dfede6;
    border-radius:18px;
    background:linear-gradient(155deg,#fff,#f5fbf8);
    color:var(--text);
    text-decoration:none;
    transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;
}

a.portal-module:hover{
    transform:translateY(-5px);
    border-color:rgba(13,122,92,.38);
    box-shadow:0 18px 35px rgba(7,63,52,.11);
}

.portal-module.diary-module{
    background:linear-gradient(150deg,var(--brand2),#0d7a5c);
    color:#fff;
    border-color:transparent;
}

.module-symbol{
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    margin-bottom:24px;
    border-radius:12px;
    background:rgba(211,166,45,.17);
    color:var(--gold);
    font-size:13px;
    font-weight:900;
}

.diary-module .module-symbol{
    background:rgba(255,255,255,.14);
    color:#ffe58d;
}

.portal-module strong{
    margin-bottom:7px;
    font-size:21px;
    line-height:1.25;
}

.portal-module > span:not(.module-symbol){
    color:var(--muted);
    font-size:14px;
}

.diary-module > span:not(.module-symbol){
    color:rgba(255,255,255,.75);
}

.portal-module b{
    margin-top:auto;
    padding-top:20px;
    color:var(--brand3);
    font-size:13px;
}

/* =========================
   ADMIN HOME: icon grid + charts
========================= */

.admin-home{
    display:grid;
    grid-template-columns:minmax(0,1.55fr) minmax(280px,.9fr);
    gap:22px;
    align-items:start;
}

.admin-icon-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    background:#fff;
    border:1px solid var(--line);
    border-radius:20px;
    box-shadow:var(--shadow);
    overflow:hidden;
}

.admin-icon-tile{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:20px 10px;
    text-decoration:none;
    color:var(--text);
    text-align:center;
    border-right:1px solid var(--line);
    border-bottom:1px solid var(--line);
    transition:background .15s ease;
}

.admin-icon-grid .admin-icon-tile:nth-child(4n){
    border-right:none;
}

.admin-icon-tile:hover{
    background:var(--soft);
}

.admin-icon-tile__badge{
    width:58px;
    height:58px;
    border-radius:16px;
    display:grid;
    place-items:center;
    font-size:26px;
    color:#fff;
    box-shadow:0 10px 20px rgba(7,63,52,.18);
}

.admin-icon-tile__label{
    font-size:12px;
    font-weight:700;
    line-height:1.3;
}

.admin-side-panel{
    display:flex;
    flex-direction:column;
    gap:16px;
}

.admin-stat-row{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
}

.admin-stat-card{
    padding:16px 14px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:16px;
    box-shadow:var(--shadow);
    text-align:center;
}

.admin-stat-card strong{
    display:block;
    font-size:24px;
    color:var(--brand2);
}

.admin-stat-card span{
    font-size:12px;
    color:var(--muted);
}

.admin-chart-card{
    padding:18px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    box-shadow:var(--shadow);
}

.admin-chart-card h3{
    margin:0 0 10px;
    font-size:14px;
    color:var(--brand2);
}

.admin-chart-card canvas{
    max-height:220px;
}

@media(max-width:1024px){
    .admin-home{
        grid-template-columns:1fr;
    }
}

@media(max-width:700px){
    .admin-icon-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

    .admin-icon-grid .admin-icon-tile:nth-child(4n){
        border-right:1px solid var(--line);
    }

    .admin-icon-grid .admin-icon-tile:nth-child(3n){
        border-right:none;
    }

    .admin-stat-row{
        grid-template-columns:repeat(3,1fr);
    }
}

@media(max-width:420px){
    .admin-icon-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .admin-icon-grid .admin-icon-tile:nth-child(3n){
        border-right:1px solid var(--line);
    }

    .admin-icon-grid .admin-icon-tile:nth-child(2n){
        border-right:none;
    }

    .admin-icon-tile__badge{
        width:52px;
        height:52px;
        font-size:22px;
    }
}

.diary-module b{
    color:#ffe58d;
}

.portal-note{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:15px;
    margin:28px 0 10px;
    padding:22px;
    border-radius:18px;
    background:#eef8f3;
    text-align:left;
}

.portal-note img{
    width:54px;
    height:54px;
    object-fit:contain;
}

.portal-note strong,
.portal-note span{
    display:block;
}

.portal-note strong{
    color:var(--brand2);
    font-size:17px;
}

.portal-note span{
    color:var(--muted);
    font-size:14px;
}

@media(max-width:900px){
    .portal-hero{
        grid-template-columns:1fr minmax(210px,.45fr);
        padding:42px;
    }

    .portal-hero h1{
        font-size:42px;
    }

    .portal-hero-mark{
        min-height:240px;
    }

    .portal-modules{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:600px){
    .site-nav{
        display:flex;
        flex-direction:column;
        align-items:stretch;
    }

    .logo{
        gap:10px;
        white-space:normal;
    }

    .logo img{
        width:48px;
        height:48px;
        transform:none;
    }

    .brand-name{
        font-size:17px;
    }

    .brand-portal{
        font-size:9px;
    }

    .top-nav{
        display:flex;
    }

    .portal-hero{
        min-height:auto;
        grid-template-columns:1fr;
        padding:30px 22px;
        border-radius:21px;
    }

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

    .portal-hero h2{
        font-size:18px;
        letter-spacing:1.7px;
    }

    .portal-hero p{
        font-size:16px;
    }

    .portal-hero-mark{
        min-height:230px;
        order:-1;
    }

    .portal-hero-mark img{
        width:190px;
    }

    .portal-actions .btn{
        flex:1 1 100%;
        text-align:center;
    }

    .portal-section{
        padding:22px 16px;
        border-radius:20px;
    }

    .portal-section-head{
        align-items:flex-start;
        flex-direction:column;
        gap:8px;
    }

    .portal-section-head p{
        text-align:left;
    }

    .portal-modules{
        grid-template-columns:1fr;
    }

    .portal-module{
        min-height:190px;
    }
}

#google_translate_element{
    position:relative;
}

.goog-te-gadget{
    font-size:0 !important;
}

.goog-te-gadget .goog-te-combo{
    background:#ffffff;
    color:#08382c;
    border:1px solid #dce9e2;
    border-radius:10px;
    padding:8px 12px;
    font-size:14px !important;
    font-weight:600;
    cursor:pointer;
    min-width:130px;
    max-width:160px;
    box-shadow:0 3px 10px rgba(0,0,0,.08);
    outline:none;
}

.goog-te-gadget .goog-te-combo:hover{
    border-color:#d4a017;
}

.goog-logo-link,
.goog-te-gadget span{
    display:none !important;
}

.goog-te-banner-frame,
.skiptranslate iframe{
    display:none !important;
}

body{
    top:0 !important;
}

@media(max-width:700px){

    .translate-box{
        width:100%;
        margin:10px 0 0;
    }

    .translate-label{
        width:70px;
        font-size:13px;
    }

    #google_translate_element{
        flex:1;
    }

    .goog-te-gadget{
        width:100%;
    }

    .goog-te-gadget .goog-te-combo{
        width:100% !important;
        max-width:100% !important;
    }
}

/* =========================
   CONCEPT A LIGHT REFINEMENT
========================= */

.hero-card{
    text-align:center;
    min-height:270px;
    padding:54px 32px 38px;
    margin-bottom:24px;
    border:0;
    box-shadow:none;
    background: linear-gradient(160deg,#eef8f3,#f7fcf9 55%,#e8f6ef);
    position:relative;
}

.hero-card:before{
    width:260px;
    height:180px;
    right:0;
    bottom:0;
    top:auto;
    border:0;
    border-radius:160px 160px 0 0;
    background:
        linear-gradient(90deg,transparent 0 18%,rgba(7,63,52,.18) 18% 20%,transparent 20% 38%,rgba(7,63,52,.14) 38% 40%,transparent 40% 60%,rgba(7,63,52,.14) 60% 62%,transparent 62% 80%,rgba(7,63,52,.18) 80% 82%,transparent 82%),
        radial-gradient(circle at 50% 58%,rgba(211,166,45,.20),transparent 34%);
    opacity:.45;
}

.hero-card h1{
    margin-inline:auto;
    font-family:Georgia,'Times New Roman',serif;
    font-size:36px;
}

.hero-lead{
    margin-inline:auto;
    font-family:Georgia,'Times New Roman',serif;
    color:var(--brand2);
}

.hero-search{
    margin:18px auto 0;
    padding:8px;
    background:#fff;
    border:1px solid #dce9e2;
    border-radius:16px;
    box-shadow:0 14px 32px rgba(7,63,52,.12);
}

.hero-search input{
    border:0;
    border-radius:10px;
    padding:14px 116px 14px 14px;
}

.hero-chips{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:10px;
    margin-top:18px;
}

.hero-chips a{
    min-width:84px;
    padding:8px 16px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    color:var(--brand2);
    text-decoration:none;
    font-weight:700;
    box-shadow:0 8px 18px rgba(7,63,52,.06);
}

.content-grid{
    display:grid;
    grid-template-columns:minmax(0,1.55fr) minmax(280px,.95fr);
    gap:20px;
}

.section-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding-bottom:14px;
    border-bottom:1px solid #edf3ef;
}

.section-head h2,
.sidebar-widget h3{
    display:flex;
    align-items:center;
    gap:10px;
}

.section-head a{
    color:var(--brand2);
    text-decoration:none;
    font-weight:700;
    white-space:nowrap;
}

.section-icon,
.cat-icon,
.question-icon,
.ask-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    border:1px solid #cfe8dc;
    background:#ecf8f2;
    color:var(--brand);
}

.section-icon{
    width:28px;
    height:28px;
    border-radius:8px;
}

.section-icon:before{
    content:"";
    width:12px;
    height:12px;
    border:2px solid currentColor;
    border-radius:3px;
    box-shadow:4px 4px 0 -1px #ecf8f2,4px 4px 0 0 currentColor;
}

.categories-widget{
    padding:20px;
}

.category-link{
    align-items:center;
    padding:10px 0;
}

.cat-name{
    display:flex;
    align-items:center;
    gap:0;
    min-width:0;
}

.cat-icon{
    display:none;
}

.category-link b{
    min-width:34px;
    padding:2px 8px;
    border-radius:999px;
    background:#e8f3ee;
    color:var(--brand2);
    text-align:center;
    font-size:13px;
}

.view-all-link{
    display:flex;
    justify-content:center;
    margin-top:12px;
    padding:10px 12px;
    border:1px solid var(--brand);
    border-radius:8px;
    color:var(--brand2);
    text-decoration:none;
    font-weight:800;
}

.question-meta{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    color:var(--muted);
    font-size:14px;
}

.popular-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    align-items:center;
    padding:13px 0;
    border-bottom:1px solid #edf3ef;
}

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

.popular-row a{
    color:var(--text);
    text-decoration:none;
    font-weight:700;
    line-height:1.4;
}

.popular-row b{
    color:var(--muted);
    font-size:13px;
}

.question-icon{
    display:none;
}

.ask-panel{
    display:grid;
    grid-template-columns:54px minmax(0,1fr);
    gap:18px;
    align-items:center;
    padding:24px;
    border-radius:14px;
    background:linear-gradient(135deg,#087456,#0c8f6b);
    color:#fff;
    box-shadow:var(--shadow);
}

.ask-panel h2{
    margin:0;
    color:#fff;
    font-size:24px;
}

.ask-panel p{
    margin:4px 0 0;
}

.ask-icon{
    width:54px;
    height:54px;
    border:3px solid rgba(255,255,255,.82);
    background:transparent;
    color:#fff;
    border-radius:12px;
}

.ask-icon:before{
    content:"?";
    font-weight:900;
    font-size:26px;
}

.ask-panel .btn.light{
    grid-column:1 / -1;
    justify-self:end;
    border-color:#fff;
    color:var(--brand2);
    white-space:nowrap;
    max-width:100%;
}

@media(max-width:980px){
    .content-grid{
        grid-template-columns:1fr;
    }

    .ask-panel{
        grid-template-columns:48px 1fr;
    }

    .ask-panel .btn{
        grid-column:1 / -1;
        text-align:center;
    }
}

@media(max-width:600px){
    .hero-card{
        padding:30px 16px 24px;
        min-height:auto;
        text-align:left;
        background: linear-gradient(160deg,#eef8f3,#f7fcf9 55%,#e8f6ef);
    }

    .hero-card h1{
        font-size:28px;
        max-width:100%;
    }

    .hero-lead{
        margin-inline:0;
        max-width:100%;
    }

    .hero-search{
        padding:6px;
        border-radius:14px;
        max-width:100%;
    }

    .hero-search input{
        padding:13px 88px 13px 12px;
        font-size:15px;
    }

    .hero-search button{
        right:6px;
        padding:8px 12px;
        font-size:14px;
    }

    .hero-chips a{
        min-width:auto;
        flex:1 1 44%;
        text-align:center;
    }

    .content-grid{
        gap:16px;
    }

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

    .popular-row{
        grid-template-columns:minmax(0,1fr) auto;
    }

    .popular-row b{
        grid-column:auto;
    }

    .ask-panel{
        grid-template-columns:42px 1fr;
        padding:18px;
        gap:12px;
    }

    .ask-icon{
        width:42px;
        height:42px;
    }

    .ask-panel h2{
        font-size:21px;
    }
}


/* =========================
   MOBILE ADMIN & DIARY
========================= */
@media(max-width:600px){
    .site-nav{
        display:grid;
        grid-template-columns:minmax(0,1fr) 44px;
        flex-direction:initial;
        gap:12px;
        align-items:center;
    }

    .site-nav .logo{
        min-width:0;
        white-space:normal;
    }

    .mobile-menu-toggle{
        display:flex;
        justify-self:end;
    }

    .top-nav{
        display:none;
        grid-column:1 / -1;
        grid-template-columns:1fr 1fr;
        gap:8px;
        width:100%;
        padding-top:3px;
    }

    .site-nav.menu-open .top-nav{
        display:grid;
    }

    .top-nav a,
    .top-nav button,
    .top-nav form{
        width:100%;
        min-width:0;
        margin:0;
    }

    .top-nav a,
    .top-nav button{
        min-height:46px;
        display:flex;
        align-items:center;
        justify-content:center;
        padding:10px;
        border-radius:12px;
        font-size:14px;
        line-height:1.2;
    }

    .admin-menu-wrap{
        margin-bottom:14px;
    }

    .admin-menu{
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:8px;
        padding:10px;
        border-radius:14px;
    }

    .admin-menu .btn,
    .admin-menu .admin-logout-form{
        width:100%;
        margin:0;
    }

    .admin-menu .btn{
        min-height:44px;
        display:flex;
        align-items:center;
        justify-content:center;
        padding:9px;
        border-radius:10px;
        font-size:13px;
        text-align:center;
        line-height:1.2;
    }

    .admin-menu .admin-logout-form button{
        width:100%;
    }

    .diary-entry-brand{
        align-items:flex-start;
        gap:10px;
        margin-bottom:14px;
    }

    .diary-entry-brand img{
        width:46px;
        height:46px;
        flex:0 0 46px;
    }

    .diary-entry-brand h1{
        font-size:25px;
        line-height:1.2;
    }

    .diary-entry-card{
        padding:16px 14px;
    }

    .diary-entry-form .form-grid{
        gap:2px;
    }

    .diary-entry-form input,
    .diary-entry-form select,
    .diary-entry-form textarea{
        margin-bottom:12px;
        min-height:46px;
        font-size:16px;
    }

    .diary-entry-form textarea{
        min-height:210px;
    }

    .form-actions{
        position:sticky;
        bottom:8px;
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:8px;
        padding:10px 0 2px;
        background:linear-gradient(180deg,rgba(255,255,255,.75),#fff 35%);
    }

    .form-actions .btn,
    .form-actions button{
        min-height:48px;
        display:flex;
        align-items:center;
        justify-content:center;
        padding:10px;
        text-align:center;
    }

    .table-scroll,
    .admin-table{
        -webkit-overflow-scrolling:touch;
    }
}

@media(max-width:380px){
    .top-nav,
    .admin-menu,
    .form-actions{
        grid-template-columns:1fr;
    }
}
