/* ==========================================================================
   LAKSHYA FELLOWSHIP - SIMPLIFIED SLOT BOOKING PORTAL STYLES WITH TIMED BUTTON
   ========================================================================== */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --bg-dark: #0f172a;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 20px 35px -10px rgba(79, 70, 229, 0.35);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #311042 100%);
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: 60px;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Shapes */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    z-index: -1;
    opacity: 0.5;
    animation: floatAnim 12s infinite alternate ease-in-out;
}

.bg-shape-1 { width: 450px; height: 450px; background: #6366f1; top: -100px; left: -100px; }
.bg-shape-2 { width: 400px; height: 400px; background: #06b6d4; bottom: -100px; right: -100px; animation-delay: -4s; }
.bg-shape-3 { width: 350px; height: 350px; background: #ec4899; top: 40%; left: 40%; animation-delay: -8s; }

@keyframes floatAnim {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 40px) scale(1.1); }
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}

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

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

.brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 800;
    font-size: 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.brand-text { display: flex; flex-direction: column; }
.brand-title { color: white; font-weight: 700; font-size: 18px; letter-spacing: -0.3px; }
.brand-subtitle { color: #94a3b8; font-size: 12px; font-weight: 500; }

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

.nav-tab-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 16px;
    border-radius: 30px;
    font-size: 13.5px;
    cursor: pointer;
    transition: var(--transition);
}

.nav-tab-btn:hover { background: rgba(255, 255, 255, 0.2); color: white; }

.nav-tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.nav-admin-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 13.5px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    z-index: 110;
}

.nav-admin-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* Main Container */
.main-container {
    max-width: 860px;
    margin: 40px auto 0;
    padding: 0 20px;
}

/* Card Box */
.card-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    animation: fadeIn 0.4s ease-in-out;
}

.style-reentry {
    max-width: 540px;
    margin: 0 auto;
}

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

.badge-tag {
    background: #e0e7ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.badge-tag.tag-purple {
    background: #f3e8ff;
    color: #9333ea;
}

.card-header {
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
}

