/* ================================================
   โรงเรียนจอมสุรางค์อุปถัมภ์
   ระบบยืนยันการเข้าเรียนต่อ ปีการศึกษา 2569
   Main Stylesheet
   ================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
    --primary:         #6a0dad;
    --primary-dark:    #4a0080;
    --primary-light:   #9c27b0;
    --primary-pale:    #f3e8ff;
    --accent:          #ffd700;
    --accent-dark:     #e6be00;
    --success:         #28a745;
    --success-light:   #d4edda;
    --success-dark:    #155724;
    --danger:          #dc3545;
    --danger-light:    #f8d7da;
    --danger-dark:     #721c24;
    --warning:         #ffc107;
    --warning-light:   #fff3cd;
    --info-bg:         #e8f4f8;
    --text:            #2d3748;
    --text-muted:      #718096;
    --border:          #e2e8f0;
    --bg:              #f7f8fc;
    --white:           #ffffff;
    --shadow:          0 4px 24px rgba(106,13,173,0.10);
    --shadow-lg:       0 12px 48px rgba(106,13,173,0.18);
    --radius:          14px;
    --radius-sm:       8px;
    --radius-lg:       20px;
    --transition:      all 0.25s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Sarabun', 'Tahoma', sans-serif;
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: linear-gradient(135deg, #1a0030 0%, #3d0070 40%, #6a0dad 80%, #9c27b0 100%);
    position: relative;
    overflow: visible;
    padding: 32px 20px 40px;
}

/* Background animated shapes */
.login-bg { position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    background: white;
    animation: floatShape 8s ease-in-out infinite;
}
.shape1 { width: 600px; height: 600px; top: -200px; right: -150px; animation-delay: 0s; }
.shape2 { width: 400px; height: 400px; bottom: -100px; left: -100px; animation-delay: 3s; }
.shape3 { width: 200px; height: 200px; top: 30%; left: 10%; animation-delay: 5s; }

@keyframes floatShape {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-30px) scale(1.05); }
}

.login-wrapper {
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* School Header */
.school-header {
    text-align: center;
    color: white;
    margin-bottom: 28px;
    animation: fadeInDown 0.6s ease;
}
.school-logo { margin-bottom: 12px; }
.logo-emblem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.15);
    border: 3px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    font-size: 22px;
    font-weight: 800;
    color: white;
    letter-spacing: -1px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.school-name {
    font-size: 22px;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    letter-spacing: 0.3px;
}
.school-sub {
    font-size: 13px;
    opacity: 0.75;
    margin-top: 4px;
}

/* Login Card */
.login-card {
    width: 100%;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.1);
    overflow: hidden;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.card-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 28px 32px 24px;
    text-align: center;
}
.card-icon {
    width: 52px; height: 52px;
    margin: 0 auto 12px;
    background: rgba(255,255,255,0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.25);
}
.card-icon svg { width: 26px; height: 26px; }
.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}
.card-subtitle {
    font-size: 14px;
    opacity: 0.85;
}

/* Form */
.login-card form { padding: 28px 32px 24px; }

.form-group { margin-bottom: 20px; }

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.form-label svg { width: 16px; height: 16px; color: var(--primary); }

