:root {
    --dk-bg: #f8fafc;
    --dk-bg-soft: #f1f5f9;
    --dk-surface: #ffffff;
    --dk-surface-2: #ffffff;
    --dk-border: #e2e8f0;
    --dk-border-strong: #cbd5e1;
    --dk-text: #0f172a;
    --dk-muted: #64748b;
    --dk-cyan: #0ea5e9;
    --dk-cyan-light: #2563eb;
    --dk-violet: #4f46e5;
    --dk-gold: #d97706;
    --dk-green: #10b981;
    --dk-red: #ef4444;
    --dk-radius: 18px;
    --dk-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body.portal-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--dk-text);
    font-family: 'Inter', system-ui, sans-serif;
    background:
        radial-gradient(circle at 8% 8%, rgba(14,165,233,.12), transparent 28rem),
        radial-gradient(circle at 92% 35%, rgba(99,102,241,.12), transparent 30rem),
        var(--dk-bg);
}
body.portal-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: .22;
    pointer-events: none;
    background-image: linear-gradient(rgba(148,163,184,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.045) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, #000, transparent 80%);
}
a { color: var(--dk-cyan-light); }
button, input, textarea, select { font: inherit; }

.main-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--dk-border);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
}
.nav-container {
    width: min(1180px, calc(100% - 40px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}
.brand-logo { display:flex; align-items:center; gap:11px; color:#0F172A; text-decoration:none; flex:0 0 auto; }
.brand-logo img { width:38px; height:38px; border-radius:10px; object-fit:cover; box-shadow:0 0 0 1px rgba(37,99,235,.2), 0 4px 12px rgba(37,99,235,.15); }
.brand-copy { display:flex; flex-direction:column; line-height:1.08; }
.brand-copy strong { font:800 18px 'Inter','Segoe UI',Arial,sans-serif; letter-spacing:-.2px; color:#0F172A; }
.brand-copy small { margin-top:4px; color:#64748B; font-size:10px; letter-spacing:1.2px; text-transform:uppercase; }
.brand-badge { color:#fff; background:linear-gradient(135deg,var(--dk-violet),var(--dk-cyan)); border-radius:999px; padding:4px 8px; font-size:10px; font-weight:800; }
.nav-links { display:flex; align-items:center; justify-content:flex-end; gap:5px; }
.nav-link, .btn-portal { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:40px; padding:0 12px; border-radius:10px; color:#334155; text-decoration:none; font-size:13px; font-weight:650; border:1px solid transparent; transition:.2s ease; }
.nav-link:hover, .nav-link.active { color:#2563EB; background:#EFF6FF; }
.btn-portal { color:#2563EB; border-color:#BFDBFE; background:#EFF6FF; }
.btn-portal:hover { color:#1D4ED8; border-color:#93C5FD; background:#DBEAFE; transform:translateY(-1px); }
.btn-admin { color:#92400E; border-color:#FDE68A; background:#FFFBEB; }
.nav-logout { color:#DC2626; }
.nav-toggle { display:none; width:42px; height:42px; border:1px solid var(--dk-border); border-radius:10px; background:#F8FAFC; color:#0F172A; cursor:pointer; }

.account-nav { border-bottom:1px solid var(--dk-border); background:#FFFFFF; }
.account-nav-inner { width:min(1180px,calc(100% - 40px)); margin:0 auto; display:flex; gap:4px; overflow-x:auto; scrollbar-width:none; padding:9px 0; }
.account-nav-inner::-webkit-scrollbar { display:none; }
.account-link { flex:0 0 auto; display:inline-flex; gap:7px; align-items:center; padding:8px 11px; border-radius:9px; color:#64748B; text-decoration:none; font-size:12px; font-weight:650; }
.account-link:hover, .account-link.active { color:#2563EB; background:#EFF6FF; }

.page-wrapper { width:min(1180px,calc(100% - 40px)); flex:1; margin:0 auto; padding:42px 0 72px; }
h1,h2,h3,h4 { font-family:'Inter','Segoe UI',Arial,sans-serif; color:var(--dk-text); letter-spacing:-.02em; }
.flash-alert { display:flex; align-items:flex-start; gap:11px; margin-bottom:24px; padding:14px 16px; border-radius:12px; font-size:14px; line-height:1.5; }
.flash-error { color:#fecaca; background:rgba(127,29,29,.24); border:1px solid rgba(248,113,113,.28); }
.flash-success { color:#bbf7d0; background:rgba(20,83,45,.25); border:1px solid rgba(34,197,94,.28); }

.dk-page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:26px; }
.dk-eyebrow { display:inline-flex; align-items:center; gap:7px; color:var(--dk-cyan-light); font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:1.2px; }
.dk-page-head h1 { margin:8px 0 5px; font-size:clamp(27px,4vw,38px); letter-spacing:-.8px; }
.dk-page-head p { margin:0; color:var(--dk-muted); line-height:1.65; }
.dk-card { background:#FFFFFF; border:1px solid var(--dk-border); border-radius:var(--dk-radius); box-shadow:var(--dk-shadow); color:#334155; }
.dk-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:43px; padding:0 17px; border:1px solid var(--dk-border); border-radius:11px; background:#F1F5F9; color:#0F172A; text-decoration:none; font-size:13px; font-weight:750; cursor:pointer; transition:.2s ease; }
.dk-btn:hover { transform:translateY(-1px); border-color:#94A3B8; background:#E2E8F0; }
.dk-btn-primary { border-color:transparent; background:linear-gradient(135deg,#2563EB,#1D4ED8); color:#FFFFFF !important; box-shadow:0 6px 18px rgba(37,99,235,.3); }
.dk-btn-primary:hover { background:linear-gradient(135deg,#1D4ED8,#1E3A8A); color:#FFFFFF !important; }
.dk-btn-danger { color:#991B1B; border-color:#FCA5A5; background:#FEF2F2; }
.dk-input { width:100%; min-height:46px; padding:11px 14px; color:#0F172A; background:#FFFFFF; border:1px solid #CBD5E1; border-radius:10px; outline:none; transition:.2s ease; }
.dk-input:focus { border-color:#2563EB; box-shadow:0 0 0 3px rgba(37,99,235,.15); }
.dk-input:disabled { color:#94A3B8; background:#F1F5F9; }
.dk-label { display:block; margin-bottom:7px; color:#0F172A; font-size:13px; font-weight:700; }
.dk-help { display:block; margin-top:6px; color:#64748B; font-size:12px; line-height:1.5; }
.dk-table-wrap { overflow-x:auto; }
.dk-table { width:100%; border-collapse:collapse; font-size:13px; }
.dk-table th { padding:12px; color:#475569; text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.7px; border-bottom:1px solid var(--dk-border); font-weight:700; }
.dk-table td { padding:14px 12px; color:#334155; border-bottom:1px solid #F1F5F9; }
.dk-table tbody tr:hover { background:#F8FAFC; }
.dk-badge { display:inline-flex; align-items:center; gap:6px; padding:5px 9px; border-radius:999px; color:#1E40AF; background:#EFF6FF; border:1px solid #BFDBFE; font-size:11px; font-weight:750; }
.dk-badge.success { color:#065F46; background:#ECFDF5; border-color:#A7F3D0; }
.dk-empty { padding:45px 20px; text-align:center; color:#64748B; }
.dk-empty i { display:block; margin-bottom:14px; color:#94A3B8; font-size:38px; }

.auth-shell { max-width:460px; margin:20px auto; }
.auth-card { padding:34px; background:#FFFFFF; border:1px solid var(--dk-border); border-radius:22px; box-shadow:0 4px 20px -2px rgba(15,23,42,0.06); }
.auth-head { text-align:center; margin-bottom:28px; }
.auth-head img { width:60px; height:60px; border-radius:16px; object-fit:cover; box-shadow:0 4px 14px rgba(37,99,235,0.25); border:2px solid #FFFFFF; }
.auth-head h1 { margin:14px 0 6px; font-size:25px; color:#0F172A; font-weight:800; }
.auth-head p { margin:0; color:#64748B; font-size:13px; line-height:1.55; }
.auth-form { display:grid; gap:18px; }
.auth-meta { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.auth-footer { margin-top:24px; padding-top:20px; text-align:center; border-top:1px solid var(--dk-border); color:#64748B; font-size:13px; }

.site-footer { border-top:1px solid var(--dk-border); background:#F8FAFC; }
.footer-inner { width:min(1180px,calc(100% - 40px)); margin:0 auto; padding:32px 0; display:flex; align-items:center; justify-content:space-between; gap:24px; }
.footer-brand { display:flex; align-items:center; gap:10px; color:#0F172A; font-weight:750; }
.footer-brand img { width:32px; height:32px; border-radius:8px; }
.footer-copy { margin:6px 0 0; color:#64748B; font-size:12px; }
.footer-links { display:flex; flex-wrap:wrap; gap:18px; }
.footer-links a { color:#64748B; text-decoration:none; font-size:12px; }
.footer-links a:hover { color:#2563EB; }
.floating-support { position:fixed; right:22px; bottom:22px; z-index:900; display:flex; flex-direction:column; gap:10px; }
.support-btn { width:48px; height:48px; display:grid; place-items:center; border-radius:50%; color:#fff; text-decoration:none; font-size:20px; box-shadow:0 12px 30px rgba(0,0,0,.28); transition:.2s ease; }
.support-btn:hover { transform:translateY(-3px); }
.btn-tele { background:#229ed9; }.btn-zalo { background:#0068ff; }

@media (max-width: 980px) {
    .nav-toggle { display:grid; place-items:center; }
    .nav-links { display:none; position:absolute; top:72px; left:20px; right:20px; padding:12px; flex-direction:column; align-items:stretch; border:1px solid var(--dk-border); border-radius:14px; background:rgba(7,17,31,.98); box-shadow:var(--dk-shadow); }
    .nav-links.open { display:flex; }
    .nav-link,.btn-portal { justify-content:flex-start; }
}
@media (max-width: 700px) {
    .nav-container,.account-nav-inner,.page-wrapper,.footer-inner { width:min(100% - 28px,1180px); }
    .page-wrapper { padding:30px 0 55px; }
    .brand-badge,.brand-copy small { display:none; }
    .dk-page-head,.footer-inner { align-items:flex-start; flex-direction:column; }
    .auth-card { padding:26px 20px; }
    .floating-support { right:14px; bottom:14px; }
    .support-btn { width:44px; height:44px; }
}
