/* ═══════════════════════════════════════════════════
   MSSV Lookup — Đại học Kiên Giang
   Premium Design System
   ═══════════════════════════════════════════════════ */

/* ━━━ CSS Custom Properties ━━━ */
:root {
    --primary: #1a56db;
    --primary-light: #3b82f6;
    --primary-lighter: #93bbfd;
    --primary-dark: #1e3a8a;
    --primary-bg: #e8f0fe;
    --primary-bg-light: #f0f5ff;

    --accent: #f59e0b;
    --accent-light: #fbbf24;

    --success: #059669;
    --success-bg: #d1fae5;
    --error: #dc2626;
    --error-bg: #fee2e2;
    --warning: #d97706;
    --warning-bg: #fef3c7;

    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --bg: #f0f4ff;
    --bg-card: rgba(255, 255, 255, 0.88);
    --bg-card-solid: #ffffff;
    --border: rgba(26, 86, 219, 0.12);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(26, 86, 219, 0.08);
    --shadow-lg: 0 12px 40px rgba(26, 86, 219, 0.12);
    --shadow-xl: 0 20px 60px rgba(26, 86, 219, 0.15);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --font: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ━━━ Reset & Base ━━━ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
    overscroll-behavior: none;
    touch-action: manipulation; /* Prevent double-tap zoom on mobile */
    -webkit-font-smoothing: antialiased;
    display: flex;
    align-items: center;
}

/* ━━━ Animated Background ━━━ */
.bg-animated {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f5f3ff 100%);
}

.bg-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#cbd5e1 1.5px, transparent 1.5px);
    background-size: 32px 32px;
    opacity: 0.4;
}

.bg-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    max-width: 600px;
    height: 80vw;
    max-height: 600px;
    background: url('images/logo_kgu.png') center/contain no-repeat;
    opacity: 0.1;
    pointer-events: none;
}

/* ━━━ Skeleton Loader ━━━ */
.skeleton {
    animation: skeleton-pulse 1.5s infinite ease-in-out;
    background-color: #e2e8f0;
    border-radius: 4px;
}

@keyframes skeleton-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* ━━━ Container ━━━ */
.container {
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    padding: 10px 20px;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    overscroll-behavior: none;
    touch-action: pan-y;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.container::-webkit-scrollbar {
    display: none;
}

/* ━━━ Marquee Notice Banner ━━━ */
.marquee-container {
    width: 100%;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: stretch;
    height: 48px;
    overflow: hidden;
    position: relative;
    z-index: 90;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.marquee-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    background-color: #3b82f6;
    color: white;
    z-index: 2;
    box-shadow: 2px 0 8px rgba(0,0,0,0.05);
    position: relative;
}

.marquee-icon::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to right, #f8fafc 0%, transparent 100%);
    z-index: 1;
}

.marquee-icon svg {
    width: 20px;
    height: 20px;
}

.marquee-content {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.marquee-content::before, .marquee-content::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    z-index: 2;
}