.form-input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Sarabun', sans-serif;
    font-size: 16px;
    color: var(--text);
    background: white;
    transition: var(--transition);
    outline: none;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(106,13,173,0.12);
}
.form-input::placeholder { color: #b0b8c9; }

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.input-wrapper { position: relative; }
.input-wrapper .form-input { padding-right: 48px; }
.toggle-pass {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.toggle-pass:hover { color: var(--primary); }
.toggle-pass svg { width: 18px; height: 18px; }

.btn-login {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Sarabun', sans-serif;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: 8px;
    box-shadow: 0 4px 16px rgba(106,13,173,0.3);
    letter-spacing: 0.3px;
}
.btn-login:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 6px 24px rgba(106,13,173,0.4);
    transform: translateY(-1px);
}
.btn-login:active { transform: translateY(0); }
.btn-login svg { width: 18px; height: 18px; }
.btn-login.loading {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

/* Alert */
.alert {
    margin: 0 32px 0;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: -8px;
    margin-top: 20px;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; }
.alert-error {
    background: var(--danger-light);
    color: var(--danger-dark);
    border: 1px solid #f5c6cb;
}

/* Notice */
.login-notice {
    margin: 0 32px 28px;
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--warning-light);
    border: 1px solid #ffc107;
    border-radius: var(--radius-sm);
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: #856404;
    line-height: 1.5;
}
.notice-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* Public Links Section */
.public-links {
    width: 100%;
    align-self: stretch;
    margin-top: 16px;
    -webkit-animation: fadeInUp 0.6s ease 0.2s both;
    animation: fadeInUp 0.6s ease 0.2s both;
}
.public-links-title {
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}
.public-links-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.btn-public {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-family: 'Sarabun', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
    letter-spacing: 0.2px;
    box-sizing: border-box;
}
.btn-public svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-public-m1 {
    background: rgba(13,110,253,0.25);
    color: #a8d4ff;
    border-color: rgba(13,110,253,0.4);
}
.btn-public-m1:hover {
    background: rgba(13,110,253,0.45);
    color: white;
    border-color: rgba(13,110,253,0.7);
    transform: translateY(-1px);
}
.btn-public-m4 {
    background: rgba(232,62,140,0.25);
    color: #ffb3d9;
    border-color: rgba(232,62,140,0.4);
}
.btn-public-m4:hover {
    background: rgba(232,62,140,0.45);
    color: white;
    border-color: rgba(232,62,140,0.7);
    transform: translateY(-1px);
}
@media (max-width: 480px) {
    .public-links-row { flex-direction: column; }
    .btn-public { min-width: 100%; }
}

/* Footer */
.login-footer {
    color: rgba(255,255,255,0.55);
    font-size: 12px;
    text-align: center;
    margin-top: 20px;
    animation: fadeIn 0.8s ease 0.3s both;
}


/* ============================================
   TOPNAV
   ============================================ */
.topnav {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 0 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topnav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 16px;
}
.topnav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-logo {
    width: 42px; height: 42px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}
.nav-info { display: flex; flex-direction: column; }
.nav-school { font-size: 15px; font-weight: 700; line-height: 1.2; }
.nav-system { font-size: 12px; opacity: 0.7; }

.topnav-right { display: flex; align-items: center; gap: 12px; }
.nav-user {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    opacity: 0.85;
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 20px;
}
.nav-user svg { width: 15px; height: 15px; }

.btn-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    padding: 7px 14px;
    border-radius: 8px;
    font-family: 'Sarabun', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}
.btn-logout:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.4);
}
.btn-logout svg { width: 15px; height: 15px; }

/* ============================================
   CONFIRM PAGE
   ============================================ */
.confirm-body {
    background: var(--bg);
    min-height: 100vh;
}

.confirm-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px 40px;
}

/* Page Title Section */
.page-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    animation: fadeInDown 0.5s ease;
}
.level-badge {
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}
.level-m1 { background: linear-gradient(135deg, #0d6efd, #6610f2); }
.level-m4 { background: linear-gradient(135deg, #e83e8c, #fd7e14); }

.page-title-text h1 { font-size: 22px; font-weight: 700; color: var(--primary); }
.page-title-text p  { font-size: 14px; color: var(--text-muted); margin-top: 2px; }

/* Status Banner */
.status-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    animation: fadeIn 0.5s ease;
}
.status-icon { font-size: 22px; }
.status-text { display: flex; flex-direction: column; gap: 2px; }
.status-text strong { font-size: 15px; font-weight: 700; }
.status-text span   { font-size: 13px; }

.status-confirmed {
    background: var(--success-light);
    border: 1px solid #c3e6cb;
    color: var(--success-dark);
}
.status-declined {
    background: var(--danger-light);
    border: 1px solid #f5c6cb;
    color: var(--danger-dark);
}
.status-pending {
    background: var(--warning-light);
    border: 1px solid #ffc107;
    color: #856404;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    animation: fadeIn 0.5s ease 0.1s both;
}
@media (max-width: 768px) {
    .content-grid { grid-template-columns: 1fr; }
}

/* Cards */
.info-card, .confirm-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}

.card-header-styled {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-size: 15px;
    font-weight: 700;
}
.card-header-styled svg { width: 18px; height: 18px; }

/* Student Profile */
.student-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: var(--primary-pale);
}
.student-photo {
    width: 70px; height: 70px;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid var(--primary);
    flex-shrink: 0;
}
.student-photo img { width: 100%; height: 100%; object-fit: cover; }
.student-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-pale), #e9d5ff);
    color: var(--primary);
}
.student-photo-placeholder svg { width: 36px; height: 36px; }

