/* --- DESIGN SYSTEM HỆ THỐNG QUẢN LÝ SKKN (ULIS BRAND) --- */
/* Nguồn chuẩn: QQ-ULIS_design_system.md — mọi thay đổi phải đối chiếu tài liệu này */

/* ===== Font self-host (khong dung CDN) ===== */
/* Ca 3 font la variable font: 1 file duy nhat chua toan bo truc weight,
   khai bao font-weight dang range de trinh duyet tu chon dung do dam */
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/assets/fonts/plus-jakarta-sans-variable.woff2') format('woff2');
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Newsreader';
    src: url('/assets/fonts/newsreader-italic-variable.woff2') format('woff2');
    font-weight: 400 600;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Geist Mono';
    src: url('/assets/fonts/geist-mono-variable.woff2') format('woff2');
    font-weight: 400 500;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Mau sac chinh */
    --qq-skkn-primary: #004780;
    --qq-skkn-primary-hover: #003660;
    --qq-skkn-primary-light: #e6f0fa;
    --qq-skkn-secondary: #f0f4f8;

    /* Trang thai (theo QQ-ULIS_design_system.md) */
    --qq-skkn-success: #1f7a4d;
    --qq-skkn-success-hover: #185f3d;
    --qq-skkn-success-light: #eaf3ec;
    --qq-skkn-warning: #b7791f;
    --qq-skkn-warning-hover: #96611a;
    --qq-skkn-warning-light: #fbf3e2;
    --qq-skkn-danger: #c53030;
    --qq-skkn-danger-hover: #9e2626;
    --qq-skkn-danger-light: #fdf2f2;
    --qq-skkn-info: #1d70b8;
    --qq-skkn-info-light: #e3ecf5;

    /* Nen & chu */
    --qq-skkn-bg: #f5f8fa;
    --qq-skkn-bg-secondary: #f5f8fa;
    --qq-skkn-card-bg: #ffffff;
    --qq-skkn-text-dark: #0a131c;
    --qq-skkn-text-muted: #506275;
    --qq-skkn-border: #d0dfed;

    /* Font */
    --qq-skkn-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --qq-skkn-font-serif: 'Newsreader', Georgia, serif;
    --qq-skkn-font-mono: 'Geist Mono', 'Courier New', monospace;

    /* Bo goc */
    --qq-skkn-radius: 14px;
    --qq-skkn-radius-marketing: 22px;
    --qq-skkn-radius-pill: 9999px;
    --qq-skkn-radius-input: 10px;

    /* Bong do & transition */
    --qq-skkn-shadow-sm: 0 1px 3px rgba(0,71,128,0.04), 0 1px 2px rgba(0,71,128,0.02);
    --qq-skkn-shadow-md: 0 4px 6px -1px rgba(0,71,128,0.06), 0 2px 4px -1px rgba(0,71,128,0.03);
    --qq-skkn-shadow-lg: rgba(0, 71, 128, 0.03) 0 40px 90px -40px;
    --qq-skkn-transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets & styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--qq-skkn-font);
    background-color: var(--qq-skkn-bg);
    color: var(--qq-skkn-text-dark);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    line-height: 1.5;
}

code {
    font-family: var(--qq-skkn-font-mono);
}

/* Main layouts */
.qq-skkn-wrapper {
    width: 1280px;
    max-width: 92%;
    margin: 0 auto;
    padding: 30px 0;
}

/* Glassmorphism utility */
.qq-skkn-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px) saturate(190%);
    -webkit-backdrop-filter: blur(12px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Headers */
.qq-skkn-header {
    background: var(--qq-skkn-primary);
    color: #ffffff;
    border-radius: var(--qq-skkn-radius);
    padding: 20px 25px;
    box-shadow: var(--qq-skkn-shadow-sm);
    border: 1px solid var(--qq-skkn-primary-hover);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
    transition: var(--qq-skkn-transition);
}

.qq-skkn-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.qq-skkn-brand-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.qq-skkn-brand-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.qq-skkn-brand-sub {
    margin: 3px 0 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
}

/* Cards & containers - mac dinh la bien the compact (Admin/User workspace) */
.qq-skkn-card {
    background: var(--qq-skkn-card-bg);
    border-radius: var(--qq-skkn-radius);
    box-shadow: var(--qq-skkn-shadow-md);
    border: 1px solid var(--qq-skkn-border);
    padding: 22px;
    margin-bottom: 25px;
    transition: var(--qq-skkn-transition);
}

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

.qq-skkn-card-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--qq-skkn-text-dark);
    font-weight: 700;
    border-left: 4px solid var(--qq-skkn-primary);
    padding-left: 12px;
}

/* Bien the Marketing (Showcase, Login): bo goc lon + padding rong hon, kich hoat qua scoping class tren wrapper */
.qq-skkn-marketing .qq-skkn-card {
    border-radius: var(--qq-skkn-radius-marketing);
    padding: 30px;
}