.marquee-content::before {
    left: 0;
    background: linear-gradient(to right, #f8fafc, transparent);
}
.marquee-content::after {
    right: 0;
    background: linear-gradient(to left, #f8fafc, transparent);
}

.marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
}

.marquee-text strong {
    color: #dc2626;
    font-weight: 700;
    margin-right: 8px;
    background: rgba(220, 38, 38, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.marquee-container:hover .marquee-text {
    animation-play-state: paused;
}

@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* ━━━ Header ━━━ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    margin-bottom: 12px;
    animation: fadeSlideDown 0.6s ease-out;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.logo-sub {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ━━━ Author Badge (QGP) ━━━ */
.author-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    line-height: 1;
}

.author-badge:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(124, 58, 237, 0.15));
    border-color: rgba(124, 58, 237, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.dev-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.dev-name {
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

/* ━━━ Hero ━━━ */
.hero {
    text-align: center;
    padding: 20px 0 8px;
    position: relative;
    animation: fadeSlideDown 0.7s ease-out 0.1s both;
}

.hero-decoration {
    position: absolute;
    top: -10px;
    right: 20px;
    opacity: 0.85;
}

.grad-cap {
    width: 70px;
    height: 70px;
    animation: bounce 3s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
}

.hero-title {
    margin-bottom: 12px;
}

.hero-title-line1 {
    display: block;
    font-size: clamp(20px, 4vw, 26px);
    font-weight: 700;
    color: var(--text);
    letter-spacing: 1px;
}

.hero-title-line2 {
    display: block;
    font-size: clamp(28px, 6vw, 42px);
    font-weight: 900;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    line-height: 1.4; /* Increased from 1.15 to prevent clipping of Vietnamese accents */
    padding-top: 0.15em; /* Extra padding to show ascenders */
    padding-bottom: 0.1em;
    margin-top: -0.15em; /* Offset padding */
    margin-bottom: -0.1em;
}

.hero-title-line3 {
    display: block;
    font-size: clamp(18px, 3.5vw, 24px);
    font-weight: 700;
    color: var(--text);
    letter-spacing: 2px;
    margin-top: 2px;
}

.hero-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ━━━ Card ━━━ */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    margin: 24px 0;
    box-shadow: var(--shadow-lg);
    animation: fadeSlideUp 0.7s ease-out 0.2s both;
    transition: box-shadow var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-xl);
}

/* ━━━ Form ━━━ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-card-solid);
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.input-wrapper.input-error {
    border-color: var(--error);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
    animation: shake 0.4s ease-in-out;
}

.input-wrapper.input-valid {
    border-color: var(--success);
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color var(--transition);
}

.input-wrapper:focus-within .input-icon {
    color: var(--primary-light);
}

.input-icon svg {
    width: 22px;
    height: 22px;
}

.form-input {
    flex: 1;
    height: 52px;
    border: none;
    outline: none;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    background: transparent;
    padding-right: 44px;
}

.form-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.input-status {
    position: absolute;
    right: 14px;
    width: 22px;
    height: 22px;
    opacity: 0;
    transition: opacity var(--transition);
}

.input-status.show {
    opacity: 1;
}

/* ━━━ Submit Button ━━━ */
.btn-submit {
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
    margin-top: 4px;
}

.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15));
    opacity: 0;
    transition: opacity var(--transition);
}

.btn-submit:hover:not(:disabled)::before {
    opacity: 1;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 86, 219, 0.35);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

.btn-loader {
    display: none;
}

.btn-submit.loading .btn-text,
.btn-submit.loading .btn-icon {
    visibility: hidden;
}

.btn-submit.loading .btn-loader {
    display: flex;
    position: absolute;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ━━━ Messages ━━━ */
.message {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-top: 18px;
    font-size: 13px;
    font-weight: 500;
    animation: fadeSlideUp 0.3s ease-out;
}

.message.show {
    display: flex;
}

.message-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(220, 38, 38, 0.15);
}

.message-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(217, 119, 6, 0.15);
}

.message-icon svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ━━━ Skeleton Loader ━━━ */
.skeleton-card {
    display: none;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    margin: 24px 0;
    box-shadow: var(--shadow-lg);
}

.skeleton-card.show {
    display: block;
    animation: resultReveal 0.4s ease-out;
}

.skel-badge {
    width: 180px;
    height: 30px;
    border-radius: 20px;
    margin: -10px auto 30px;
    background: #e2e8f0;
}

.skel-congrats {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.skel-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e2e8f0;
    margin-bottom: 16px;
}

.skel-line {
    height: 16px;
    border-radius: 8px;
    background: #e2e8f0;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.skel-line::after, .skel-circle::after, .skel-badge::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

.skel-title { width: 160px; height: 28px; margin-bottom: 16px; }
.skel-subtitle { width: 240px; }
.skel-subtitle.short { width: 180px; }

.skel-section {
    margin-bottom: 24px;
}

.skel-section-title { width: 140px; margin-bottom: 12px; }

.skel-box {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
}

.skel-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.skel-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e2e8f0;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.skel-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 1.5s infinite;
}

.skel-row .skel-line { margin: 0; width: 100%; max-width: 200px; height: 14px; }

/* ━━━ Result Card (New Design) ━━━ */
.result-card {
    display: none;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    margin: 24px 0;
    box-shadow: var(--shadow-lg);
    animation: resultReveal 0.6s ease-out;
}

.result-card.show {
    display: block;
}

/* Chúc mừng */
.result-congrats {
    text-align: center;
    margin-bottom: 32px;
}

.result-congrats .result-icon-wrap {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.25);
    position: relative;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.result-congrats .result-icon-wrap::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #22c55e;
    animation: pulseIcon 2s infinite;
}

@keyframes pulseIcon {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}