.card-header h2 {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.card-header p {
    color: var(--text-muted);
    font-size: 15px;
    margin-top: 4px;
}

.hidden { display: none !important; }

/* Form Elements */
.form-section { margin-bottom: 32px; }

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    width: 26px;
    height: 26px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label { font-size: 14px; font-weight: 600; color: #334155; }
.req { color: var(--danger); }

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    background: #f8fafc;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }

/* Buttons */
.btn {
    font-family: inherit;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4338ca);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }

.btn-secondary { background: #e2e8f0; color: #334155; }
.btn-secondary:hover { background: #cbd5e1; }

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

.btn-success:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-glow {
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: white;
    font-size: 18px;
    padding: 16px 36px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.btn-glow:hover:not(.disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.6);
}

.btn-glow.disabled {
    background: linear-gradient(135deg, #64748b, #475569) !important;
    color: #cbd5e1 !important;
    opacity: 0.65;
    cursor: not-allowed !important;
    box-shadow: none !important;
    pointer-events: none;
    transform: none !important;
}

.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-xl { padding: 18px 40px; font-size: 18px; }
.full-width-btn { width: 100%; }

.btn-link { background: none; color: var(--primary); text-decoration: underline; font-weight: 600; }

.form-actions { margin-top: 30px; }

/* Slot Selection Styling */
.slot-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.inline-control { width: auto; display: inline-block; }

.slot-legend { display: flex; gap: 16px; font-size: 13px; font-weight: 600; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-box { width: 14px; height: 14px; border-radius: 4px; }
.legend-box.available { background: #ffffff; border: 1.5px solid var(--primary); }
.legend-box.selected { background: var(--primary); }
.legend-box.booked { background: #e2e8f0; border: 1.5px solid #cbd5e1; }
.legend-box.past { background: #fee2e2; border: 1.5px solid #fca5a5; }

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
    padding: 4px;
}

.slot-btn {
    padding: 14px 10px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    background: #ffffff;
    font-family: inherit;
    font-weight: 700;
    font-size: 13.5px;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.slot-btn:hover:not(.booked):not(.past) {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
}

.slot-btn.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), #4338ca);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.slot-btn.booked {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.7;
}

.slot-btn.past {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #f43f5e;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.65;
}

.slot-status-text { font-size: 11px; font-weight: 600; text-transform: uppercase; }

.slot-summary-card {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border: 2px dashed var(--primary);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    display: flex;
    justify-content: center;
}

.summary-details { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.summary-time { font-weight: 800; color: var(--primary); }
.summary-date { font-weight: 600; color: var(--text-muted); }

/* Lock Icon for Admin Auth */
.lock-icon-circle {
    width: 60px;
    height: 60px;
    background: #eef2ff;
    color: var(--primary);
    font-size: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Confirmation Screen & Countdown Timer Card */
.text-center { text-align: center; }

.success-icon-wrapper { display: flex; justify-content: center; margin-bottom: 20px; }

.success-circle {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    color: white;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.title-success { font-size: 28px; font-weight: 800; color: #0f172a; }
.subtitle-success { color: var(--text-muted); font-size: 15px; margin-top: 6px; }

.booking-receipt-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 28px auto;
    max-width: 500px;
    text-align: left;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 14px;
}

.receipt-row:last-child { border-bottom: none; }
.r-label { color: var(--text-muted); font-weight: 600; }
.r-value { color: #0f172a; font-weight: 700; }
.r-value.highlight { color: var(--primary); font-size: 15px; }

.test-link-action-card {
    background: linear-gradient(135deg, #1e1b4b, #0f172a);
    color: white;
    padding: 32px;
    border-radius: var(--radius-md);
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.test-link-action-card h3 { font-size: 20px; margin-bottom: 8px; }

.status-notice {
    font-size: 14.5px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.status-notice.waiting-notice {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-notice.active-notice {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.timer-box {
    background: rgba(255, 255, 255, 0.1);
    border: 1px dashed rgba(255, 255, 255, 0.25);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.timer-label { font-size: 13px; color: #94a3b8; font-weight: 600; }

.timer-digits {
    font-family: monospace;
    font-size: 22px;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 1px;
}

/* Password Input Visibility Toggle Button */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 48px;
}

.btn-toggle-pass {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: var(--transition);
}

.btn-toggle-pass:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Admin Session & Logout Bar */
.admin-session-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f1f5f9;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.session-timer-badge {
    font-size: 13px;
    color: #475569;
    font-weight: 600;
}

.session-timer-badge strong {
    color: var(--primary);
    font-family: monospace;
    font-size: 15px;
}

.btn-logout {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* Toast */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: #1e293b;
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    font-weight: 600;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

.toast.hidden { display: none !important; }

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Admin Modal High Z-Index */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.hidden { display: none !important; }

.modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: modalScale 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes modalScale {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    background: #0f172a;
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 { font-size: 18px; font-weight: 700; }
.close-btn { background: none; border: none; color: white; font-size: 28px; cursor: pointer; }
.modal-body { padding: 24px; }

.help-text { font-size: 12px; color: var(--text-muted); }

/* ---- Payment Button ---- */
.btn-pay {
    background: linear-gradient(135deg, #f59e0b, #ef4444, #7c3aed);
    background-size: 200% 200%;
    animation: payBtnShimmer 3s ease infinite;
    color: white;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.45);
    border: none;
    letter-spacing: 0.3px;
}

.btn-pay:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 35px rgba(239, 68, 68, 0.6);
}

.btn-pay:disabled {
    background: linear-gradient(135deg, #94a3b8, #64748b) !important;
    animation: none !important;
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

@keyframes payBtnShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---- Payment Processing Overlay ---- */
.payment-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 30, 0.88);
    backdrop-filter: blur(16px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.payment-overlay.hidden { display: none !important; }

.payment-overlay-card {
    background: linear-gradient(145deg, #1e1b4b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 48px 40px;
    text-align: center;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: overlayPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: white;
}

@keyframes overlayPop {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.pay-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: #f59e0b;
    border-right-color: #ef4444;
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 0.85s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.payment-overlay-card h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
    color: white;
}

.payment-overlay-card p {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 20px;
}

.pay-amount-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    font-size: 22px;
    font-weight: 900;
    padding: 10px 28px;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    letter-spacing: 1px;
}

/* ---- Payment Failed Screen ---- */
.failed-icon-wrapper { display: flex; justify-content: center; margin-bottom: 20px; }

.failed-circle {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 50%;
    color: white;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.title-failed { font-size: 28px; font-weight: 800; color: #ef4444; }

@media (max-width: 768px) {
    body { padding-bottom: 40px; }
    .navbar { padding: 12px 0; }
    .nav-container { flex-direction: column; gap: 14px; align-items: center; text-align: center; }
    .brand { flex-direction: column; gap: 6px; }
    .nav-actions { width: 100%; justify-content: center; flex-wrap: wrap; gap: 8px; }
    .nav-tab-btn, .nav-admin-btn { font-size: 12.5px; padding: 8px 14px; }
    .main-container { margin-top: 20px; padding: 0 12px; }
    .card-box { padding: 20px 16px; border-radius: var(--radius-md); }
    .card-header h2 { font-size: 20px; }
    .grid-2 { grid-template-columns: 1fr; gap: 14px; }
    .slot-filter-bar { flex-direction: column; gap: 12px; align-items: flex-start; padding: 12px; }
    .slot-legend { flex-wrap: wrap; gap: 10px; font-size: 11.5px; }
    .slots-grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 8px; max-height: 320px; }
    .slot-btn { padding: 10px 6px; font-size: 12px; }
    .btn-lg, .btn-xl { font-size: 15px; padding: 12px 20px; width: 100%; }
    .modal-card { max-width: 92%; margin: 0 auto; border-radius: var(--radius-md); }
    .modal-body { padding: 16px; }
}