/* Buttons - bo tron hoan toan theo QQ-ULIS Design System */
.qq-skkn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 9px 20px;
    border-radius: var(--qq-skkn-radius-pill);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: var(--qq-skkn-transition);
    gap: 8px;
}

.qq-skkn-btn-primary {
    background: var(--qq-skkn-primary);
    color: #ffffff;
    box-shadow: 0 10px 24px -10px rgba(0, 71, 128, 0.5);
}

.qq-skkn-btn-primary:hover {
    background: var(--qq-skkn-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -10px rgba(0, 71, 128, 0.55);
}

.qq-skkn-btn-secondary {
    background: #ffffff;
    color: var(--qq-skkn-text-dark);
    border-color: var(--qq-skkn-border);
}

.qq-skkn-btn-secondary:hover {
    background: var(--qq-skkn-secondary);
    border-color: #b9cee3;
    transform: translateY(-1px);
}

.qq-skkn-btn-success {
    background: var(--qq-skkn-success);
    color: #ffffff;
}

.qq-skkn-btn-success:hover {
    background: var(--qq-skkn-success-hover);
    transform: translateY(-1px);
}

.qq-skkn-btn-danger {
    background: var(--qq-skkn-danger);
    color: #ffffff;
}

.qq-skkn-btn-danger:hover {
    background: var(--qq-skkn-danger-hover);
    transform: translateY(-1px);
}

.qq-skkn-btn-warning {
    background: var(--qq-skkn-warning);
    color: #ffffff;
}

.qq-skkn-btn-warning:hover {
    background: var(--qq-skkn-warning-hover);
    transform: translateY(-1px);
}

/* Forms */
.qq-skkn-form-group {
    margin-bottom: 20px;
}

.qq-skkn-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--qq-skkn-text-dark);
}

.qq-skkn-form-control,
.qq-skkn-input {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
    border: 1px solid var(--qq-skkn-border);
    border-radius: var(--qq-skkn-radius-input);
    outline: none;
    box-sizing: border-box;
    transition: var(--qq-skkn-transition);
}

.qq-skkn-form-control:focus,
.qq-skkn-input:focus {
    border-color: var(--qq-skkn-primary);
    box-shadow: 0 0 0 3px rgba(0, 71, 128, 0.15);
}

/* Layout ngang cho form (thay the cac khoi style="width:...;flex:..." rai rac) */
.qq-skkn-form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.qq-skkn-form-col-2 { flex: 1; min-width: 280px; }
.qq-skkn-form-col-3 { flex: 1; min-width: 220px; }
.qq-skkn-form-col-4 { flex: 1; min-width: 180px; }

/* Tables */
.qq-skkn-table-responsive {
    overflow-x: auto;
    width: 100%;
    border-radius: var(--qq-skkn-radius);
    border: 1px solid var(--qq-skkn-border);
}

.qq-skkn-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13.5px;
    background: #ffffff;
}

.qq-skkn-thead {
    background: var(--qq-skkn-primary);
    color: #ffffff;
}

.qq-skkn-table th {
    padding: 10px 12px;
    font-weight: 700;
}

.qq-skkn-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--qq-skkn-border);
    color: var(--qq-skkn-text-muted);
}

.qq-skkn-table tr:last-child td {
    border-bottom: none;
}

.qq-skkn-table tr:hover td {
    background-color: var(--qq-skkn-bg-secondary);
}

/* Chuan hoa do rong cot bang - thay the moi style="width:Npx" rai rac tren toan he thong */
.qq-skkn-col-xs { width: 70px; }
.qq-skkn-col-sm { width: 110px; }
.qq-skkn-col-md { width: 160px; }
.qq-skkn-col-lg { width: 250px; }
.qq-skkn-col-xl { width: 320px; }
.qq-skkn-col-auto { width: auto; }
.qq-skkn-input-xs { width: 70px !important; }

/* Alerts */
.qq-skkn-alert {
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid transparent;
}

.qq-skkn-alert-success {
    background-color: var(--qq-skkn-success-light);
    color: var(--qq-skkn-success);
    border-color: #cfe6d7;
}

.qq-skkn-alert-danger {
    background-color: var(--qq-skkn-danger-light);
    color: var(--qq-skkn-danger);
    border-color: #f6d3d3;
}

.qq-skkn-alert-warning {
    background-color: var(--qq-skkn-warning-light);
    color: var(--qq-skkn-warning);
    border-color: #f0e0bd;
}

/* Badges */
.qq-skkn-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--qq-skkn-radius-pill);
    font-size: 12px;
    font-weight: 700;
}

.qq-skkn-badge-success {
    background-color: var(--qq-skkn-success-light);
    color: var(--qq-skkn-success);
}