.result-congrats .result-icon-wrap svg {
    width: 32px;
    height: 32px;
}

.congrats-title {
    font-size: 26px;
    font-weight: 800;
    color: #22c55e;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.congrats-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.highlight-text {
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
}

/* Sections */
.result-section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Info List Box (Replacing student-info-box and admission-details) */
.info-list-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
}

.info-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.info-list-row:last-child {
    border-bottom: none;
}

.info-list-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-list-icon {
    width: 20px;
    height: 20px;
    color: #3b82f6;
    flex-shrink: 0;
}

.detail-label {
    color: #475569;
    font-size: 14px;
    font-weight: 500;
}

.detail-value {
    color: #1e293b;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
}

/* MSSV Box */
.mssv-box {
    background: #eff6ff;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mssv-value-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mssv-value {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}

.btn-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: #f3f4f6 !important;
}

.btn-copy svg {
    width: 18px;
    height: 18px;
}

/* Actions */
.result-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.btn-action {
    flex: 1 1 200px; /* Allow wrapping and growing */
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action svg {
    width: 18px;
    height: 18px;
}

.btn-print {
    background: white;
    border: 2px solid var(--primary-lighter);
    color: var(--primary);
}

.btn-print:hover {
    background: #f0f5ff;
    border-color: var(--primary);
}

.btn-home {
    background: var(--primary);
    border: 2px solid var(--primary);
    color: white;
}

.btn-home:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ━━━ Not Found Card ━━━ */
.not-found-card {
    display: none;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 24px 0;
    box-shadow: var(--shadow-lg);
    animation: resultReveal 0.5s ease-out;
}

.not-found-card.show {
    display: block;
}

.not-found-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.not-found-icon-wrap {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
    animation: shake 0.5s ease-in-out;
}

.not-found-icon-wrap svg {
    width: 32px;
    height: 32px;
}

.not-found-title {
    font-size: 22px;
    font-weight: 800;
    color: #ef4444;
    margin-bottom: 4px;
}

.not-found-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.not-found-info-box {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.info-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
}

.info-icon {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.info-icon svg {
    width: 20px;
    height: 20px;
}

.info-text {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.info-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.not-found-message {
    display: flex;
    gap: 16px;
    align-items: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 20px;
    border-radius: var(--radius-md);
}

.nf-msg-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.nf-msg-icon svg {
    width: 24px;
    height: 24px;
}

.nf-msg-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-dark);
    line-height: 1.6;
}

.btn-retry {
    background: white;
    border: 2px solid var(--primary-lighter);
    color: var(--primary);
}

.btn-retry:hover {
    background: #f0f5ff;
    border-color: var(--primary);
}

/* ━━━ Features ━━━ */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 12px 0 20px;
    animation: fadeSlideUp 0.7s ease-out 0.4s both;
}

.feature-card {
    text-align: center;
    padding: 24px 16px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    border-radius: 50%;
    transition: transform var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-icon-fast {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: var(--accent);
}

.feature-icon-secure {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: var(--primary);
}

.feature-icon-accurate {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: var(--success);
}

.feature-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.feature-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ━━━ Footer ━━━ */
.footer {
    text-align: center;
    padding: 16px 0;
    animation: fadeSlideUp 0.7s ease-out 0.5s both;
}

.footer-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-bg);
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 12px;
}

.footer-copy {
    font-size: 12px;
    color: var(--text-muted);
}

