@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');

/* =========================================================
   NSO — Redesign theo phong cách nsokudo.com
   Giữ nguyên toàn bộ class/id đang được các file PHP sử dụng
   để không phải sửa logic backend, chỉ thay giao diện.
   ========================================================= */

:root{
    --bg:#0a0d12;
    --bg-alt:#10151d;
    --surface:#161d28;
    --surface-2:#1d2632;
    --line:#26303e;
    --flame:#ff5a36;
    --flame-dim:rgba(255,90,54,.14);
    --gold:#ffb443;
    --teal:#19c9b6;
    --text:#ece8e1;
    --text-dim:#8d99a8;
    --danger:#ff4d4d;
    --success:#3ddc84;
    --radius:14px;
}

*{ box-sizing:border-box; }

body{
    margin:0;
    padding:0;
    background:var(--bg);
    color:var(--text);
    font-family:'Be Vietnam Pro', Arial, sans-serif;
    font-size:15px;
    line-height:1.6;
}

body::before{
    content:"";
    position:fixed;
    inset:0;
    background:
        radial-gradient(circle at 85% 0%, rgba(255,90,54,.10), transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(25,201,182,.08), transparent 45%),
        var(--bg);
    z-index:-1;
}

a{ text-decoration:none; color:inherit; }
h1,h2,h3,h4,h5{ font-family:'Oswald', sans-serif; letter-spacing:.02em; }

/* ---------- Layout wrapper ---------- */
.site-wrapper{
    width:100%;
    max-width:1180px;
    margin:0 auto;
    min-height:100vh;
    background:transparent;
    border:0;
    padding:0 20px;
    box-shadow:none;
}

/* ---------- Header ---------- */
.site-header{
    text-align:left;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:14px 22px;
    padding:16px 0;
    border-bottom:1px solid var(--line);
    position:sticky;
    top:0;
    z-index:50;
    background:rgba(10,13,18,.92);
    backdrop-filter:blur(10px);
    margin:0 -20px;
    padding-left:20px;
    padding-right:20px;
}

.brand{
    display:inline-flex;
    align-items:center;
    justify-content:flex-start;
    min-height:auto;
    margin:0;
    order:1;
}

.brand img{
    max-width:180px;
    max-height:56px;
}

.brand-text{
    display:inline-block;
    padding:0;
    border-radius:0;
    background:none;
    border:0;
    color:var(--text);
    font-family:'Oswald', sans-serif;
    font-size:26px;
    line-height:1;
    font-weight:700;
    letter-spacing:.08em;
    text-shadow:none;
}
.brand-text::after{
    content:'.';
    color:var(--flame);
}

.main-nav{
    order:3;
    flex-basis:100%;
    padding:0;
    margin:0;
    border:0;
    display:flex;
    flex-wrap:wrap;
    gap:4px 22px;
}

.main-nav a{
    display:inline-block;
    margin:0;
    padding:8px 0;
    border-radius:0;
    background:none;
    color:var(--text-dim) !important;
    font-weight:600;
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:.05em;
    border:0;
    box-shadow:none;
    position:relative;
}
.main-nav a::after{
    content:'';
    position:absolute; left:0; bottom:2px; width:0; height:2px;
    background:var(--flame);
    transition:width .2s;
}
.main-nav a:hover{ filter:none; color:var(--text) !important; }
.main-nav a:hover::after{ width:100%; }