.student-name-block { display: flex; flex-direction: column; gap: 6px; }
.student-fullname { font-size: 17px; font-weight: 700; color: var(--primary-dark); }
.student-inv-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* Info Table */
.info-table { padding: 12px 0; }
.info-row {
    display: flex;
    padding: 9px 20px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    gap: 8px;
}
.info-row:last-child { border-bottom: none; }
.info-label {
    width: 160px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-weight: 500;
}
.info-value { color: var(--text); font-weight: 600; }
.info-value.highlight { color: var(--primary); font-size: 15px; }

/* Confirm Form */
.confirm-notice {
    margin: 20px 20px 0;
    padding: 12px 14px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--radius-sm);
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: #856404;
    line-height: 1.5;
}
.confirm-notice svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: #ffc107; }

/* Radio Options */
.radio-group { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.radio-option {
    display: block;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.radio-option:hover { border-color: var(--primary); background: var(--primary-pale); }
.radio-option.selected.radio-confirm {
    border-color: var(--success);
    background: var(--success-light);
}
.radio-option.selected.radio-decline {
    border-color: var(--danger);
    background: var(--danger-light);
}

.radio-content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.radio-icon-wrap { font-size: 28px; flex-shrink: 0; line-height: 1; }
.radio-text-wrap { display: flex; flex-direction: column; gap: 4px; }
.radio-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.radio-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* Confirm Checkbox */
.confirm-check-wrap {
    padding: 0 20px 16px;
}
.confirm-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}
.confirm-check-label input[type="checkbox"] {
    width: 18px; height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Submit Button */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 40px);
    margin: 4px 20px 20px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Sarabun', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(106,13,173,0.3);
}
.btn-submit:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(106,13,173,0.4);
}
.btn-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.btn-submit svg { width: 18px; height: 18px; }

