/**
 * Modern Academic Graduation UI Stylesheet
 * Responsive Design for Mobile, Tablet & Desktop
 */

:root {
    --primary: #d97706;
    --primary-light: #f59e0b;
    --primary-dark: #b45309;
    --primary-glow: rgba(217, 119, 6, 0.25);
    
    --secondary: #0f172a;
    --secondary-light: #1e293b;
    --secondary-dark: #020617;
    
    --accent: #3b82f6;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-subtle: #f8fafc;
    
    --border-color: #e2e8f0;
    --border-highlight: #fde68a;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px -1px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
    --shadow-xl: 0 20px 35px -5px rgba(15, 23, 42, 0.12), 0 10px 15px -5px rgba(15, 23, 42, 0.04);
    --shadow-gold: 0 8px 20px -3px rgba(217, 119, 6, 0.35);
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles & Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Sarabun', 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Background Atmospheric Glows */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

.bg-glow-1 {
    top: -150px;
    right: -100px;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, rgba(217, 119, 6, 0.05) 70%);
}

.bg-glow-2 {
    bottom: -150px;
    left: -100px;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(15, 23, 42, 0.05) 70%);
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.main-wrapper {
    flex: 1;
    padding: 24px 0 48px;
}

/* Header & Navbar */
.app-header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-white);
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.3rem;
    box-shadow: var(--shadow-gold);
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: 'Prompt', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: #fff;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: #cbd5e1;
    font-weight: 400;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    color: #fbbf24;
    font-weight: 500;
}

.btn-admin-nav {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-admin-nav:hover {
    background: rgba(217, 119, 6, 0.25);
    border-color: #f59e0b;
    color: #fbbf24;
    transform: scale(1.08);
}

/* Hero Search Card */
.hero-section {
    margin-bottom: 24px;
}

.hero-card {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    color: var(--text-white);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 70%);
    pointer-events: none;
}

.hero-header {
    text-align: center;
    margin-bottom: 28px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    padding: 8px 22px;
    border-radius: var(--radius-full);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.2);
    letter-spacing: 0.3px;
    flex-wrap: wrap;
    justify-content: center;
}

.ceremony-badge-icon {
    font-size: 1.3rem;
    color: #f59e0b;
}

.badge-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fef08a;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
}

.hero-title {
    font-family: 'Prompt', sans-serif;
    font-size: clamp(1.4rem, 4vw, 2.1rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
}

/* Search Form */
.search-box-wrapper {
    max-width: 620px;
    margin: 0 auto;
}

.modern-search-form {
    position: relative;
}

.search-input-group {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    border: 2px solid transparent;
    transition: var(--transition);
}

.search-input-group:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.35);
}

.input-icon-prefix {
    padding-left: 16px;
    padding-right: 12px;
    color: #94a3b8;
    font-size: 1.25rem;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Chakra Petch', 'Prompt', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 12px 0;
    background: transparent;
    width: 100%;
}

.search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
    font-family: 'Prompt', sans-serif;
    font-size: 0.95rem;
}

.clear-btn {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 8px 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.clear-btn:hover {
    color: var(--danger);
}

.btn-search {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 24px;
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: var(--shadow-gold);
}

.btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -3px rgba(217, 119, 6, 0.5);
}

.btn-search:active {
    transform: translateY(0);
}

.search-hint {
    margin-top: 12px;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Stats Section Grid */
.stats-section {
    margin-bottom: 24px;
}

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

.stat-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.stat-card.stat-total {
    border-color: rgba(56, 189, 248, 0.35);
}
.stat-card.stat-total:hover {
    border-color: #38bdf8;
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.22);
}

.stat-card.stat-confirmed {
    border-color: rgba(52, 211, 153, 0.4);
}
.stat-card.stat-confirmed:hover {
    border-color: #34d399;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.25);
}

.stat-card.stat-pending {
    border-color: rgba(251, 191, 36, 0.35);
}
.stat-card.stat-pending:hover {
    border-color: #fbbf24;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.22);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.stat-total .stat-icon {
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.stat-confirmed .stat-icon {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.4);
    color: #34d399;
}