/* ━━━ Animations ━━━ */
@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideRight {
    from { opacity: 0; transform: translateX(-16px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes resultReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.shake-animation {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

/* ━━━ Responsive ━━━ */
@media (max-width: 768px) {
    .info-list-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 16px;
    }
    
    .detail-value {
        width: 100%;
        text-align: left;
        padding-left: 32px;
    }
    
    .mssv-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    
    .mssv-value-wrap {
        width: 100%;
        justify-content: space-between;
    }
    
    .mssv-value {
        font-size: 20px;
        word-break: break-all;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .btn-action {
        flex: none;
        width: 100%;
    }
    
    .not-found-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .not-found-info-box {
        flex-direction: column;
        gap: 12px;
    }
}
@media (max-width: 600px) {
    .container {
        padding: 12px 16px 32px;
    }

    .header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .hero-decoration {
        display: none;
    }

    .hero-title-line2 {
        font-size: 28px;
    }

    .card {
        padding: 24px 20px;
        border-radius: var(--radius-md);
    }

    .features {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-card {
        display: flex;
        align-items: center;
        gap: 14px;
        text-align: left;
        padding: 16px 20px;
    }

    .feature-icon {
        margin: 0;
        flex-shrink: 0;
    }

    .result-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .result-value {
        text-align: left;
    }
}

@media (max-width: 380px) {
    .logo-title {
        font-size: 13px;
    }

    .hero-title-line2 {
        font-size: 24px;
    }
}



/* ━━━ Modal ━━━ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-overlay.show .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
    padding-right: 24px;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.modal-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.modal-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.modal-row:last-child {
    margin-bottom: 0;
}

.modal-icon-wrap {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.modal-text {
    display: flex;
    flex-direction: column;
}

.modal-text-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

.modal-text strong {
    font-size: 14px;
    color: #0f172a;
}

.doc-section {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.modal-subtitle {
    font-size: 14px;
    font-weight: 800;
    color: #1e40af;
    margin-bottom: 12px;
}

.modal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-list li {
    font-size: 13.5px;
    color: #334155;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.modal-list li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: #3b82f6;
    font-weight: bold;
}

.modal-list li:last-child {
    margin-bottom: 0;
}

.modal-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed #cbd5e1;
}

.contact-label {
    font-size: 13px;
    color: #64748b;
    border: none;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(168, 85, 247, 0); }
    100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
}

/* ━━━ Modal ━━━ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-overlay.show .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
    padding-right: 24px;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.modal-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.modal-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.modal-row:last-child {
    margin-bottom: 0;
}

.modal-icon-wrap {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.modal-text {
    display: flex;
    flex-direction: column;
}

.modal-text-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

.modal-text strong {
    font-size: 14px;
    color: #0f172a;
}

.doc-section {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.modal-subtitle {
    font-size: 14px;
    font-weight: 800;
    color: #1e40af;
    margin-bottom: 12px;
}

.modal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-list li {
    font-size: 13.5px;
    color: #334155;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.modal-list li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: #3b82f6;
    font-weight: bold;
}

.modal-list li:last-child {
    margin-bottom: 0;
}

.modal-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed #cbd5e1;
}

.contact-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.contact-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 12px 16px;
    border-radius: 12px;
}

.phone-icon {
    width: 24px;
    height: 24px;
    color: #16a34a;
    flex-shrink: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-phone {
    font-size: 18px;
    font-weight: 800;
    color: #166534;
    text-decoration: none;
}

.contact-name {
    font-size: 12px;
    color: #15803d;
    font-weight: 500;
}

/* ━━━ Letter Modal ━━━ */
.letter-content {
    padding: 0 !important;
    width: 90vw !important;
    max-width: 600px !important;
    background: transparent !important;
    box-shadow: none !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

.letter-image-wrap {
    position: relative;
    width: 100%;
    height: auto;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background: transparent;
}

.letter-image {
    width: 100%;
    height: auto;
    max-height: 90vh;
    display: block;
    object-fit: contain;
}

/* Close button for letter modal specifically */
#letter-modal .modal-close {
    top: -45px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
    z-index: 10;
}
#letter-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ━━━ Admission Badges ━━━ */
.badge-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.adm-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.adm-badge.chinh-thuc {
    background: #10b981;
    color: white;
}

.adm-badge.bo-sung {
    background: #f97316;
    color: white;
}

.adm-badge svg {
    width: 18px;
    height: 18px;
}

/* ??? Closed Screen ??? */
/* ━━━ Closed Screen (Exact Match) ━━━ */
.closed-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0 60px;
    animation: fadeIn 0.6s ease-out;
}

.closed-icon-illustration {
    width: 280px;
    height: 280px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatIcon 4s ease-in-out infinite;
}

.closed-icon-illustration svg {
    width: 100%;
    height: 100%;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.closed-title {
    font-size: 34px;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.closed-text-wrapper {
    text-align: center;
    margin-bottom: 32px;
}

.closed-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    line-height: 1.6;
    margin: 4px 0;
}

.closed-divider-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 400px;
}

.closed-line {
    flex: 1;
    height: 1px;
    background: #cbd5e1;
    position: relative;
}

.closed-line::after {
    content: '';
    position: absolute;
    top: -2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #94a3b8;
}

.closed-line.left::after { right: 0; }
.closed-line.right::after { left: 0; }

.closed-year {
    color: #64748b;
    font-size: 15px;
    font-weight: 600;
}

.closed-notice-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0f5ff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 16px 24px;
    color: #1e40af;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.05);
    max-width: 480px;
    width: 100%;
}

.closed-notice-box svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* ━━━ Support Ticket Modal Popup Styling (Bo góc & Modern UI) ━━━ */
#ticket-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

#ticket-modal .ticket-modal-card {
    background: #ffffff;
    border-radius: 24px !important;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 24px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
    scrollbar-width: thin;
}

#ticket-modal .ticket-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    border: none;
    background: #f1f5f9;
    width: 34px;
    height: 34px;
    border-radius: 50% !important;
    cursor: pointer;
    font-weight: 700;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
    line-height: 1;
}

#ticket-modal .ticket-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

#ticket-modal .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

#ticket-modal .form-label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 2px;
}