/* Already Confirmed */
.already-confirmed { padding: 20px; }
.result-display {
    border-radius: var(--radius-sm);
    padding: 24px;
    text-align: center;
    margin-bottom: 16px;
}
.result-yes {
    background: var(--success-light);
    border: 2px solid #c3e6cb;
}
.result-no {
    background: var(--danger-light);
    border: 2px solid #f5c6cb;
}
.result-icon   { font-size: 40px; margin-bottom: 8px; }
.result-label  { font-size: 18px; font-weight: 700; color: var(--text); }
.result-level  { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.result-date   { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

.confirmed-notice {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: var(--info-bg);
    border-radius: var(--radius-sm);
    border: 1px solid #bee5eb;
    font-size: 13px;
    color: #0c5460;
    margin-bottom: 16px;
    line-height: 1.5;
}
.confirmed-notice svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: #17a2b8; }

.btn-print {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    font-family: 'Sarabun', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}
.btn-print:hover {
    background: var(--primary-pale);
}
.btn-print svg { width: 16px; height: 16px; }

/* Page Error */
.page-error {
    text-align: center;
    padding: 60px 24px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 40px auto;
    max-width: 500px;
}
.error-icon { font-size: 64px; margin-bottom: 16px; }
.page-error h2 { font-size: 22px; color: var(--text); margin-bottom: 8px; }
.page-error p  { font-size: 15px; color: var(--text-muted); margin-bottom: 24px; }
.btn-back {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
}
.btn-back:hover { background: var(--primary-dark); }

/* ============================================
   RESULT PAGE
   ============================================ */
.result-body {
    background: var(--bg);
    min-height: 100vh;
}

.result-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 28px 20px 40px;
}

/* Result Hero */
.result-hero {
    border-radius: var(--radius);
    padding: 40px 32px;
    text-align: center;
    margin-bottom: 24px;
    animation: fadeIn 0.6s ease;
    box-shadow: var(--shadow);
}
.hero-confirmed {
    background: linear-gradient(135deg, #0d6b3a, #28a745);
    color: white;
}
.hero-declined {
    background: linear-gradient(135deg, #7a1d2b, #dc3545);
    color: white;
}

.result-animation { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.checkmark-circle, .decline-circle {
    width: 80px; height: 80px;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.checkmark-circle svg, .decline-circle svg { width: 80px; height: 80px; }

.checkmark-path {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: drawCheck 0.6s ease 0.3s forwards;
}
@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

.result-title { font-size: 28px; font-weight: 800; }
.result-subtitle { font-size: 15px; opacity: 0.85; }

/* Result Card */
.result-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    animation: fadeInUp 0.5s ease 0.2s both;
}

.result-card-header {
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-size: 15px;
    font-weight: 700;
}

.result-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0;
}

.result-info-item {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
}
.result-info-item:nth-child(even) { border-right: none; }
.result-info-item.full-width {
    grid-column: 1 / -1;
    border-right: none;
}

.result-info-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.result-info-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.result-info-value.large { font-size: 18px; }

/* Status Tags */
.status-tag {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}
.tag-confirmed { background: var(--success-light); color: var(--success-dark); }
.tag-declined  { background: var(--danger-light);  color: var(--danger-dark);  }

/* Result Actions */
.result-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    animation: fadeInUp 0.5s ease 0.3s both;
}

.btn-print-result, .btn-view-result, .btn-logout-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-family: 'Sarabun', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    flex: 1;
    min-width: 130px;
}
.btn-print-result svg, .btn-view-result svg, .btn-logout-result svg { width: 16px; height: 16px; }

.btn-print-result {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(106,13,173,0.3);
}
.btn-print-result:hover {
    box-shadow: 0 6px 20px rgba(106,13,173,0.4);
    transform: translateY(-1px);
}

.btn-view-result {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-view-result:hover { background: var(--primary-pale); }

.btn-logout-result {
    background: #f8f9fa;
    color: var(--text-muted);
    border: 2px solid var(--border);
}
.btn-logout-result:hover { background: #e9ecef; }

.result-notice {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.8;
    animation: fadeIn 0.5s ease 0.4s both;
}

/* Page Footer */
.page-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.5);
    text-align: center;
    padding: 16px;
    font-size: 13px;
    margin-top: 20px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn       { from { opacity: 0; }           to { opacity: 1; } }
@keyframes fadeInDown   { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp     { from { opacity: 0; transform: translateY(20px);  } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn      { from { transform: scale(0.5); opacity: 0; }   to { transform: scale(1); opacity: 1; } }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .topnav-inner { height: 56px; }
    .nav-system   { display: none; }

    .confirm-wrapper { padding: 16px 12px 32px; }
    .result-wrapper  { padding: 16px 12px 32px; }

    .content-grid { grid-template-columns: 1fr; }
    .result-info-grid { grid-template-columns: 1fr; }
    .result-info-item { border-right: none; }

    .login-card form { padding: 20px 20px 16px; }
    .card-header { padding: 20px 20px 18px; }
    .alert, .login-notice { margin-left: 20px; margin-right: 20px; }

    .result-hero { padding: 28px 16px; }
    .result-title { font-size: 22px; }

    .result-actions { flex-direction: column; }

    .school-name { font-size: 18px; }

    .info-label { width: 130px; font-size: 13px; }
}
