*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --bg: #07111f;
    --panel: #0e1b2e;
    --panel2: #12243b;
    --panel-hover: #162b46;
    --line: #20334f;
    --line-active: #3c5d88;
    --text: #eef5ff;
    --muted: #8fa6c5;
    --subtle: #5f7a9e;
    --primary: #7c5cff;
    --primary-hover: #6a46ff;
    --primary2: #34d3ff;
    --green: #2bd67b;
    --green-bg: rgba(43, 214, 123, 0.12);
    --orange: #ffb547;
    --orange-bg: rgba(255, 181, 71, 0.12);
    --red: #ff667a;
    --red-bg: rgba(255, 102, 122, 0.12);
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
    --glow: 0 0 25px rgba(124, 92, 255, 0.25);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

body {
    margin: 0;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary2);
    text-decoration: none;
    transition: 0.2s ease;
}

a:hover {
    color: #8be4ff;
}

button, input, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   PUBLIC PAGE LAYOUT
   ========================================================================== */
.public-page {
    min-height: 100vh;
    background: 
        radial-gradient(circle at 15% 8%, rgba(124, 92, 255, 0.18), transparent 30%),
        radial-gradient(circle at 85% 15%, rgba(52, 211, 255, 0.12), transparent 28%),
        #07111f;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.nav-wrapper {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(7, 17, 31, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(32, 51, 79, 0.6);
}

.nav {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    font-size: 21px;
    letter-spacing: -0.5px;
    color: var(--text);
}

.brand:hover {
    color: #fff;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
}

.navlinks {
    display: flex;
    gap: 28px;
    color: var(--muted);
    font-weight: 600;
    font-size: 15px;
}

.navlinks a {
    color: inherit;
}

.navlinks a:hover, .navlinks a.active {
    color: #fff;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Buttons */
.ghost-btn, .primary-btn, .license-btn, .download-btn, .action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.ghost-btn {
    border: 1px solid var(--line);
    background: #0c1728;
    color: var(--text);
}

.ghost-btn:hover {
    background: #15263d;
    border-color: var(--line-active);
    color: #fff;
}

.primary-btn {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #5d84ff);
    box-shadow: 0 8px 24px rgba(124, 92, 255, 0.32);
}

.primary-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-hover), #4d74ff);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(124, 92, 255, 0.45);
    color: #fff;
}

.primary-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.license-btn {
    border: 1px solid rgba(124, 92, 255, 0.45);
    color: #d8d0ff;
    background: rgba(124, 92, 255, 0.12);
}

.license-btn:hover {
    background: rgba(124, 92, 255, 0.24);
    border-color: rgba(124, 92, 255, 0.7);
    color: #fff;
}

.download-btn {
    border: 0;
    color: white;
    background: #1c3150;
}

.download-btn:hover {
    background: #25426b;
    color: #fff;
}

/* Badges & Pills */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(124, 92, 255, 0.14);
    border: 1px solid rgba(124, 92, 255, 0.35);
    color: #c8bdff;
    font-weight: 800;
    font-size: 13px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 999px;
    background: #15243a;
    border: 1px solid #253a57;
    color: #b7c9df;
    font-size: 12px;
    font-weight: 700;
}

/* ==========================================================================
   DONATE SECTION (Placed right after Navbar)
   ========================================================================== */
.donate-section {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 24px;
}

.donate-card {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    align-items: center;
    padding: 30px 32px;
    border-radius: var(--radius-lg);
    background: 
        radial-gradient(circle at 90% 10%, rgba(52, 211, 255, 0.12), transparent 35%),
        radial-gradient(circle at 10% 90%, rgba(124, 92, 255, 0.16), transparent 40%),
        #0d1a2b;
    border: 1px solid #223754;
    box-shadow: var(--shadow);
}

.donate-copy h2 {
    margin: 12px 0 10px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.25;
}

.donate-copy p {
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
    font-size: 15px;
}

