/* assets/css/style.css */

/* Design Tokens & CSS Variables - Siam U Red & White Theme */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f3f5;
    
    --color-primary: #9E1B22; /* Siam U Red (#9E1B22) */
    --color-primary-hover: #801218;
    --color-primary-glow: rgba(158, 27, 34, 0.15);
    
    --color-accent: #bd9b2c; /* Gold Accent */
    --color-accent-hover: #a08122;
    
    --text-main: #1d1d1f;
    --text-muted: #57575c;
    --text-light: #ffffff;
    
    --border-color: #e2e8f0;
    --border-focus: #9E1B22;
    
    --font-thai: 'Noto Sans Thai', sans-serif;
    --font-eng: 'Outfit', sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(158, 27, 34, 0.08);
    --shadow-glow: 0 4px 20px rgba(158, 27, 34, 0.25);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-secondary);
    color: var(--text-main);
    font-family: var(--font-thai);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-hover);
}

/* Main Header & Navigation */
.main-header {
    background-color: var(--bg-primary);
    border-bottom: 2px solid var(--color-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
}

.logo-area .logo-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-eng);
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    color: var(--color-primary);
    text-decoration: none;
}

.logo-area .siam-logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: var(--transition-fast);
}

.logo-area .logo-link:hover .siam-logo-img {
    transform: scale(1.05);
}

.logo-area .logo-text-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-area .logo-sub-text {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 0.9rem;
    color: var(--text-muted);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--color-primary);
    background-color: rgba(158, 27, 34, 0.05);
}

.nav-link.active {
    color: var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
    border-radius: 6px 6px 0 0;
}

/* Button Navigation */
.btn-register, .btn-login, .btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 1.4rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    outline: none;
    font-family: var(--font-thai);
}

.btn-register {
    background: linear-gradient(135deg, var(--color-primary) 0%, #c02c34 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(158, 27, 34, 0.2);
}

.btn-register:hover {
    background: linear-gradient(135deg, #b8222a 0%, var(--color-primary-hover) 100%);
    box-shadow: 0 6px 20px rgba(158, 27, 34, 0.35);
    transform: translateY(-2px);
}

.btn-login {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 0.6rem 1.3rem;
}

.btn-login:hover {
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(158, 27, 34, 0.15);
    transform: translateY(-2px);
}

.btn-logout {
    background-color: rgba(158, 27, 34, 0.05);
    color: var(--color-primary);
    border: 1px solid rgba(158, 27, 34, 0.15);
}

.btn-logout:hover {
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(158, 27, 34, 0.2);
    transform: translateY(-2px);
}

/* Main Content Area */
.main-content {
    min-height: calc(100vh - 72px - 300px);
    padding: 3rem 1rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Hero Section (Landing Page) */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    padding: 5.5rem 3.5rem;
    border-radius: 32px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.8);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    background-color: #ffffff; /* Base solid color */
}

/* Background image of the group photo with soft opacity */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: url('../images/cover.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    opacity: 0.55; /* Softly fade the image to blend it with white background */
    filter: brightness(0.98) contrast(0.95);
    transition: opacity 0.3s ease;
}

/* Stunning white-to-transparent overlay mask to protect text readability on the left */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.99) 0%, 
        rgba(255, 255, 255, 0.96) 45%, 
        rgba(255, 255, 255, 0.8) 60%, 
        rgba(255, 255, 255, 0.15) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    flex: 1.2;
    position: relative;
    z-index: 3;
}