#ticket-modal input.form-input,
#ticket-modal textarea.form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 16px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #0f172a !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

#ticket-modal input.form-input:focus,
#ticket-modal textarea.form-input:focus {
    border-color: #2563eb !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
}

#ticket-modal input.form-input[readonly] {
    background: #f1f5f9 !important;
    color: #64748b !important;
    cursor: not-allowed;
    border-color: #e2e8f0 !important;
}

#ticket-modal textarea.form-input {
    min-height: 70px;
    resize: vertical;
}

#ticket-modal #sp-file-wrapper {
    border: 2px dashed #cbd5e1 !important;
    border-radius: 16px !important;
    padding: 22px 16px !important;
    text-align: center;
    background: #f8fafc !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

#ticket-modal #sp-file-wrapper:hover {
    border-color: #2563eb !important;
    background: #eff6ff !important;
}

#ticket-modal #ticket-img-preview {
    border-radius: 12px !important;
}

#ticket-modal .btn-submit {
    border-radius: 14px !important;
    height: 48px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
}

#ticket-modal .btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

#ticket-modal #sp-message {
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
}

/* ━━━ Public Ticket Tracking Modal (Responsive & Mobile-First) ━━━ */
#ticket-track-modal.ticket-track-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

#ticket-track-modal .ticket-track-dialog {
    background: #ffffff;
    border-radius: 24px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

#ticket-track-modal .ticket-track-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    box-sizing: border-box;
    width: 100%;
}

#ticket-track-modal .ticket-track-body {
    padding: 20px;
    overflow-y: auto;
    box-sizing: border-box;
    width: 100%;
}

.track-input-row {
    display: flex;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.track-input-row input {
    flex: 1;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    outline: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.track-input-row input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.track-input-row button {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-sizing: border-box;
    min-width: 90px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.track-input-row button:hover {
    background: #1d4ed8;
}

.track-input-row button:active {
    transform: scale(0.98);
}

#track-result-box {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    background: #f8fafc;
    box-sizing: border-box;
    width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 480px) {
    #ticket-track-modal.ticket-track-overlay {
        padding: 12px;
    }
    #ticket-track-modal .ticket-track-dialog {
        border-radius: 20px;
        max-width: 100%;
    }
    #ticket-track-modal .ticket-track-header {
        padding: 14px 16px;
    }
    #ticket-track-modal .ticket-track-body {
        padding: 16px 14px;
    }
    .track-input-row {
        flex-direction: column;
        gap: 10px;
    }
    .track-input-row button {
        width: 100%;
        padding: 13px;
        font-size: 15px;
    }
}

/* ━━━ 1-Click Error Context & Clipboard Button ━━━ */
.error-msg-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.error-action-row {
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.btn-copy-error-context {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #b91c1c;
    background: #ffffff;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-copy-error-context:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
    transform: translateY(-1px);
}

.btn-copy-error-context.copied {
    background: #ecfdf5 !important;
    border-color: #6ee7b7 !important;
    color: #047857 !important;
}

.nf-copy-btn {
    color: #2563eb;
    border-color: #bfdbfe;
    background: #eff6ff;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.nf-copy-btn:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}

/* ━━━ Emergency Zalo Support Suite (Package B) ━━━ */
.zalo-floating-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Tooltip */
.zalo-floating-tooltip {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
    pointer-events: none;
    position: relative;
    animation: zaloTooltipPulse 2.8s ease-in-out infinite;
    opacity: 0.95;
    transition: opacity 0.2s ease;
}

.zalo-floating-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(15, 23, 42, 0.9);
}

/* Floating Trigger Button */
.zalo-floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #0068FF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 104, 255, 0.38);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.zalo-floating-btn svg {
    width: 32px;
    height: 32px;
    display: block;
}