.donate-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.donate-box {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 20px;
    align-items: center;
    padding: 20px;
    border-radius: 18px;
    background: #091524;
    border: 1px solid #263d5a;
}

.qr-wrapper {
    width: 170px;
    height: 170px;
    border-radius: 14px;
    background: #ffffff;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.qr-placeholder {
    width: 100%;
    height: 100%;
    background: #f0f4f9;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #475a74;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    padding: 8px;
}

.bank-info {
    min-width: 0;
}

.bank-name {
    font-weight: 900;
    font-size: 18px;
    color: #fff;
    margin-bottom: 8px;
}

.bank-row {
    margin: 8px 0;
}

.bank-row small {
    display: block;
    color: var(--subtle);
    font-size: 12px;
    margin-bottom: 2px;
}

.bank-value {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-weight: 800;
    color: #edf5ff;
    font-size: 14px;
}

.copy-mini {
    border: 1px solid #2c4668;
    background: #12213a;
    color: #bcd0e9;
    padding: 4px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
}

.copy-mini:hover {
    background: #1e3559;
    color: #fff;
    border-color: #44648e;
}

.donate-note {
    margin-top: 12px;
    color: var(--subtle);
    font-size: 12px;
    line-height: 1.5;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 24px 48px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 54px;
    align-items: center;
}

.hero h1 {
    font-size: 54px;
    line-height: 1.05;
    margin: 18px 0 20px;
    letter-spacing: -2px;
    font-weight: 900;
}