.hero-badge {
    background-color: rgba(158, 27, 34, 0.08);
    color: var(--color-primary);
    border: 1px solid rgba(158, 27, 34, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.hero-content h1 {
    font-family: var(--font-thai);
    font-size: 2.6rem;
    line-height: 1.35;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #111;
}

.hero-content h1 span {
    color: var(--color-primary);
    display: block;
    font-size: 3rem;
    margin-top: 5px;
    font-weight: 800;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.9rem 2.2rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: var(--transition-smooth);
    font-family: var(--font-thai);
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #c02c34 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(158, 27, 34, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b8222a 0%, var(--color-primary-hover) 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(158, 27, 34, 0.38);
}

.btn-secondary {
    background-color: var(--bg-primary);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.btn-secondary:hover {
    background-color: rgba(158, 27, 34, 0.04);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(158, 27, 34, 0.1);
}

.hero-visual {
    flex: 0.8;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 3;
}

.hero-image-container {
    width: 300px;
    height: 300px;
    border-radius: 28px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 3px solid var(--color-primary); /* เส้นขอบแดงหลักที่หนาและพรีเมียม */
    box-shadow: 0 20px 50px rgba(158, 27, 34, 0.12);
    padding: 30px;
    transition: var(--transition-smooth);
}

.hero-image-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px dashed rgba(158, 27, 34, 0.3); /* เส้นประล้อมรอบนอกที่นิ่งและหรูหรา */
    border-radius: 36px;
    pointer-events: none;
}

.hero-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(158, 27, 34, 0.18);
}

@keyframes rotateDash {
    100% { transform: rotate(360deg); }
}

/* Feature Cards / Details Section */
.info-section {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.section-title p {
    color: var(--text-muted);
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.info-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.info-card .card-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(158, 27, 34, 0.08);
    color: var(--color-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.info-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #111;
}

.info-card p {
    color: var(--text-muted);
}

/* Forms & UI Elements */
.form-container {
    max-width: 720px;
    margin: 0 auto;
    background-color: var(--bg-card);
    border: 1px solid rgba(158, 27, 34, 0.1);
    padding: 3.5rem;
    border-radius: 24px;
    box-shadow: 0 15px 45px rgba(158, 27, 34, 0.05), 0 2px 10px rgba(0,0,0,0.02);
}

.form-title {
    margin-bottom: 2.5rem;
    text-align: center;
}

.form-title h2 {
    font-size: 2.2rem;
    color: var(--color-primary);
    margin-bottom: 0.6rem;
    font-weight: 750;
    letter-spacing: -0.5px;
}

.form-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-group.half-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem;
}

.form-label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1a1a1a;
}

.form-label .required {
    color: var(--color-primary);
    font-weight: bold;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    background-color: #fff;
    border: 2px solid #e2e8f0;
    color: var(--text-main);
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    font-family: var(--font-thai);
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.form-input::placeholder {
    color: #a0aec0;
}

.form-input:hover, .form-select:hover, .form-textarea:hover {
    border-color: #cbd5e0;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(158, 27, 34, 0.12);
}

.form-checkbox-group {
    margin-top: 2.5rem;
    padding: 2rem;
    background-color: #fcfcfd;
    border-radius: 16px;
    border: 2px dashed rgba(158, 27, 34, 0.15);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    margin-bottom: 1.2rem;
    cursor: pointer;
    font-size: 0.98rem;
    color: #2d3748;
    font-weight: 500;
    line-height: 1.5;
}

.checkbox-label:last-child {
    margin-bottom: 0;
}

.checkbox-label input {
    margin-top: 0.25rem;
    width: 17px;
    height: 17px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.checkbox-label:hover {
    color: var(--color-primary);
}

.form-btn-area {
    margin-top: 2.5rem;
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, #c02c34 100%);
    color: #fff;
    border: none;
    padding: 1.1rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.15rem;
    cursor: pointer;
    font-family: var(--font-thai);
    transition: var(--transition-smooth);
    box-shadow: 0 8px 24px rgba(158, 27, 34, 0.25);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #b8222a 0%, var(--color-primary-hover) 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(158, 27, 34, 0.38);
}

/* Alert Notification System */
.alert {
    padding: 1.2rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border: 1.5px solid rgba(46, 204, 113, 0.25);
}

.alert-error {
    background-color: rgba(158, 27, 34, 0.05);
    color: var(--color-primary);
    border: 1.5px solid rgba(158, 27, 34, 0.15);
}

/* Tables (Schedules) */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
    border: 1px solid rgba(158, 27, 34, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    background-color: #fff;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th, .custom-table td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #f1f3f5;
}

.custom-table th {
    background-color: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    border-bottom: 3px solid var(--color-accent);
}

.custom-table tbody tr {
    background-color: var(--bg-card);
    transition: var(--transition-smooth);
}

.custom-table tbody tr:hover {
    background-color: #fdfdfd;
    transform: scale(1.002);
}

.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-pending {
    background-color: rgba(243, 156, 18, 0.08);
    color: #d35400;
    border: 1px solid rgba(243, 156, 18, 0.2);
}

.badge-approved {
    background-color: rgba(46, 204, 113, 0.08);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.badge-rejected {
    background-color: rgba(158, 27, 34, 0.06);
    color: var(--color-primary);
    border: 1px solid rgba(158, 27, 34, 0.15);
}

.badge-forfeited {
    background-color: rgba(127, 140, 141, 0.08);
    color: #7f8c8d;
    border: 1px solid rgba(127, 140, 141, 0.2);
}

/* Member/User Dashboard Page */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-sidebar {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.profile-card {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background-color: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-glow);
}

.profile-name {
    font-weight: 700;
    font-size: 1.15rem;
    color: #111;
}

.profile-role {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.dash-menu {
    list-style: none;
}

.dash-menu li {
    margin-bottom: 0.5rem;
}

.dash-menu-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-muted);
}

.dash-menu-link:hover, .dash-menu-link.active {
    background-color: rgba(158, 27, 34, 0.05);
    color: var(--color-primary);
}

.dash-menu-link.active {
    border-left: 4px solid var(--color-primary);
    border-radius: 0 8px 8px 0;
}

.dashboard-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Documents / Resources */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.document-item {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-fast);
}

.document-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.doc-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--color-accent);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.document-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #111;
    font-weight: 700;
}

.document-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--color-primary);
    color: #fff;
    padding: 0.7rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-download:hover {
    background-color: var(--color-primary-hover);
}

/* Footer styles */
.main-footer {
    background-color: var(--color-primary);
    color: #fff;
    padding: 4rem 2rem 2rem;
    position: relative;
    z-index: 10;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 3rem;
}

.footer-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #fff;
    font-weight: 700;
}

.footer-info p {
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-desc {
    color: rgba(255,255,255,0.75) !important;
    font-size: 0.9rem;
    font-weight: 400 !important;
}

.footer-links h4, .footer-contact h4 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    color: #fff;
    font-weight: 700;
    border-bottom: 2px solid rgba(255,255,255,0.15);
    padding-bottom: 5px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
}