.account-bar{
    order:2;
    margin:0 0 0 auto;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.brown-btn{
    display:inline-flex;
    align-items:center;
    margin:0;
    padding:9px 16px;
    border-radius:8px;
    background:var(--surface);
    color:var(--text) !important;
    font-weight:600;
    font-size:13px;
    border:1px solid var(--line);
    box-shadow:none;
    transition:border-color .2s, color .2s;
}
.brown-btn:hover{
    filter:none;
    border-color:var(--flame);
    color:var(--flame) !important;
}

.download-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:auto;
    margin:0;
    padding:9px 18px;
    border-radius:8px;
    background:linear-gradient(180deg, var(--flame), #d8431f);
    color:#fff !important;
    font-size:13px;
    font-weight:700;
    letter-spacing:.03em;
    text-transform:uppercase;
    border:0;
    box-shadow:0 6px 16px -6px rgba(255,90,54,.7);
    order:2;
}
.download-btn:hover{ filter:brightness(1.06); }

/* Mobile nav toggle */
.nav-toggle{
    display:none;
    order:0;
    width:38px; height:38px;
    border-radius:8px;
    border:1px solid var(--line);
    background:var(--surface);
    color:var(--text);
    align-items:center;
    justify-content:center;
    margin-left:auto;
}

/* ---------- Hero banner (homepage) ---------- */
.hero-banner{
    position:relative;
    margin:20px 0;
    border-radius:16px;
    overflow:hidden;
    border:1px solid var(--line);
    min-height:280px;
    display:flex;
    align-items:center;
}
.hero-slide{
    position:absolute; inset:0; opacity:0; transition:opacity 1s ease;
}
.hero-slide.active{ opacity:1; }
.hero-slide:nth-child(1){ background:radial-gradient(circle at 80% 30%, #24303f 0%, #0a0d12 65%); }
.hero-slide:nth-child(2){ background:radial-gradient(circle at 75% 60%, #2a1a1a 0%, #0a0d12 65%); }
.hero-slide:nth-child(3){ background:radial-gradient(circle at 70% 40%, #1a2a28 0%, #0a0d12 65%); }
.hero-content{
    position:relative; z-index:2;
    padding:44px 40px;
    max-width:560px;
}
.hero-eyebrow{
    display:inline-flex; align-items:center; gap:8px;
    color:var(--gold); font-weight:700; font-size:12px; text-transform:uppercase;
    letter-spacing:.12em; margin-bottom:14px;
}
.hero-eyebrow .dot{ width:7px; height:7px; border-radius:50%; background:var(--flame); animation:pulse 1.6s infinite; }
@keyframes pulse{ 0%,100%{opacity:1;} 50%{opacity:.25;} }
.hero-content h1{
    font-size:clamp(28px,4vw,42px);
    margin:0 0 12px;
    text-transform:uppercase;
}
.hero-content h1 span{ color:var(--flame); }
.hero-content p{ color:var(--text-dim); margin:0 0 22px; font-size:14px; }
.hero-dots{ position:absolute; z-index:3; bottom:18px; left:40px; display:flex; gap:8px; }
.hero-dots button{ width:22px; height:4px; border-radius:2px; background:var(--line); border:0; padding:0; cursor:pointer; }
.hero-dots button.active{ background:var(--flame); }

/* ---------- Boxes / cards (dùng chung mọi trang) ---------- */
.welcome-box,
.news-box,
.account-menu,
.container,
.form-signin,
.form-signup{
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:22px;
    margin-bottom:20px;
}

.container .container,
.container .form-signin,
.container .form-signup{
    border:0;
    background:transparent;
    padding:0;
}

.welcome-title,
.box-title{
    text-align:left;
    color:var(--text);
    font-weight:700;
    padding-bottom:12px;
    margin-bottom:16px;
    border-bottom:1px solid var(--line);
    text-transform:uppercase;
    font-family:'Oswald', sans-serif;
    letter-spacing:.03em;
    font-size:17px;
    display:flex;
    align-items:center;
    gap:10px;
}
.welcome-title::before,
.box-title::before{
    content:'';
    width:8px; height:8px; border-radius:2px;
    background:var(--flame);
    display:inline-block;
    transform:rotate(45deg);
}

.welcome-text{ text-align:left; margin:0; color:var(--text-dim); }

.notice-alert{
    background:var(--flame-dim);
    border:1px solid rgba(255,90,54,.4);
    border-radius:10px;
    padding:12px 14px;
    text-align:left;
    margin-top:14px;
    font-size:13px;
}
.notice-alert a{ color:var(--gold); font-weight:700; }

/* ---------- News list ---------- */
.news-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:14px 0;
    border-bottom:1px dashed var(--line);
}
.news-item:last-of-type{ border-bottom:0; }

.news-content a,
.link-list a{ color:var(--text); font-weight:700; font-size:14px; }
.news-content a:hover,
.link-list a:hover{ color:var(--flame); }

.news-content p{ margin:5px 0 0; color:var(--text-dim); font-size:12.5px; }

.news-item img{
    width:64px; height:52px; border-radius:8px; object-fit:cover; flex:0 0 auto;
    filter:brightness(.9);
}

.link-list a{
    display:block;
    padding:10px 0;
    border-bottom:1px dashed var(--line);
    font-size:13px;
    font-weight:600;
    color:var(--text-dim) !important;
}
.link-list a:last-child{ border-bottom:0; }

/* ---------- Quick action cards ---------- */
.quick-grid{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:16px;
    margin-bottom:20px;
}

.quick-card{
    display:flex;
    min-height:140px;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    gap:8px;
    text-align:left;
    color:var(--text);
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:20px;
    transition:transform .2s, border-color .2s;
}
.quick-card:hover{ transform:translateY(-3px); border-color:var(--flame); }

.quick-card i{
    color:var(--flame);
    font-size:22px;
    width:42px; height:42px;
    display:flex; align-items:center; justify-content:center;
    background:var(--flame-dim);
    border-radius:10px;
    margin-bottom:4px;
}

.quick-card b{
    color:var(--text);
    font-family:'Oswald', sans-serif;
    text-transform:uppercase;
    font-size:14px;
    letter-spacing:.02em;
}

.quick-card span{ font-size:12.5px; color:var(--text-dim); }

.note-box p{ margin:10px 0; line-height:1.6; color:var(--text-dim); font-size:13px; }
.note-box .box-title::before{ background:var(--gold); }

/* ---------- Post cards (bài viết) ---------- */
.post-card{
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:12px;
    padding:18px;
    margin:0 0 14px;
}
.post-card:last-child{ margin-bottom:0; }
.post-card h2{
    margin:0 0 8px;
    color:var(--text);
    font-size:17px;
    font-weight:700;
    text-transform:none;
}
.post-card p{ margin:0; color:var(--text-dim); line-height:1.6; font-size:13.5px; }

.empty-box{
    text-align:center;
    padding:26px;
    font-weight:600;
    color:var(--text-dim);
}

/* ---------- Account menu (sidebar) ---------- */
.account-menu{ display:grid; gap:8px; padding:14px; }
.account-menu a{
    display:flex;
    align-items:center;
    padding:11px 14px;
    border-radius:9px;
    background:var(--surface-2);
    border:1px solid var(--line);
    color:var(--text-dim);
    font-weight:600;
    font-size:13.5px;
    transition:background .2s, color .2s, border-color .2s;
}
.account-menu a.active,
.account-menu a:hover{
    background:var(--flame);
    color:#fff;
    border-color:var(--flame);
}

/* ---------- Bootstrap overrides để đồng bộ theme ---------- */
.btn-primary,
.nav-pills .nav-link.active,
.list-group-item.active{
    background-color:var(--flame) !important;
    border-color:var(--flame) !important;
    color:#fff !important;
    font-weight:700;
}
.btn-primary:hover{ background-color:#e04a29 !important; border-color:#e04a29 !important; }

.btn-outline-primary,
.nav-link{ color:var(--gold); border-color:var(--line); }
.btn-outline-primary:hover{
    background-color:var(--flame) !important;
    border-color:var(--flame) !important;
    color:#fff !important;
}

.form-control{
    background:var(--surface-2);
    border:1px solid var(--line);
    color:var(--text);
    padding:11px 14px;
    border-radius:8px;
    margin-bottom:12px;
}
.form-control::placeholder{ color:var(--text-dim); }
.form-control:focus{
    background:var(--surface-2);
    color:var(--text);
    border-color:var(--flame);
    box-shadow:0 0 0 .2rem rgba(255,90,54,.15);
}

.table{ color:var(--text); border-color:var(--line); }
.table th, .table td{ border-color:var(--line) !important; vertical-align:middle; }

.alert-danger{ background:rgba(255,77,77,.12); border-color:rgba(255,77,77,.4); color:#ff9b9b; }
.alert-success{ background:rgba(61,220,132,.12); border-color:rgba(61,220,132,.4); color:var(--success); }
.alert-info{ background:var(--flame-dim); border-color:rgba(255,90,54,.4); color:var(--gold); }

.card{ background:var(--surface); border:1px solid var(--line); color:var(--text); }

/* ---------- Danh mục bài viết (thongbao.php) ---------- */
.cat-tabs{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:20px;
}
.cat-tabs a{
    padding:9px 16px;
    border-radius:8px;
    background:var(--surface);
    border:1px solid var(--line);
    color:var(--text-dim);
    font-weight:600;
    font-size:13px;
    transition:border-color .2s, color .2s;
}
.cat-tabs a:hover{
    border-color:var(--flame);
    color:var(--flame);
}

.cat-seal{
    width:26px; height:26px;
    border-radius:50%;
    border:2px solid var(--flame);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-family:'Oswald', sans-serif;
    font-size:11px;
    font-weight:700;
    color:var(--flame);
    flex-shrink:0;
    transform:rotate(-6deg);
}

/* ---------- Footer ---------- */
.site-footer{
    text-align:center;
    color:var(--text-dim);
    font-size:12.5px;
    padding:24px 6px 40px;
    border-top:1px solid var(--line);
    margin-top:20px;
    line-height:1.7;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px){
    .quick-grid{ grid-template-columns:1fr; }
    .hero-content{ padding:34px 24px; max-width:100%; }
}

@media (max-width: 700px){
    .site-wrapper{ padding:0 14px; }
    .site-header{ margin:0 -14px; padding-left:14px; padding-right:14px; }

    .nav-toggle{ display:flex; }
    .account-bar{ order:4; }
    .download-btn{ order:5; }

    .main-nav{
        flex-direction:column;
        gap:0;
        max-height:0;
        overflow:hidden;
        transition:max-height .25s ease;
        width:100%;
    }
    .main-nav.open{ max-height:320px; padding-top:6px; }
    .main-nav a{
        width:100%;
        padding:12px 0;
        border-bottom:1px solid var(--line);
    }

    .brand-text{ font-size:22px; }
    .hero-banner{ min-height:220px; }
    .hero-dots{ left:24px; }
}