.hero h1 span {
    background: linear-gradient(90deg, #c7b7ff, #67ddff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--muted);
    max-width: 620px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.mini-stats {
    display: flex;
    gap: 32px;
    margin-top: 36px;
    color: var(--muted);
    font-size: 14px;
}

.mini-stats b {
    display: block;
    color: white;
    font-size: 22px;
    margin-bottom: 2px;
}

.hero-preview {
    background: linear-gradient(160deg, #152942, #0b1627);
    border: 1px solid #25405f;
    border-radius: 24px;
    padding: 14px;
    box-shadow: var(--shadow);
    transform: rotate(1deg);
    transition: transform 0.3s ease;
}

.hero-preview:hover {
    transform: rotate(0deg) scale(1.01);
}

.preview-window {
    border-radius: 18px;
    overflow: hidden;
    background: #0a1321;
}

.preview-top {
    height: 38px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    background: #101d30;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #40516b;
}

.preview-body {
    padding: 20px;
}

.fake-video {
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background: 
        linear-gradient(120deg, rgba(124, 92, 255, 0.35), rgba(52, 211, 255, 0.15)),
        linear-gradient(160deg, #182945, #0b1422);
    display: grid;
    place-items: center;
    border: 1px solid #2b4567;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: white;
    color: #0a1321;
    font-size: 22px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s;
}

.fake-video:hover .play-btn {
    transform: scale(1.1);
}

.preview-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

/* ==========================================================================
   SOFTWARE LIST SECTION
   ========================================================================== */
.section {
    max-width: 1200px;
    margin: auto;
    padding: 30px 24px 90px;
}

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

.section h2 {
    font-size: 32px;
    margin: 0 0 6px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.section p {
    color: var(--muted);
    margin: 0;
    font-size: 15px;
}

.searchbar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0c1728;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 16px;
    min-width: 320px;
}

.searchbar input {
    background: transparent;
    border: 0;
    outline: none;
    color: white;
    width: 100%;
}

.searchbar input::placeholder {
    color: var(--subtle);
}

.chips {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin: 18px 0 28px;
}

.chip {
    border: 1px solid var(--line);
    background: #0d1a2b;
    color: var(--muted);
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: 0.2s;
}

.chip:hover {
    background: #14253c;
    color: #fff;
    border-color: var(--line-active);
}

.chip.active {
    background: #1a2850;
    color: white;
    border-color: #4a5fb0;
    box-shadow: 0 4px 14px rgba(74, 95, 176, 0.25);
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.card {
    background: linear-gradient(180deg, #0f1d30, #0b1728);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #3e5d83;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.thumb {
    height: 190px;
    padding: 18px;
    display: flex;
    align-items: flex-end;
    background: 
        radial-gradient(circle at 70% 20%, rgba(52, 211, 255, 0.22), transparent 40%),
        radial-gradient(circle at 25% 80%, rgba(124, 92, 255, 0.26), transparent 40%),
        #122039;
    position: relative;
    overflow: hidden;
}

.thumb img.bg-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: 0.3s ease;
}

.card:hover .thumb img.bg-thumb {
    opacity: 0.85;
    transform: scale(1.05);
}

.appicon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 26px;
    background: #0b1422;
    border: 1px solid #36506f;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.card h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
}

.card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0 18px;
    flex: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid rgba(32, 51, 79, 0.5);
}

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

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 7, 16, 0.78);
    backdrop-filter: blur(10px);
    z-index: 150;
    display: grid;
    place-items: center;
    padding: 22px;
}

.modal-box {
    width: min(880px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: #0d1a2b;
    border: 1px solid #2b4160;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.modal-head {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1c3049;
    position: sticky;
    top: 0;
    background: #0d1a2b;
    z-index: 3;
}

.modal-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
}

.close {
    background: #14263c;
    border: 1px solid #29415f;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

.close:hover {
    background: #243d5f;
}

.modal-content {
    padding: 24px;
}

.modal-video {
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: #0b1422;
    border: 1px solid #2a405e;
    margin-bottom: 18px;
}

.modal-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.install-box {
    margin-top: 18px;
    background: #091524;
    border: 1px solid #213752;
    border-radius: 14px;
    padding: 18px;
}

.install-box code {
    color: #8ee8ff;
    background: #0f223a;
    padding: 2px 6px;
    border-radius: 5px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
    flex-wrap: wrap;
}

/* Terms Modal */
.terms-box {
    width: min(720px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: #0d1a2b;
    border: 1px solid #2b4160;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.terms-content {
    padding: 20px 24px 24px;
    color: #b8c9dd;
    line-height: 1.75;
    font-size: 14px;
}

.terms-content h3 {
    color: #eef5ff;
    margin: 20px 0 8px;
    font-size: 16px;
    font-weight: 800;
}

.terms-content ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.terms-content li {
    margin-bottom: 6px;
}

.terms-warning {
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 13px;
    background: rgba(255, 181, 71, 0.08);
    border: 1px solid rgba(255, 181, 71, 0.28);
    color: #ffd18a;
    font-size: 13px;
}

.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 13px;
    background: #091524;
    border: 1px solid #263c58;
    margin-top: 18px;
    cursor: pointer;
}

.terms-check input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: #7c5cff;
    flex: 0 0 auto;
}

.terms-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 22px;
    border-top: 1px solid #1d3049;
}

/* License Modal */
.license-card {
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(52, 211, 255, 0.08));
    border: 1px solid rgba(124, 92, 255, 0.35);
    text-align: center;
}

.license-key {
    margin: 16px auto 12px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #07111f;
    border: 1px dashed #556d91;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #9fe9ff;
    word-break: break-all;
    user-select: all;
}

.license-note {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

/* ==========================================================================
   ADMIN LAYOUT
   ========================================================================== */
.admin-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #0a1525;
    border-right: 1px solid #1b2d45;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
}

.sidebar .brand {
    padding: 0 10px 24px;
    border-bottom: 1px solid #16263b;
    margin-bottom: 14px;
}

.menu-label {
    color: #607898;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.2px;
    padding: 12px 12px 6px;
    text-transform: uppercase;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #9fb0c8;
    padding: 11px 14px;
    border-radius: 11px;
    margin: 3px 0;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: 0.2s ease;
}

.menu-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.menu-item.active {
    color: white;
    background: linear-gradient(90deg, rgba(124, 92, 255, 0.25), rgba(124, 92, 255, 0.08));
    border-left: 3px solid var(--primary);
}

.menu-icon {
    width: 24px;
    text-align: center;
    font-size: 16px;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid #16263b;
}