.stat-pending .stat-icon {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fbbf24;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.stat-label {
    font-size: 0.88rem;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value-group {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.stat-value {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-total .stat-value { color: #f0f9ff; }
.stat-confirmed .stat-value { color: #34d399; }
.stat-pending .stat-value { color: #fbbf24; }

.stat-unit {
    font-size: 0.82rem;
    color: #64748b;
}

.stat-percent-badge {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(52, 211, 153, 0.4);
    color: #6ee7b7;
    padding: 1px 7px;
    border-radius: 999px;
    margin-left: 2px;
}

.stat-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
}

.stat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: var(--radius-full);
}

/* Content Card & Tables */
.content-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header-bar {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
    flex-wrap: wrap;
    gap: 12px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.card-title {
    font-family: 'Prompt', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.table-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.table-search-box i {
    position: absolute;
    left: 12px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.table-search-input {
    padding: 8px 12px 8px 34px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-family: 'Prompt', sans-serif;
    font-size: 0.85rem;
    background: #fff;
    outline: none;
    transition: var(--transition);
}

.table-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.modern-table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.modern-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.room-row:hover {
    background-color: #fffbeb;
}

.room-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.room-badge {
    width: 32px;
    height: 32px;
    background: #fef3c7;
    color: #b45309;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.percent-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-track {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
    min-width: 80px;
}

.progress-thumb {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: var(--radius-full);
}

.percent-text {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    min-width: 45px;
    text-align: right;
}

.summary-row td {
    background: #f8fafc;
    border-top: 2px solid var(--border-color);
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    padding: 16px 18px;
}

/* ==========================================================================
   Graduate Result Card Styles
   ========================================================================== */
.result-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.result-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 14px;
    background: #ffffff;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.btn-back:hover {
    color: var(--primary);
    border-color: var(--primary-light);
    transform: translateX(-2px);
}

.print-actions {
    display: flex;
    gap: 8px;
}

.btn-action-icon {
    width: 38px;
    height: 38px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-action-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: #fffbeb;
}

.graduate-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

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

.graduate-card-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 28px 24px;
    text-align: center;
    border-bottom: 4px solid var(--primary);
    position: relative;
}

.ceremony-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: var(--radius-full);
    color: #fbbf24;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.student-profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 6px;
}

@media (min-width: 640px) {
    .student-profile-header {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        text-align: left;
        gap: 24px;
    }
}

.student-avatar-box {
    width: 105px;
    height: 135px;
    border-radius: 12px;
    overflow: hidden;
    background: #1e293b;
    border: 3px solid #f59e0b;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(245, 158, 11, 0.25);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.student-avatar-box:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.4);
}

.student-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.student-avatar-fallback {
    display: none;
    font-size: 2.8rem;
    color: #94a3b8;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #334155;
}

.student-avatar-box.no-photo .student-avatar-fallback {
    display: flex;
}

.student-profile-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 640px) {
    .student-profile-meta {
        align-items: flex-start;
    }
}

.student-name-title {
    font-family: 'Prompt', sans-serif;
    font-size: clamp(1.4rem, 4vw, 1.9rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.student-code-subtitle {
    font-size: 1rem;
    color: #94a3b8;
}

.student-code-subtitle strong {
    font-family: 'Chakra Petch', sans-serif;
    color: #fcd34d;
    font-size: 1.15rem;
}

/* Key Highlight Grid */
.highlight-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 24px;
    background: #fdfdfd;
    border-bottom: 1px solid var(--border-color);
}

.highlight-card {
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.highlight-row {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid #fde68a;
}

.highlight-sequence {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1.5px solid #bfdbfe;
}

.highlight-room {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1.5px solid #bbf7d0;
}

.highlight-no {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 1.5px solid #e9d5ff;
}

.hl-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.highlight-row .hl-icon { color: #d97706; }
.highlight-sequence .hl-icon { color: #2563eb; }
.highlight-room .hl-icon { color: #16a34a; }
.highlight-no .hl-icon { color: #9333ea; }

.hl-content {
    display: flex;
    flex-direction: column;
}

.hl-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hl-value {
    font-family: 'Chakra Petch', 'Prompt', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.1;
}

.hl-large {
    font-size: 2rem;
}

.highlight-row .hl-value { color: #b45309; }
.highlight-sequence .hl-value { color: #1d4ed8; }
.highlight-no .hl-value { color: #7e22ce; }

/* Details Section */
.graduate-details-section {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-family: 'Prompt', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card-subtle);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.detail-label {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.detail-value {
    font-weight: 600;
    color: var(--text-main);
    text-align: right;
}

.font-highlight {
    color: var(--primary-dark);
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.badge-warning {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

/* QR Verify Box */
.qr-verify-box {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 20px 24px;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: var(--radius-lg);
    border: 1px dashed #cbd5e1;
}

.qr-code-wrapper {
    background: #ffffff;
    padding: 8px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.qr-info h4 {
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.qr-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Action Controls Bar */
.graduate-actions-bar {
    padding: 24px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.confirm-form {
    width: 100%;
}

.btn-confirm-attendance {
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-lg);
    font-family: 'Prompt', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 20px -3px rgba(16, 185, 129, 0.4);
    transition: var(--transition);
}

.btn-confirm-attendance:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -4px rgba(16, 185, 129, 0.5);
}

.confirm-notice-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    line-height: 1.5;
}

.notice-warning {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    color: #92400e;
}

.notice-warning i {
    font-size: 1.25rem;
    color: #d97706;
    margin-top: 2px;
    flex-shrink: 0;
}

.notice-text strong {
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
}

.notice-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #b45309;
}

.confirm-location-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    text-align: center;
}

.confirm-location-badge i {
    color: #3b82f6;
    font-size: 1rem;
}

.btn-confirmed-disabled {
    background: #e2e8f0;
    color: #64748b;
    box-shadow: none;
    cursor: default;
}

.btn-locked {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    border: 1px dashed #cbd5e1 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

.secondary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-secondary {
    padding: 12px 20px;
    background: #0f172a;
    color: #ffffff;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #1e293b;
}

.btn-outline {
    padding: 12px 20px;
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-outline:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* ==========================================================================
   Not Found View Styles
   ========================================================================== */
.notfound-wrapper {
    max-width: 540px;
    margin: 30px auto;
}

.notfound-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
    40%, 60% { transform: translate3d(3px, 0, 0); }
}

.notfound-icon-wrapper {
    width: 72px;
    height: 72px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 20px;
}

.notfound-title {
    font-family: 'Prompt', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.searched-code-badge {
    display: inline-block;
    background: #f1f5f9;
    padding: 4px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.searched-code-badge span {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    color: var(--danger);
}

.notfound-message-box {
    background: #f8fafc;
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    text-align: left;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.notfound-message-box ul {
    list-style: none;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notfound-message-box li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #475569;
}

.notfound-message-box li i {
    color: var(--primary);
    margin-top: 3px;
    font-size: 0.8rem;
}

.btn-search-again {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    color: #ffffff;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: var(--shadow-gold);
    transition: var(--transition);
}

.btn-search-again:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -3px rgba(217, 119, 6, 0.45);
}

/* Footer */
.app-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 30px 16px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
}

.footer-title {
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.footer-desc {
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.footer-copy {
    font-size: 0.78rem;
    color: #64748b;
}

/* Utilities */
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.font-weight-bold { font-weight: 700 !important; }

/* ==========================================================================
   RESPONSIVE BREAKPOINTS — Full-screen on all devices
   ========================================================================== */

/* Wide Desktop (≥1400px) */
@media (min-width: 1400px) {
    .container { padding: 0 40px; }
    .header-container { padding: 12px 40px; }
    .result-container { max-width: 1260px; }
    .graduate-card-header { padding: 36px 40px; }
    .highlight-grid { padding: 28px 40px; gap: 20px; }
    .graduate-details-section { padding: 28px 40px; }
    .graduate-actions-bar { padding: 28px 40px; }
    .qr-verify-box { margin: 0 40px 0; }
    .student-name-title { font-size: 2.1rem; }
    .hl-large { font-size: 2.4rem; }
}

/* Desktop (1025px – 1399px) */
@media (min-width: 1025px) and (max-width: 1399px) {
    .container { padding: 0 32px; }
    .highlight-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
    .result-container { max-width: 1000px; }
}

/* Tablet Landscape & Small Laptop (769px – 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container { padding: 0 20px; }
    .header-container { padding: 10px 20px; }
    .result-container { max-width: 100%; }
    .graduate-card-header { padding: 24px 20px; }
    .highlight-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        padding: 20px;
    }
    .student-profile-header { flex-direction: row; gap: 20px; text-align: left; }
    .student-profile-meta { align-items: flex-start; }
    .graduate-details-section { padding: 20px; }
    .graduate-actions-bar { padding: 20px; }
    .qr-verify-box { margin: 0 20px 20px; }
    .student-avatar-box { width: 90px; height: 115px; }
}

/* Tablets — Portrait (481px – 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    body { font-size: 15px; }
    .container { padding: 0 16px; }
    .header-container { padding: 10px 16px; }
    .result-container { max-width: 100%; }
    .main-wrapper { padding: 16px 0 36px; }

    /* Home Stats Grid Tablet */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .stat-card {
        padding: 14px 12px;
        gap: 10px;
    }
    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
        border-radius: 10px;
    }
    .stat-value {
        font-size: 1.45rem;
    }
    .stat-label {
        font-size: 0.8rem;
    }

    .highlight-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 16px;
    }
    .highlight-card { padding: 16px; }
    .hl-large { font-size: 1.85rem; }
    .student-profile-header { flex-direction: row; gap: 18px; text-align: left; }
    .student-profile-meta { align-items: flex-start; }
    .student-avatar-box { width: 80px; height: 105px; }
    .graduate-card-header { padding: 22px 18px; }
    .graduate-details-section { padding: 18px; }
    .graduate-actions-bar { padding: 18px; }
    .qr-verify-box { flex-direction: row; align-items: flex-start; margin: 0 18px 18px; }
    .detail-item { flex-direction: row; }
    .secondary-actions { grid-template-columns: repeat(2, 1fr); }
    .date-badge { font-size: 0.8rem; }
}

/* Mobile — Large (≤480px) */
@media (max-width: 480px) {
    body { font-size: 14px; }
    .container { padding: 0 12px; }
    .header-container { padding: 10px 12px; }
    .result-container { max-width: 100%; }
    .main-wrapper { padding: 12px 0 32px; }

    .brand-subtitle { display: none; }
    .date-badge { font-size: 0.72rem; padding: 4px 8px; }

    /* Home Stats Grid Mobile */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .stat-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 12px 4px 14px;
        gap: 8px;
        border-radius: 12px;
    }
    .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
        border-radius: 10px;
    }
    .stat-info {
        align-items: center;
        width: 100%;
    }
    .stat-label {
        font-size: 0.72rem;
        white-space: normal;
        line-height: 1.25;
        text-align: center;
    }
    .stat-value-group {
        justify-content: center;
        gap: 3px;
        margin-top: 2px;
    }
    .stat-value {
        font-size: 1.25rem;
    }
    .stat-unit {
        font-size: 0.7rem;
    }
    .stat-percent-badge {
        font-size: 0.62rem;
        padding: 0 4px;
    }

    /* Header */
    .graduate-card-header { padding: 18px 14px; }
    .ceremony-tag { font-size: 0.78rem; }
    .student-avatar-box { width: 80px; height: 105px; }
    .student-profile-header { flex-direction: column; gap: 12px; text-align: center; }
    .student-profile-meta { align-items: center; }
    .student-name-title { font-size: clamp(1.1rem, 5vw, 1.5rem); }
    .student-code-subtitle { font-size: 0.88rem; }

    /* Highlight Cards: stacked 2-col on large phones, 1-col very small */
    .highlight-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 14px;
    }
    .highlight-card { padding: 13px 12px; gap: 10px; }
    .hl-icon { width: 38px; height: 38px; font-size: 1.1rem; }
    .hl-label { font-size: 0.78rem; }
    .hl-value { font-size: 1.1rem; }
    .hl-large { font-size: 1.65rem; }

    /* Details section */
    .graduate-details-section { padding: 14px; }
    .section-title { font-size: 0.95rem; }
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px 12px;
        font-size: 0.88rem;
    }
    .detail-label { font-size: 0.8rem; }
    .detail-value { text-align: left; width: 100%; font-size: 0.9rem; }

    /* QR Box */
    .qr-verify-box {
        flex-direction: column;
        text-align: center;
        margin: 0 14px 14px;
        padding: 14px;
    }
    .qr-code-wrapper canvas,
    .qr-code-wrapper img { width: 80px !important; height: 80px !important; }

    /* Actions */
    .graduate-actions-bar { padding: 14px; }
    .btn-confirm-attendance { font-size: 0.95rem; padding: 14px 18px; }
    .secondary-actions { grid-template-columns: 1fr; gap: 8px; }
    .btn-secondary, .btn-outline { padding: 12px 16px; font-size: 0.88rem; }

    /* Top bar */
    .result-top-bar { margin-bottom: 12px; }
    .btn-back { font-size: 0.82rem; padding: 7px 12px; }
    .btn-action-icon { width: 34px; height: 34px; }
}

/* Very small phones (≤360px) */
@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .stat-card {
        flex-direction: row;
        text-align: left;
        padding: 12px 14px;
    }
    .stat-info {
        align-items: flex-start;
    }
    .stat-value-group {
        justify-content: flex-start;
    }
    .highlight-grid { grid-template-columns: 1fr; }
    .student-name-title { font-size: 1.1rem; }
    .hl-large { font-size: 1.5rem; }
    .brand-title { font-size: 0.95rem; }
}

/* Print Optimization */
@media print {
    .app-header,
    .app-footer,
    .result-top-bar,
    .graduate-actions-bar,
    .bg-glow {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
        padding: 0 !important;
    }

    .graduate-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .highlight-grid {
        grid-template-columns: repeat(2, 1fr);
        background: #fff !important;
    }
}