.qq-skkn-badge-warning {
    background-color: var(--qq-skkn-warning-light);
    color: var(--qq-skkn-warning);
}

.qq-skkn-badge-danger {
    background-color: var(--qq-skkn-danger-light);
    color: var(--qq-skkn-danger);
}

.qq-skkn-badge-info {
    background-color: var(--qq-skkn-info-light);
    color: var(--qq-skkn-info);
}

/* Grid systems & Responsive Columns */
.qq-skkn-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.qq-skkn-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .qq-skkn-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .qq-skkn-wrapper {
        max-width: 95%;
        padding: 20px 0;
    }

    .qq-skkn-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .qq-skkn-grid-2,
    .qq-skkn-grid-3 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .qq-skkn-btn {
        width: 100%;
        display: flex;
    }
}

/* Hero (Showcase) - Gradient "ULIS Dawn" theo QQ-ULIS_design_system.md */
.qq-skkn-hero {
    background: linear-gradient(135deg, #0a131c 0%, var(--qq-skkn-primary) 55%, #7eb1d6 100%);
    color: #ffffff;
    padding: 60px 40px;
    border-radius: var(--qq-skkn-radius-marketing);
    text-align: center;
    box-shadow: var(--qq-skkn-shadow-lg);
    margin-bottom: 40px;
}

.qq-skkn-hero h1 {
    font-size: clamp(38px, 6vw, 72px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.04em;
    margin: 0 0 10px 0;
}

.qq-skkn-hero p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
    font-family: var(--qq-skkn-font-serif);
    font-style: italic;
}

/* Login page */
.qq-skkn-login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--qq-skkn-bg);
    min-height: 100vh;
}

.qq-skkn-login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.qq-skkn-login-box {
    width: 100%;
    max-width: 450px;
    background: #ffffff;
    border-radius: var(--qq-skkn-radius-marketing);
    box-shadow: var(--qq-skkn-shadow-lg);
    padding: 35px;
    border: 1px solid var(--qq-skkn-border);
}

.qq-skkn-login-header {
    text-align: center;
    margin-bottom: 25px;
}

.qq-skkn-login-logo {
    margin-bottom: 15px;
}

.qq-skkn-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--qq-skkn-border);
}

.qq-skkn-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    color: var(--qq-skkn-text-muted);
    transition: var(--qq-skkn-transition);
}

.qq-skkn-tab-btn.active {
    color: var(--qq-skkn-primary);
    border-bottom: 3px solid var(--qq-skkn-primary);
    margin-bottom: -2px;
}

.qq-skkn-tab-btn.inactive {
    opacity: 0.5;
}

/* Custom Showcase Filter Grid for single-row desktop layout */
.qq-skkn-showcase-filter-form {
    display: grid;
    grid-template-columns: 2.5fr 1.5fr auto;
    gap: 20px;
    align-items: flex-end;
}

/* Strict Logo Sizes */
.qq-skkn-logo, .qq-skkn-login-logo {
    max-width: 140px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    display: inline-block;
}

@media (max-width: 768px) {
    .qq-skkn-showcase-filter-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Footer Styling */
.qq-skkn-footer-wrapper {
    background: var(--qq-skkn-primary);
    color: #ffffff;
    border-top: 1px solid var(--qq-skkn-primary-hover);
    margin-top: 50px;
    font-family: var(--qq-skkn-font);
}

.qq-skkn-footer-col h3 {
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 8px;
    display: inline-block;
}

.qq-skkn-footer-col p,
.qq-skkn-footer-col div {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
}

.qq-skkn-footer-col a {
    color: #fbf3e2;
    text-decoration: none;
    font-weight: 700;
    transition: var(--qq-skkn-transition);
}

.qq-skkn-footer-col a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Custom Grid for Submission Detail Page */
.qq-skkn-grid-submission {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 25px;
    align-items: start;
}
@media (max-width: 1024px) {
    .qq-skkn-grid-submission {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Layout WordPress-style cho trang Admin Settings (thay the inline flex canh tay) */
.qq-skkn-settings-layout {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 20px;
}

.qq-skkn-settings-nav {
    width: 280px;
    padding: 15px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qq-skkn-settings-content {
    flex: 1;
    min-width: 320px;
    padding: 30px;
}

.qq-skkn-settings-nav-btn {
    text-align: left;
    padding: 12px 15px;
    border: 0;
    background: none;
    border-radius: 10px;
    font-weight: 700;
    color: var(--qq-skkn-text-dark);
    cursor: pointer;
    transition: var(--qq-skkn-transition);
}

.qq-skkn-settings-nav-btn:hover {
    background: rgba(0, 71, 128, 0.05);
    color: var(--qq-skkn-primary);
}

.qq-skkn-settings-nav-btn.is-active {
    background: var(--qq-skkn-primary) !important;
    color: #ffffff !important;
}