.admin-main {
    padding: 0 34px 48px;
    overflow-y: auto;
    background: #08111d;
}

.admin-top {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #182a41;
}

.admin-top .breadcrumb {
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}

.admin-top .right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #243957;
    font-weight: 900;
    color: #fff;
}

.page-title {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-end;
    padding: 28px 0 20px;
}

.page-title h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
}

.page-title p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

/* Stat Grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat {
    background: #0d1a2b;
    border: 1px solid #1c3049;
    border-radius: 16px;
    padding: 20px;
}

.stat .label {
    color: #91a6c1;
    font-size: 13px;
    font-weight: 700;
}

.stat .value {
    font-size: 30px;
    font-weight: 900;
    margin: 8px 0 4px;
    color: #fff;
}

.trend {
    font-size: 12px;
    color: #5be49a;
}

.trend.muted {
    color: var(--muted);
}

/* Admin Panel & Table */
.admin-panel {
    margin-top: 22px;
    background: #0d1a2b;
    border: 1px solid #1c3049;
    border-radius: 18px;
    overflow: hidden;
}

.panel-head {
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1c3049;
}

.panel-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
}

.panel-actions {
    display: flex;
    gap: 10px;
}

.admin-search {
    background: #0a1524;
    border: 1px solid #263c59;
    border-radius: 10px;
    color: white;
    padding: 8px 14px;
    outline: none;
    font-size: 13px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 14px 20px;
    border-bottom: 1px solid #17283d;
    font-size: 14px;
}

th {
    color: #6f87a5;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: rgba(10, 21, 36, 0.4);
}

td {
    color: #c8d6e8;
}

tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.tool-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #172b47;
    display: grid;
    place-items: center;
    font-size: 18px;
    overflow: hidden;
}

.tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status {
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status.published {
    background: var(--green-bg);
    color: #68e7a3;
}

.status.draft {
    background: var(--orange-bg);
    color: #ffc76f;
}

.status.danger {
    background: var(--red-bg);
    color: #ff8c9c;
}

.chart-area {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 20px;
    margin-top: 22px;
}

.chart {
    height: 250px;
    padding: 22px;
    background: #0d1a2b;
    border: 1px solid #1c3049;
    border-radius: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.chart h3, .activity h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.bars {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin-top: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #182a42;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    position: relative;
}

.bar {
    width: 100%;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #7c5cff, #394a93);
    min-height: 8px;
    transition: height 0.5s ease;
}

.bar-label {
    position: absolute;
    bottom: -20px;
    font-size: 11px;
    color: var(--subtle);
}

.bar-val {
    font-size: 11px;
    font-weight: 700;
    color: #bcd0e9;
    margin-bottom: 4px;
}

.activity {
    padding: 22px;
    background: #0d1a2b;
    border: 1px solid #1c3049;
    border-radius: 18px;
}

.activity-item {
    display: flex;
    gap: 12px;
    margin: 16px 0;
    color: #a9bdd5;
    font-size: 13px;
    line-height: 1.5;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #68e7a3;
    margin-top: 6px;
    flex: 0 0 8px;
}

/* Admin Form Controls */
.form-card {
    background: #0d1a2b;
    border: 1px solid #1c3049;
    border-radius: 20px;
    padding: 28px;
    margin-top: 20px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 13px;
    font-weight: 800;
    color: #b7c8dc;
}

.form-control {
    width: 100%;
    background: #091525;
    border: 1px solid #29415e;
    color: #edf5ff;
    border-radius: 11px;
    padding: 12px 14px;
    outline: none;
    transition: 0.2s;
}

.form-control:focus {
    border-color: #6f6cff;
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 110px;
    line-height: 1.6;
}

.upload-zone {
    border: 1.5px dashed #3b5576;
    border-radius: 15px;
    padding: 22px;
    background: #091524;
    text-align: center;
    transition: 0.2s;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: #6e70ff;
    background: #0c1930;
}

.upload-zone .big {
    font-size: 32px;
    margin-bottom: 6px;
}

.upload-zone p {
    margin: 4px 0;
    color: var(--muted);
    font-size: 14px;
}

.upload-zone small {
    color: #637c9b;
    font-size: 12px;
}

.file-preview-row {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #102139;
    border: 1px solid #27405e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hint {
    font-size: 12px;
    color: #6f87a6;
    line-height: 1.5;
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid #233a56;
    border-radius: 12px;
    background: #091524;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #1c3049;
}

.validation-summary {
    background: rgba(255, 102, 122, 0.12);
    border: 1px solid rgba(255, 102, 122, 0.35);
    border-radius: 12px;
    padding: 14px 18px;
    color: #ff8c9c;
    margin-bottom: 18px;
    font-size: 14px;
}

.validation-summary ul {
    margin: 6px 0 0 18px;
    padding: 0;
}

.text-danger {
    color: #ff7588;
    font-size: 12px;
    font-weight: 600;
}

.alert-success {
    background: rgba(43, 214, 123, 0.12);
    border: 1px solid rgba(43, 214, 123, 0.35);
    color: #68e7a3;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 700;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #0e1e32;
    border: 1px solid #2b4568;
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    font-size: 14px;
    font-weight: 700;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.footer {
    border-top: 1px solid var(--line);
    padding: 40px 0;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
    background: #050d18;
}

/* Responsive */
@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 48px;
    }
    .hero h1 {
        font-size: 44px;
    }
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .admin-shell {
        grid-template-columns: 80px 1fr;
    }
    .sidebar .brand span, .menu-label, .menu-item span:not(.menu-icon), .sidebar-bottom span {
        display: none;
    }
    .sidebar .brand {
        justify-content: center;
    }
    .menu-item {
        justify-content: center;
    }
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .chart-area {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .navlinks {
        display: none;
    }
    .hero h1 {
        font-size: 36px;
    }
    .cards {
        grid-template-columns: 1fr;
    }
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }
    .searchbar {
        min-width: 0;
    }
    .admin-shell {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
    .admin-main {
        padding: 0 16px 30px;
    }
    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.full {
        grid-column: auto;
    }
    .donate-card {
        grid-template-columns: 1fr;
    }
    .donate-box {
        grid-template-columns: 1fr;
    }
    .qr-wrapper {
        margin: 0 auto;
    }
}

/* ==========================================================================
   LEGAL PAGES (Chính sách quyền riêng tư, Điều khoản sử dụng)
   ========================================================================== */
.policy {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 24px 90px;
    line-height: 1.75;
    color: var(--text);
}

.policy-head {
    margin-bottom: 28px;
}

.policy-head h1 {
    margin: 0 0 8px;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.policy-head p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.policy-toc {
    margin: 0 0 28px;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
}

.policy-toc b {
    display: block;
    margin-bottom: 6px;
    color: #fff;
}

.policy-toc ol {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
}

.policy-toc a {
    color: var(--muted);
}

.policy-toc a:hover {
    color: #fff;
}

.policy section {
    margin-bottom: 18px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(14, 27, 46, 0.72);
    scroll-margin-top: 90px;
}

.policy h2 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.policy h3 {
    margin: 16px 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #d8e4f5;
}

.policy p,
.policy li {
    color: #b9cbe2;
    font-size: 15px;
}

.policy p {
    margin: 0 0 10px;
}

.policy ul,
.policy ol.steps {
    margin: 6px 0 10px;
    padding-left: 22px;
}

.policy li {
    margin-bottom: 4px;
}

.policy section a {
    color: #b9a8ff;
}

.policy a.email {
    font-weight: 700;
}

.policy .highlight {
    border-color: rgba(124, 92, 255, 0.45);
    background: rgba(124, 92, 255, 0.08);
}

.policy .lang-en p,
.policy .lang-en li {
    font-size: 14px;
}

@media (max-width: 640px) {
    .policy-head h1 {
        font-size: 27px;
    }

    .policy section {
        padding: 18px 16px;
    }
}