.footer-links ul li a:hover {
    color: var(--color-accent);
}

.footer-contact p {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.btn-fb-footer {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #fff;
    color: #1877f2;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.btn-fb-footer:hover {
    background-color: #f1f3f5;
    transform: translateY(-2px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

/* Floating FB Chat Widget */
.floating-chat-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #0084ff;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.4rem;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 132, 255, 0.4);
    z-index: 1000;
    cursor: pointer;
    font-family: var(--font-thai);
    font-weight: 700;
    transition: var(--transition-smooth);
}

.floating-chat-btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 132, 255, 0.6);
    background-color: #007bf5;
}

.chat-icon-pulse {
    font-size: 1.5rem;
    animation: pulseChat 2s infinite;
}

@keyframes pulseChat {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Admin Styling Specifics */
.admin-card-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.stat-info h5 {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.stat-info h3 {
    font-size: 2rem;
    font-family: var(--font-eng);
    font-weight: 700;
    color: #111;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
    color: var(--text-muted);
}

.stat-icon.red-stat {
    background-color: rgba(158, 27, 34, 0.08);
    color: var(--color-primary);
}

.stat-icon.gold-stat {
    background-color: rgba(212, 175, 55, 0.08);
    color: var(--color-accent);
}

/* Responsive Grid and Media Queries */
@media (max-width: 992px) {
    .main-content, .dashboard-grid, .dashboard-content {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .hero-section {
        flex-direction: column;
        text-align: center;
    }
    .hero-visual {
        margin-top: 2rem;
    }
    .hero-desc {
        margin: 0 auto 2.5rem;
    }
    .hero-actions {
        justify-content: center;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-primary);
        border-bottom: 2px solid var(--color-primary);
        padding: 1.5rem;
        box-shadow: var(--shadow-md);
    }
    .nav-menu.open {
        display: block;
    }
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .nav-link {
        padding: 0.8rem;
    }
    .form-group.half-group {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .form-container {
        padding: 1.5rem;
    }
    .floating-chat-btn .chat-text {
        display: none;
    }
    .floating-chat-btn {
        padding: 1rem;
        border-radius: 50%;
    }
}

/* Dashboard Modern Roadmap and Profile Grid Styles */
.progress-roadmap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    background-color: var(--bg-secondary);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.roadmap-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    flex: 1;
}

.roadmap-step .step-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #cbd5e0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.roadmap-step .step-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

.roadmap-step.completed .step-num {
    background-color: #2ecc71;
    color: #fff;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}
.roadmap-step.completed .step-label {
    color: #27ae60;
    font-weight: 700;
}

.roadmap-step.active .step-num {
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 0 12px var(--color-primary-glow);
    animation: pulseGlow 2s infinite;
}
.roadmap-step.active .step-label {
    color: var(--color-primary);
    font-weight: 700;
}

.roadmap-step.pending .step-num {
    background-color: #e2e8f0;
    color: #a0aec0;
}
.roadmap-step.pending .step-label {
    color: #a0aec0;
}

.roadmap-line {
    flex: 2;
    height: 4px;
    background-color: #e2e8f0;
    margin-top: -1.2rem;
    border-radius: 2px;
    position: relative;
}

.roadmap-line.completed {
    background-color: #2ecc71;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(158, 27, 34, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(158, 27, 34, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(158, 27, 34, 0);
    }
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.info-tile {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.info-tile:hover {
    transform: translateY(-3px);
    border-color: var(--color-primary-glow);
    box-shadow: var(--shadow-sm);
}

.info-tile .tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-color: rgba(158, 27, 34, 0.06);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-tile .tile-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.info-tile .tile-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.info-tile .tile-value {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Mobile Dashboard Sidebar Sub-Navigation */
@media (max-width: 992px) {
    .dashboard-sidebar {
        padding: 0.8rem !important;
        border-radius: 12px !important;
        margin-bottom: 1.5rem;
        overflow: hidden !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .dashboard-sidebar .profile-card {
        display: none !important;
    }
    .dashboard-sidebar .dash-menu {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 0.5rem !important;
        padding: 0.25rem 0.25rem 0.5rem 0.25rem !important;
        margin-bottom: 0 !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none !important;
    }
    .dashboard-sidebar .dash-menu::-webkit-scrollbar {
        display: none !important;
    }
    .dashboard-sidebar .dash-menu li {
        margin-bottom: 0 !important;
        flex: 0 0 auto !important;
        scroll-snap-align: start;
    }
    .dashboard-sidebar .dash-menu-link {
        padding: 0.65rem 1.15rem !important;
        font-size: 0.88rem !important;
        white-space: nowrap !important;
        background-color: var(--bg-secondary) !important;
        border-radius: 24px !important;
        border: 1px solid var(--border-color) !important;
        display: inline-flex !important;
        align-items: center;
        gap: 0.4rem;
        box-shadow: var(--shadow-sm);
        transition: all 0.2s ease !important;
    }
    .dashboard-sidebar .dash-menu-link:hover {
        background-color: rgba(212, 163, 89, 0.08) !important;
        color: var(--color-accent) !important;
        border-color: rgba(212, 163, 89, 0.2) !important;
        transform: translateY(-1px);
    }
    .dashboard-sidebar .dash-menu-link.active {
        background: linear-gradient(135deg, var(--color-primary) 0%, #7d0d12 100%) !important;
        color: #fff !important;
        border-color: var(--color-primary) !important;
        box-shadow: 0 4px 10px rgba(158, 27, 34, 0.2) !important;
        border-left: none !important;
    }
    .dashboard-content {
        padding: 1.5rem !important;
    }
    
    .progress-roadmap {
        padding: 1rem !important;
        gap: 0.5rem;
    }
    .roadmap-step .step-label {
        font-size: 0.78rem !important;
    }
    .roadmap-step .step-num {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.85rem !important;
    }
    .roadmap-line {
        margin-top: -1rem !important;
    }
}

/* ==========================================================================
   Timeline / Stepper Section CSS (Premium Design)
   ========================================================================== */
.timeline-section {
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
    background: radial-gradient(at 0% 0%, rgba(212,175,55,0.04) 0, transparent 40%), 
                radial-gradient(at 100% 100%, rgba(158,27,34,0.04) 0, transparent 40%),
                linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

/* Ambient glows */
.timeline-section::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 5%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(158, 27, 34, 0.035) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.timeline-section::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(189, 155, 44, 0.035) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.timeline-header {
    text-align: center;
    margin-bottom: 4.5rem;
    position: relative;
    z-index: 1;
}

.timeline-header h2 {
    font-size: 2.3rem;
    font-weight: 750;
    color: var(--color-primary);
    margin-bottom: 0.6rem;
    letter-spacing: -0.5px;
}

.timeline-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 500;
}

.timeline-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 1.5rem;
    gap: 1.8rem;
    z-index: 1;
}

/* Background Progress Line */
.timeline-progress-line {
    position: absolute;
    top: 40px;
    left: 8%;
    right: 8%;
    height: 6px;
    background-color: rgba(226, 232, 240, 0.8);
    z-index: 1;
    border-radius: 10px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.timeline-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 50%, #e2b93c 100%);
    width: 0%; /* Will be dynamically set by PHP */
    transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(158, 27, 34, 0.35);
    position: relative;
}

.timeline-progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ffd700;
    box-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700;
}

/* Timeline Card & Step */
.timeline-step {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Background Large Stepper Numbers */
.timeline-step::before {
    position: absolute;
    top: -20px;
    font-size: 5.5rem;
    font-weight: 800;
    font-family: var(--font-eng);
    color: rgba(158, 27, 34, 0.03);
    pointer-events: none;
    z-index: 0;
    transition: all 0.4s ease;
}

.timeline-step:nth-child(2)::before { content: "01"; }
.timeline-step:nth-child(3)::before { content: "02"; }
.timeline-step:nth-child(4)::before { content: "03"; }
.timeline-step:nth-child(5)::before { content: "04"; }

.timeline-step:hover::before {
    color: rgba(158, 27, 34, 0.06);
    transform: translateY(-5px) scale(1.05);
}

.timeline-icon-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 3px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-muted);
    margin-bottom: 1.8rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
    z-index: 2;
    position: relative;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-step-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 1.8rem 1.5rem;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 250px;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

/* Elegant colored top line on steps */
.timeline-step-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    transition: background 0.3s ease;
}

.timeline-step.active .timeline-step-content::before {
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.timeline-step.completed .timeline-step-content::before {
    background: var(--color-accent);
}

.timeline-step-title {
    font-size: 1.1rem;
    font-weight: 750;
    color: var(--text-main);
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.timeline-step-date {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.8rem;
    display: inline-block;
    padding: 2px 10px;
    background-color: rgba(189, 155, 44, 0.06);
    border-radius: 20px;
    border: 1px solid rgba(189, 155, 44, 0.12);
}

.timeline-step-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

/* Timeline States Styles */

/* 1. Active State with dynamic radar wave effect */
.timeline-step.active .timeline-icon-box {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, var(--color-primary) 0%, #e63946 100%);
    color: #ffffff;
    box-shadow: 0 0 0 10px rgba(158, 27, 34, 0.12), 
                0 15px 30px rgba(158, 27, 34, 0.35);
    transform: scale(1.15) translateY(-5px);
}

.timeline-step.active .timeline-icon-box::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    animation: radarRipple 2s infinite ease-out;
}

@keyframes radarRipple {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

.timeline-step.active .timeline-step-content {
    border-color: rgba(158, 27, 34, 0.25);
    box-shadow: 0 15px 40px rgba(158, 27, 34, 0.08);
    background: #ffffff;
    transform: translateY(-8px);
}

.timeline-step.active .timeline-status-badge {
    background-color: rgba(158, 27, 34, 0.08);
    color: var(--color-primary);
    border: 1px solid rgba(158, 27, 34, 0.15);
    box-shadow: 0 2px 10px rgba(158, 27, 34, 0.05);
}

/* 2. Completed State */
.timeline-step.completed .timeline-icon-box {
    border-color: var(--color-accent);
    background: linear-gradient(135deg, var(--color-accent) 0%, #ffd700 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(189, 155, 44, 0.25);
    transform: scale(1.05);
}

.timeline-step.completed .timeline-step-content {
    border-color: rgba(189, 155, 44, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.03);
}

.timeline-step.completed .timeline-status-badge {
    background-color: rgba(189, 155, 44, 0.08);
    color: var(--color-accent);
    border: 1px solid rgba(189, 155, 44, 0.15);
}

/* 3. Upcoming State */
.timeline-step.upcoming .timeline-status-badge {
    background-color: #f1f3f5;
    color: #8e8e93;
    border: 1px solid #e5e5ea;
}

/* Interactivity (Hover Effects) */
.timeline-step:hover:not(.upcoming) {
    transform: translateY(-8px);
}

.timeline-step:hover:not(.upcoming) .timeline-icon-box {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.timeline-step:hover.active .timeline-icon-box {
    transform: scale(1.2) translateY(-6px);
}

.timeline-step:hover:not(.upcoming) .timeline-step-content {
    border-color: rgba(189, 155, 44, 0.5);
    box-shadow: 0 20px 45px rgba(158, 27, 34, 0.08);
    background: #ffffff;
}

/* Mobile Responsive - Vertical Stepper Layout */
@media (max-width: 768px) {
    .timeline-row {
        flex-direction: column;
        align-items: center;
        gap: 3.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .timeline-progress-line {
        top: 0;
        bottom: 0;
        left: 50px;
        width: 6px;
        height: auto;
    }
    
    .timeline-progress-fill {
        width: 100%;
        height: 0%; /* Set height via PHP dynamically */
        transition: height 1.2s ease-in-out;
    }
    
    .timeline-progress-fill::after {
        right: auto;
        left: 50%;
        bottom: 0;
        top: auto;
        transform: translate(-50%, 50%);
    }
    
    .timeline-step {
        flex-direction: row;
        text-align: left;
        width: 100%;
        max-width: 500px;
        align-items: center;
    }
    
    .timeline-step::before {
        left: auto;
        right: 20px;
        top: 15px;
        font-size: 4rem;
    }
    
    .timeline-icon-box {
        margin-bottom: 0;
        margin-right: 1.8rem;
        flex-shrink: 0;
    }
    
    .timeline-step-content {
        max-width: none;
    }
}


/* ==========================================================================
   COMPREHENSIVE MOBILE RESPONSIVE ADDITIONS
   Added responsive rules only — desktop styles untouched
   ========================================================================== */

/* ---- Tablet & Landscape (max-width: 992px) ---- */
@media (max-width: 992px) {
    /* Hero Typography */
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-content h1 span {
        font-size: 2.3rem;
    }
    .hero-desc {
        font-size: 1rem;
    }
    .hero-image-container {
        width: 240px;
        height: 240px;
        padding: 20px;
    }
    .hero-section {
        padding: 3.5rem 2.5rem;
        border-radius: 24px;
    }

    /* Section Titles */
    .section-title h2 {
        font-size: 1.8rem;
    }

    /* Timeline Section */
    .timeline-section {
        padding: 4rem 0;
    }
    .timeline-header h2 {
        font-size: 1.9rem;
    }
    .timeline-header {
        margin-bottom: 3rem;
    }

    /* Info Cards Grid */
    .grid-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    /* Main Content */
    .main-content {
        padding: 2rem 1rem;
    }

    /* Footer */
    .main-footer {
        padding: 3rem 1.5rem 1.5rem;
    }
}

/* ---- Phone Landscape & Small Tablets (max-width: 768px) ---- */
@media (max-width: 768px) {
    /* Hero Section */
    .hero-section {
        padding: 2.5rem 1.5rem;
        border-radius: 20px;
        margin-bottom: 1.5rem;
    }
    .hero-content h1 {
        font-size: 1.6rem;
        line-height: 1.4;
    }
    .hero-content h1 span {
        font-size: 1.85rem;
        margin-top: 3px;
    }
    .hero-badge {
        font-size: 0.75rem;
        padding: 5px 12px;
        margin-bottom: 1rem;
    }
    .hero-desc {
        font-size: 0.92rem;
        margin-bottom: 2rem;
    }
    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    .hero-image-container {
        width: 200px;
        height: 200px;
        padding: 18px;
        border-radius: 22px;
    }
    .hero-image-container::before {
        top: -7px;
        left: -7px;
        right: -7px;
        bottom: -7px;
        border-radius: 30px;
    }

    /* Hero Overlay - better gradient for mobile (center fade) */
    .hero-section::after {
        background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.97) 0%,
            rgba(255, 255, 255, 0.92) 40%,
            rgba(255, 255, 255, 0.75) 70%,
            rgba(255, 255, 255, 0.4) 100%);
    }

    /* Section Titles */
    .section-title h2 {
        font-size: 1.5rem;
    }
    .section-title p {
        font-size: 0.92rem;
    }

    /* Info Cards */
    .info-card {
        padding: 1.8rem 1.5rem;
        border-radius: 14px;
    }
    .info-card h3 {
        font-size: 1.2rem;
    }
    .info-card .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        border-radius: 10px;
        margin-bottom: 1rem;
    }
    .grid-cards {
        grid-template-columns: 1fr;
    }

    /* Timeline */
    .timeline-section {
        padding: 3rem 0;
    }
    .timeline-header {
        margin-bottom: 2.5rem;
    }
    .timeline-header h2 {
        font-size: 1.5rem;
    }
    .timeline-header p {
        font-size: 0.95rem;
    }
    .timeline-icon-box {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
    .timeline-step-content {
        padding: 1.3rem 1rem;
        border-radius: 18px;
    }
    .timeline-step-title {
        font-size: 0.98rem;
    }
    .timeline-step-date {
        font-size: 0.82rem;
    }
    .timeline-step-desc {
        font-size: 0.8rem;
    }

    /* Buttons */
    .btn-primary, .btn-secondary {
        padding: 0.8rem 1.6rem;
        font-size: 0.95rem;
        border-radius: 12px;
    }
    .btn-register, .btn-login, .btn-logout {
        padding: 0.6rem 1rem;
        font-size: 0.88rem;
        border-radius: 10px;
    }

    /* Forms */
    .form-container {
        padding: 1.5rem !important;
        border-radius: 18px;
    }
    .form-title h2 {
        font-size: 1.6rem;
    }
    .form-title p {
        font-size: 0.92rem;
    }
    .form-input, .form-select, .form-textarea {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    .btn-submit {
        font-size: 1.05rem;
        padding: 0.95rem;
        border-radius: 12px;
    }
    .form-checkbox-group {
        padding: 1.2rem;
        border-radius: 12px;
    }

    /* Dashboard Content */
    .dashboard-content {
        padding: 1.5rem !important;
        border-radius: 14px;
    }

    /* Profile Info Grid */
    .profile-info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .info-tile {
        padding: 1rem;
        border-radius: 12px;
    }

    /* Documents Grid */
    .documents-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Tables */
    .custom-table th, .custom-table td {
        padding: 0.8rem 0.75rem;
        font-size: 0.88rem;
    }

    /* Alerts */
    .alert {
        padding: 1rem 1.2rem;
        font-size: 0.92rem;
    }

    /* Footer */
    .main-footer {
        padding: 2.5rem 1rem 1.5rem;
    }
    .footer-info h3 {
        font-size: 1.2rem;
    }
    .footer-bottom {
        font-size: 0.78rem;
    }

    /* Progress Roadmap */
    .progress-roadmap {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3rem;
    }
    .roadmap-step .step-label {
        font-size: 0.72rem;
    }

    /* Admin Cards */
    .admin-card-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    .stat-card {
        padding: 1.25rem;
    }
    .stat-info h3 {
        font-size: 1.5rem;
    }
}

/* ---- Small Phones (max-width: 480px) ---- */
@media (max-width: 480px) {
    /* Hero */
    .hero-section {
        padding: 1.8rem 1rem;
        border-radius: 16px;
    }
    .hero-content h1 {
        font-size: 1.3rem;
    }
    .hero-content h1 span {
        font-size: 1.55rem;
    }
    .hero-badge {
        font-size: 0.68rem;
        padding: 4px 10px;
    }
    .hero-desc {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
    .hero-visual {
        display: none;
    }

    /* Section Titles */
    .section-title h2 {
        font-size: 1.3rem;
    }

    /* Cards */
    .info-card {
        padding: 1.5rem 1.2rem;
    }
    .info-card h3 {
        font-size: 1.1rem;
    }

    /* Timeline */
    .timeline-section {
        padding: 2rem 0;
    }
    .timeline-header h2 {
        font-size: 1.3rem;
    }
    .timeline-icon-box {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-right: 1rem;
    }
    .timeline-step-content {
        padding: 1rem 0.8rem;
        border-radius: 14px;
    }
    .timeline-step-title {
        font-size: 0.9rem;
    }

    /* Forms */
    .form-container {
        padding: 1.2rem 1rem !important;
        border-radius: 14px;
    }
    .form-title h2 {
        font-size: 1.35rem;
    }
    .form-label {
        font-size: 0.88rem;
    }
    .btn-submit {
        font-size: 0.98rem;
        padding: 0.85rem;
    }

    /* Buttons */
    .btn-primary, .btn-secondary {
        padding: 0.75rem 1.2rem;
        font-size: 0.9rem;
    }

    /* Dashboard */
    .dashboard-content {
        padding: 1rem !important;
    }
    .profile-info-grid {
        gap: 0.5rem;
    }
    .info-tile {
        padding: 0.85rem;
    }
    .info-tile .tile-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    .info-tile .tile-label {
        font-size: 0.72rem;
    }
    .info-tile .tile-value {
        font-size: 0.88rem;
    }

    /* Progress Roadmap */
    .progress-roadmap {
        padding: 0.75rem !important;
    }
    .roadmap-step .step-num {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.75rem !important;
    }
    .roadmap-step .step-label {
        font-size: 0.65rem !important;
        display: none;
    }
    .roadmap-line {
        flex: 1;
    }

    /* Tables */
    .custom-table th, .custom-table td {
        padding: 0.6rem 0.5rem;
        font-size: 0.82rem;
    }

    /* Admin Stats */
    .admin-card-stats {
        grid-template-columns: 1fr 1fr;
    }
    .stat-card {
        padding: 1rem;
    }
    .stat-info h3 {
        font-size: 1.3rem;
    }
    .stat-info h5 {
        font-size: 0.78rem;
    }

    /* Footer */
    .main-footer {
        padding: 2rem 0.75rem 1rem;
    }
    .footer-info h3 {
        font-size: 1.1rem;
    }

    /* Floating Chat */
    .floating-chat-btn {
        bottom: 1rem;
        right: 1rem;
        padding: 0.8rem;
    }

    /* Header */
    .header-container {
        padding: 0.5rem 1rem;
    }
    .logo-area .siam-logo-img {
        height: 38px;
    }
    .logo-area .logo-sub-text {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }

    /* Main Content */
    .main-content {
        padding: 1.5rem 0.5rem;
    }
}

/* ==========================================================================
   MOBILE RESPONSIVE OVERRIDES FOR ADMIN & LOGGED-IN PAGES
   ========================================================================== */

/* Tablet & Landscape (max-width: 992px) */
@media (max-width: 992px) {
    /* Hide scrollbars for the horizontal sidebar menu */
    .dashboard-sidebar .dash-menu::-webkit-scrollbar {
        display: none !important;
    }
    .dashboard-sidebar .dash-menu {
        scrollbar-width: none !important;
        margin-bottom: 0 !important;
    }
}

@media (max-width: 768px) {
    /* Constrain all containers to prevent zoom-out/horizontal page scroll */
    .main-content, .dashboard-grid, .dashboard-content {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Optimize general dashboard / admin dashboard padding */
    .dashboard-content {
        padding: 1.25rem 1rem !important;
    }
    
    .dashboard-content h2 {
        font-size: 1.45rem !important;
    }
    
    .dashboard-content h3 {
        font-size: 1.15rem !important;
    }
    
    /* Optimize inline card paddings in admin pages */
    .dashboard-content > div {
        padding: 1.25rem 1rem !important;
        margin-bottom: 1.5rem !important;
        border-radius: 12px !important;
    }
    
    /* Make search & filter forms flex column */
    .dashboard-content form {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
    }
    
    .dashboard-content form > div {
        width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
    }
    
    /* Align buttons at bottom of search form to stack vertically on mobile */
    .dashboard-content form > div:last-child {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.5rem !important;
        align-items: stretch !important;
    }
    
    .dashboard-content form button,
    .dashboard-content form a.btn-secondary,
    .dashboard-content form a.btn-primary {
        width: 100% !important;
        justify-content: center !important;
        margin: 0 !important;
        height: 42px !important;
        display: inline-flex !important;
        align-items: center !important;
    }
    
    /* Expandable Member Details Row Optimizations */
    .member-detail-content {
        padding: 1rem !important;
        border-radius: 8px !important;
    }
    
    .detail-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
    
    .detail-section h4 {
        font-size: 0.9rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .detail-bio-box {
        padding: 0.85rem !important;
        margin-top: 1rem !important;
    }
}

/* Small Phones (max-width: 480px) */
@media (max-width: 480px) {
    /* Admin stats grid stack */
    .admin-card-stats {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .stat-card {
        padding: 1.25rem !important;
        border-radius: 10px !important;
    }
    
    .stat-info h3 {
        font-size: 1.5rem !important;
    }
    
    .stat-info h5 {
        font-size: 0.82rem !important;
    }
    
    /* Inactive state container on registration page */
    .form-container[style*="padding: 4rem 2rem"] {
        padding: 2rem 1rem !important;
    }
    
    .form-container[style*="padding: 4rem 2rem"] div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }
    
    .form-container[style*="padding: 4rem 2rem"] div[style*="display: flex"] a {
        width: 100% !important;
        justify-content: center !important;
        display: inline-flex !important;
        align-items: center !important;
    }
    
    .form-container[style*="padding: 4rem 2rem"] h2 {
        font-size: 1.5rem !important;
    }
    
    .form-container[style*="padding: 4rem 2rem"] p {
        font-size: 0.95rem !important;
    }
    
    .form-container[style*="padding: 4rem 2rem"] strong {
        font-size: 1.1rem !important;
    }
}

/* ==========================================================================
   MOBILE CARD TABLE — แปลงตารางเป็น card บนมือถือ
   ใช้กับ table ที่มี class="custom-table table-card-mobile"
   ========================================================================== */
@media (max-width: 768px) {
    .table-card-mobile thead {
        display: none;
    }

    /* แถวปกติ → card */
    .table-card-mobile tbody tr:not(.member-detail-row) {
        display: block;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        margin-bottom: 1rem;
        padding: 0.5rem 0.75rem;
        box-shadow: var(--shadow-sm);
        overflow: hidden;
    }

    .table-card-mobile tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 0.5rem 0;
        border-bottom: 1px solid #f0f4f8;
        font-size: 0.88rem;
        gap: 0.5rem;
    }

    .table-card-mobile tbody td:last-child {
        border-bottom: none;
    }

    /* Label จาก data-label */
    .table-card-mobile tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.75rem;
        color: var(--text-muted);
        min-width: 85px;
        flex-shrink: 0;
        padding-top: 2px;
        line-height: 1.4;
    }

    /* td ที่ไม่มี label (เช่น ปุ่ม action) */
    .table-card-mobile tbody td[data-label=""]::before {
        display: none;
        min-width: 0;
    }
    .table-card-mobile tbody td[data-label=""] {
        justify-content: flex-end;
        padding-top: 0.75rem;
    }

    /* แถว expandable detail */
    .table-card-mobile tbody tr.member-detail-row {
        display: none;
        border: 1px solid var(--border-color);
        border-top: 3px solid var(--color-primary);
        border-radius: 0 0 12px 12px;
        margin-top: -1.25rem;
        margin-bottom: 1rem;
        padding: 0;
        background: var(--bg-card);
        box-shadow: var(--shadow-sm);
    }

    .table-card-mobile tbody tr.member-detail-row td {
        display: block;
        padding: 0;
        border-bottom: none;
    }

    .table-card-mobile tbody tr.member-detail-row td::before {
        display: none;
    }
}

/* ==========================================================================
   BOTTOM NAV — ซ่อน text แสดงเฉพาะ icon บนหน้าจอมือถือ
   ========================================================================== */
@media (max-width: 768px) {
    .dashboard-sidebar .dash-menu-link {
        font-size: 0 !important;
        gap: 0 !important;
        position: relative;
    }

    .dashboard-sidebar .dash-menu-link i {
        font-size: 1.35rem !important;
        margin: 0 !important;
    }

    .dashboard-sidebar .dash-menu-link.active::after {
        content: '';
        position: absolute;
        bottom: 4px;
        left: 50%;
        transform: translateX(-50%);
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background-color: var(--color-primary);
    }
}

/* Custom mobile logo and header overrides */
@media (max-width: 480px) {
    .logo-area .logo-sub-text {
        font-size: 0.6rem !important;
        letter-spacing: 0.8px !important;
    }
    .logo-area .siam-logo-img {
        height: 38px !important;
    }
    .header-container {
        padding: 0.6rem 1rem !important;
    }
    .main-content {
        padding: 1rem 0.75rem !important;
    }
    .dashboard-content {
        padding: 1rem 0.75rem !important;
    }
}


/* ==========================================================================
   MOBILE UX/UI REDESIGN OVERRIDES (OPTION 1)
   ========================================================================== */

@media (max-width: 768px) {
    /* 1. Body & Main Content Constraints */
    body {
        overflow-x: hidden !important;
    }
    
    .main-content {
        padding-bottom: 90px !important; /* Ensure content is not blocked by sticky bottom nav */
    }

    /* 2. Premium Bottom Navigation Bar */
    .dashboard-sidebar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 66px !important;
        background: rgba(255, 255, 255, 0.94) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-top: 1px solid rgba(158, 27, 34, 0.12) !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 9999 !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
    }
    
    .dashboard-sidebar .profile-card {
        display: none !important;
    }
    
    .dashboard-sidebar .dash-menu {
        display: flex !important;
        justify-content: space-around !important;
        align-items: center !important;
        height: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        overflow: hidden !important;
    }
    
    .dashboard-sidebar .dash-menu li {
        flex: 1 !important;
        height: 100% !important;
        margin: 0 !important;
    }
    
    .dashboard-sidebar .dash-menu-link {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;
        height: 100% !important;
        padding: 6px 0 !important;
        font-size: 0.72rem !important;
        font-weight: 600 !important;
        color: var(--text-muted) !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        transition: all 0.2s ease !important;
    }
    
    .dashboard-sidebar .dash-menu-link i {
        font-size: 1.25rem !important;
        margin: 0 !important;
    }
    
    .dashboard-sidebar .dash-menu-link:hover {
        background: transparent !important;
        color: var(--color-primary) !important;
    }
    
    .dashboard-sidebar .dash-menu-link.active {
        color: var(--color-primary) !important;
        background: transparent !important;
        border-left: none !important;
        border-radius: 0 !important;
        font-weight: 700 !important;
    }

    /* 3. Vertical Progress Roadmap */
    .progress-roadmap {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1.5rem !important;
        padding: 1.5rem !important;
        margin-bottom: 2rem !important;
    }
    
    .roadmap-step {
        flex-direction: row !important;
        align-items: center !important;
        gap: 1rem !important;
        width: 100% !important;
        flex: none !important;
        text-align: left !important;
    }
    
    .roadmap-step .step-num {
        width: 34px !important;
        height: 34px !important;
        font-size: 0.9rem !important;
        flex-shrink: 0 !important;
    }
    
    .roadmap-step .step-label {
        font-size: 0.92rem !important;
        text-align: left !important;
    }
    
    .roadmap-line {
        display: none !important; /* Hide horizontal lines */
    }

    /* 4. Form Layout Spacing Fixes */
    .form-group.half-group {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
    
    /* Make inputs look consistent and clean */
    .form-input, .form-select, .form-textarea {
        padding: 0.85rem 1rem !important;
        font-size: 0.95rem !important;
        height: 48px !important;
    }
    
    .form-textarea {
        height: auto !important;
    }

    /* 5. Profile Info Grid Wrapping & Mobile Styling */
    .profile-info-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .info-tile {
        padding: 1rem !important;
        min-width: 0 !important;
        width: 100% !important;
    }
    
    .info-tile .tile-value {
        font-size: 0.92rem !important;
        word-break: break-all !important;
        white-space: normal !important;
    }
}