.zalo-floating-btn .zalo-pulse-ring {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: rgba(0, 104, 255, 0.3);
    z-index: -1;
    animation: zaloRingPulse 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

.zalo-floating-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 104, 255, 0.5);
}

.zalo-floating-btn:active {
    transform: scale(0.96);
}

/* Desktop Popover Card */
.zalo-popover-card {
    position: absolute;
    bottom: 68px;
    right: 0;
    width: 320px;
    max-width: 320px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 104, 255, 0.08);
    padding: 16px;
    display: none;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000;
}

.zalo-popover-card.show {
    display: block !important;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.zalo-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.zalo-popover-title-box {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.zalo-popover-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.2px;
}

.zalo-online-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
}

.zalo-online-status.online {
    color: #059669;
}

.zalo-online-status.offline {
    color: #64748b;
}

.status-dot-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    display: inline-block;
}

.zalo-online-status.online .status-dot-pulse {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
    animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.25); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.zalo-popover-close {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

.zalo-popover-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Channel Tabs */
.zalo-channel-tabs {
    display: flex;
    gap: 6px;
    margin: 12px 0;
}

.zalo-tab-btn {
    flex: 1;
    padding: 8px 10px;
    border-radius: 9px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.zalo-tab-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.zalo-tab-btn.active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12);
}

/* QR Code Box */
.zalo-qr-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.zalo-qr-svg-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 8px;
    border-radius: 8px;
    width: 140px;
    height: 140px;
    max-width: 140px;
    max-height: 140px;
    margin: 0 auto 8px auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    box-sizing: border-box;
}

.zalo-qr-svg-wrapper svg,
.zalo-qr-svg-wrapper img {
    width: 100% !important;
    height: 100% !important;
    max-width: 124px !important;
    max-height: 124px !important;
    object-fit: contain;
    shape-rendering: crispEdges;
}

.zalo-qr-hint {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

/* Popover Action Button */
.zalo-popover-actions {
    margin-top: 10px;
}

.btn-zalo-open-web {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: linear-gradient(135deg, #0068FF, #0052cc);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 104, 255, 0.28);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.btn-zalo-open-web:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 104, 255, 0.4);
}

.zalo-popover-hours {
    margin-top: 8px;
    text-align: center;
    font-size: 10.5px;
    color: #64748b;
    line-height: 1.4;
}

/* Animations */
@keyframes zaloRingPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.25); opacity: 0; }
    100% { transform: scale(1.25); opacity: 0; }
}

@keyframes zaloTooltipPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .zalo-popover-card {
        position: fixed !important;
        bottom: 84px !important;
        right: 16px !important;
        left: 16px !important;
        width: auto !important;
        max-width: 360px !important;
        margin: 0 auto !important;
        max-height: calc(100vh - 100px) !important;
        overflow-y: auto !important;
        z-index: 10001 !important;
        box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 104, 255, 0.15) !important;
        background: #ffffff !important;
    }
    .zalo-popover-card:not(.show) {
        display: none !important;
    }
    .zalo-popover-card.show {
        display: block !important;
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
        visibility: visible !important;
    }
    .zalo-floating-tooltip {
        display: none !important;
    }
    input[type="text"], input[type="tel"], input[type="number"], select, textarea {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    .zalo-floating-container {
        bottom: 18px;
        right: 18px;
    }
    .zalo-floating-btn {
        width: 52px;
        height: 52px;
    }
    .zalo-popover-card {
        bottom: 76px !important;
        right: 12px !important;
        left: 12px !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100vh - 90px) !important;
        margin: 0 auto !important;
    }
    .zalo-popover-card.show {
        display: block !important;
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
        visibility: visible !important;
    }
}

/* Offline Network Interruption Banner */
.network-interruption-banner {
    animation: slideDownBanner 0.3s ease-out;
}
@keyframes slideDownBanner {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Search Keyword Highlight */
mark.search-hl, .search-hl {
    background: #fef08a !important;
    color: #854d0e !important;
    padding: 1px 3px !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
}

