/* -------------------------------------------------------------
 * CSS SYSTEM: PNP UNIVERSAL PORTAL
 * Designed with Premium Neo-Glassmorphism, Neon Glows & Micro-Animations
 * ------------------------------------------------------------- */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

:root {
    /* Fonts */
    --font-heading: 'Outfit', 'Sarabun', sans-serif;
    --font-body: 'Inter', 'Sarabun', sans-serif;

    /* Common Accent Colors (Hex / HSL for Glows) */
    --accent-car: hsl(180, 100%, 45%);
    --accent-car-glow: rgba(0, 242, 254, 0.3);
    
    --accent-man: hsl(260, 95%, 68%);
    --accent-man-glow: rgba(138, 79, 255, 0.3);
    
    --accent-academic: hsl(38, 100%, 55%);
    --accent-academic-glow: rgba(255, 170, 0, 0.3);

    --success-color: hsl(145, 80%, 45%);
    --success-bg: rgba(46, 204, 113, 0.15);
}

/* Dark Theme (Default) */
body.dark-theme {
    --bg-primary: hsl(224, 30%, 7%);
    --bg-secondary: hsl(224, 25%, 11%);
    --bg-card: rgba(18, 23, 37, 0.65);
    
    --text-primary: hsl(210, 40%, 98%);
    --text-secondary: hsl(215, 18%, 78%);
    --text-muted: hsl(215, 13%, 58%);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    
    --header-bg: rgba(10, 13, 22, 0.7);
    --btn-toggle-bg: rgba(255, 255, 255, 0.06);
    
    --radial-glow-1: radial-gradient(circle at 10% 20%, rgba(0, 242, 254, 0.08) 0%, transparent 40%);
    --radial-glow-2: radial-gradient(circle at 90% 80%, rgba(138, 79, 255, 0.08) 0%, transparent 40%);
}

/* Light Theme */
body.light-theme {
    --bg-primary: hsl(220, 25%, 96%);
    --bg-secondary: hsl(220, 20%, 91%);
    --bg-card: rgba(255, 255, 255, 0.75);
    
    --text-primary: hsl(224, 32%, 12%);
    --text-secondary: hsl(224, 15%, 32%);
    --text-muted: hsl(224, 10%, 52%);
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    
    --header-bg: rgba(245, 247, 250, 0.85);
    --btn-toggle-bg: rgba(0, 0, 0, 0.05);
    
    --radial-glow-1: radial-gradient(circle at 10% 20%, rgba(0, 242, 254, 0.05) 0%, transparent 40%);
    --radial-glow-2: radial-gradient(circle at 90% 80%, rgba(138, 79, 255, 0.04) 0%, transparent 40%);
}

/* Body & Layout */
body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--radial-glow-1), var(--radial-glow-2);
    pointer-events: none;
    z-index: 0;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.app-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--header-bg);
    backdrop-filter: blur(12px);
    margin-left: -24px;
    margin-right: -24px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon-wrapper {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1), rgba(138, 79, 255, 0.1));
    border: 1px solid var(--border-color);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo-subtext {
    background: linear-gradient(135deg, var(--accent-car), var(--accent-man));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Clock Widget */
.clock-widget {
    background: var(--btn-toggle-bg);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: monospace;
    font-size: 14px;
    color: var(--text-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    animation: clockPulse 4s infinite alternate ease-in-out;
}

@keyframes clockPulse {
    0% { box-shadow: 0 0 8px rgba(0, 242, 254, 0.05); border-color: var(--border-color); }
    100% { box-shadow: 0 0 16px rgba(138, 79, 255, 0.15); border-color: rgba(138, 79, 255, 0.25); }
}

.clock-icon {
    font-size: 14px;
}

/* Theme Toggle */
.theme-toggle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--btn-toggle-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.theme-toggle-btn:hover {
    border-color: var(--border-hover);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-toggle-btn span {
    font-size: 18px;
    position: absolute;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
}

body.dark-theme .icon-sun {
    transform: translateY(40px);
    opacity: 0;
}

body.dark-theme .icon-moon {
    transform: translateY(0);
    opacity: 1;
}

body.light-theme .icon-sun {
    transform: translateY(0);
    opacity: 1;
}

body.light-theme .icon-moon {
    transform: translateY(-40px);
    opacity: 0;
}

/* Main Content & Hero Section */
.main-content {
    flex-grow: 1;
    padding: 60px 0;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.hero-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 20px 35px;
    display: inline-block;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    max-width: 90%;
}

.hero-logo {
    max-width: 100%;
    height: auto;
    max-height: 110px;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hero-logo-wrapper:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: var(--border-hover);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 25px 50px rgba(0, 0, 0, 0.25), 0 0 35px rgba(186, 12, 47, 0.12);
}

body.light-theme .hero-logo-wrapper {
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body.light-theme .hero-logo-wrapper:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1), rgba(138, 79, 255, 0.1));
    border: 1px solid var(--border-color);
    color: var(--accent-car);
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    font-family: var(--font-heading);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

body.light-theme .badge {
    color: hsl(260, 95%, 45%);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 64px; /* Larger font size as requested */
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.hero-college-title {
    display: block;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: -0.5px;
    margin-top: 4px;
}

.highlight-text {
    font-weight: 800;
    background: linear-gradient(120deg, var(--accent-car), var(--accent-man), var(--accent-car));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 5s linear infinite;
    filter: drop-shadow(0 2px 10px rgba(0, 242, 254, 0.1));
}

@keyframes gradientFlow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Cards Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
}

.app-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 500px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.app-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle 220px at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--glow-color, rgba(255, 255, 255, 0.12)), transparent 80%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.card-carrequest { --glow-color: rgba(0, 242, 254, 0.25); }
.card-pnpman { --glow-color: rgba(138, 79, 255, 0.22); }
.card-academic { --glow-color: rgba(255, 170, 0, 0.2); }

.app-card:hover .card-glow {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
    transform: translateZ(30px);
}

.icon-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.icon-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    opacity: 0.12;
}

.icon-car { color: var(--accent-car); }
.icon-car::before { background-color: var(--accent-car); }

.icon-man { color: var(--accent-man); }
.icon-man::before { background-color: var(--accent-man); }

.icon-academic { color: var(--accent-academic); }
.icon-academic::before { background-color: var(--accent-academic); }

.icon-box svg {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
    transition: transform 0.4s ease;
}

@keyframes floatIcon {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(3deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.app-card:hover .icon-box svg {
    animation: floatIcon 3s ease-in-out infinite;
}

.status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
}

.status-active {
    background-color: var(--success-bg);
    color: var(--success-color);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-active::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--success-color);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.9); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 8px var(--success-color); }
    100% { transform: scale(0.9); opacity: 0.5; }
}

.card-body {
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transform: translateZ(25px);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
    font-family: var(--font-body);
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.feature-list li {
    font-size: 13.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-list li span {
    font-size: 14px;
}

.card-footer {
    position: relative;
    z-index: 2;
    margin-top: 24px;
    transform: translateZ(35px);
}

.app-link {
    width: 100%;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-25deg);
    pointer-events: none;
}

.app-link:hover::after {
    left: 150%;
    transition: left 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.card-responsible {
    font-size: 8px;
    text-align: center;
    margin-top: 16px;
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.app-card:hover .card-responsible {
    opacity: 0.95;
    transform: scale(1.01);
}

/* Cyber Neon Glows for Department Labels */
.card-carrequest .card-responsible {
    color: var(--accent-car);
    text-shadow: 0 0 6px rgba(0, 242, 254, 0.6), 0 0 12px rgba(0, 242, 254, 0.3);
}
.card-pnpman .card-responsible {
    color: var(--accent-man);
    text-shadow: 0 0 6px rgba(138, 79, 255, 0.6), 0 0 12px rgba(138, 79, 255, 0.3);
}
.card-academic .card-responsible {
    color: var(--accent-academic);
    text-shadow: 0 0 6px rgba(255, 170, 0, 0.6), 0 0 12px rgba(255, 170, 0, 0.3);
}

/* Light Theme Adjustments for legibility */
body.light-theme .card-carrequest .card-responsible {
    color: hsl(180, 100%, 35%);
    text-shadow: 0 0 4px rgba(0, 242, 254, 0.2);
}
body.light-theme .card-pnpman .card-responsible {
    color: hsl(260, 90%, 50%);
    text-shadow: 0 0 4px rgba(138, 79, 255, 0.2);
}
body.light-theme .card-academic .card-responsible {
    color: hsl(38, 100%, 40%);
    text-shadow: 0 0 4px rgba(255, 170, 0, 0.2);
}

/* Card Button Colors */
.card-carrequest .app-link {
    background: linear-gradient(135deg, var(--accent-car), #00a8ff);
    color: hsl(224, 30%, 7%);
}
.card-pnpman .app-link {
    background: linear-gradient(135deg, var(--accent-man), #6236ff);
    color: #fff;
}
.card-academic .app-link {
    background: linear-gradient(135deg, var(--accent-academic), #ff7b00);
    color: hsl(224, 30%, 7%);
}

.app-link .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.app-link:hover .arrow {
    transform: translateX(6px);
}

.app-link:hover {
    transform: scale(1.02);
}

/* Glow hover effects for buttons */
.card-carrequest .app-link:hover { box-shadow: 0 0 20px var(--accent-car-glow); }
.card-pnpman .app-link:hover { box-shadow: 0 0 20px var(--accent-man-glow); }
.card-academic .app-link:hover { box-shadow: 0 0 20px var(--accent-academic-glow); }

/* Footer */
.app-footer {
    margin-top: auto;
    padding-bottom: 40px;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    width: 100%;
    margin-bottom: 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success-color);
    box-shadow: 0 0 8px var(--success-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.apps-grid > div:nth-child(1) { animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards; opacity: 0; }
.apps-grid > div:nth-child(2) { animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards; opacity: 0; }
.apps-grid > div:nth-child(3) { animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards; opacity: 0; }

/* Responsive Styles */
@media (max-width: 992px) {
    #header-greeting-wrapper {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .hero-title {
        font-size: 52px;
    }

    .hero-college-title {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .app-card {
        height: auto;
        min-height: 400px;
    }
    
    .app-header {
        margin-left: -16px;
        margin-right: -16px;
        padding: 0 16px;
    }
    
    .app-container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 38px;
        gap: 8px;
    }
    
    .hero-college-title {
        font-size: 18px;
        margin-top: 6px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .footer-meta {
        justify-content: center;
        gap: 12px;
    }
}

/* -------------------------------------------------------------
 * CENTRAL AUTH & FULL-SCREEN ADMIN CRUDS STYLING
 * Designed with Glassmorphism, cyber neon glows, and seamless UX
 * ------------------------------------------------------------- */

/* Utility Helper */
.hidden {
    display: none !important;
}

/* Auth Widget in Header */
.auth-widget {
    position: relative;
    z-index: 50;
}

.btn-login-trigger {
    background: linear-gradient(135deg, var(--accent-car), var(--accent-man));
    border: none;
    color: hsl(224, 30%, 7%);
    padding: 8px 18px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.25);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

body.light-theme .btn-login-trigger {
    color: #fff;
    box-shadow: 0 4px 15px rgba(138, 79, 255, 0.25);
}

/* User Profile Badge & Menu */
.user-profile-menu {
    position: relative;
}

.profile-badge {
    background: var(--btn-toggle-bg);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.profile-badge:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.08);
}

.avatar-icon {
    font-size: 16px;
}

/* Dropdown Menu */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 8px;
    width: 200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: fadeInUp 0.2s ease-out;
}

.dropdown-item {
    background: transparent;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    text-align: left;
    font-family: var(--font-body);
    font-size: 13.5px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, color 0.2s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

body.light-theme .dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.btn-logout {
    color: #ff4d4d;
    font-weight: 600;
}

.btn-logout:hover {
    background: rgba(255, 77, 77, 0.1) !important;
    color: #ff4d4d !important;
}

/* User Greeting Subtext */
.dynamic-greeting-wrapper {
    margin-top: 8px;
    font-size: 16px;
    color: var(--text-muted);
}

.user-welcome-name {
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-car), var(--accent-man));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 6px;
}

/* Role Pills on App Cards */
.status-indicators {
    display: flex;
    gap: 8px;
    align-items: center;
}

.role-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.2px;
}

/* Role pill themes */
.role-pill.role-none {
    background: rgba(231, 76, 60, 0.12);
    color: #ff4d4d;
    border: 1px solid rgba(231, 76, 60, 0.25);
}

.role-pill.role-user {
    background: rgba(0, 242, 254, 0.12);
    color: #00d2ff;
    border: 1px solid rgba(0, 242, 254, 0.25);
}

.role-pill.role-admin {
    background: rgba(138, 79, 255, 0.12);
    color: #bd93f9;
    border: 1px solid rgba(138, 79, 255, 0.25);
}

.role-pill.role-teacher {
    background: rgba(255, 170, 0, 0.12);
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.25);
}

.role-pill.role-driver {
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.25);
}

.app-link.disabled {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

body.light-theme .app-link.disabled {
    background: rgba(0, 0, 0, 0.03) !important;
}

/* Glassmorphic Login Overlay Modal */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 9, 17, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto;
    padding: 40px 16px;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    width: 100%;
    max-width: 500px;
    padding: 40px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: modalScaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin: auto;
}

@keyframes modalScaleUp {
    from { transform: scale(0.9) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.login-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--btn-toggle-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.login-modal-close:hover {
    transform: rotate(90deg);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.login-card-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo-glow {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1), rgba(138, 79, 255, 0.1));
    border: 1px solid var(--border-color);
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.15);
}

.login-card-header h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-card-header p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Login Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    font-size: 16px;
    pointer-events: none;
    color: var(--text-muted);
}

.input-wrapper input {
    width: 100%;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0 16px 0 48px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

body.light-theme .input-wrapper input {
    background: rgba(0, 0, 0, 0.02);
}

.input-wrapper input:focus {
    border-color: var(--accent-car);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

/* Error Message */
.login-error-msg {
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.25);
    color: #ff4d4d;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.3s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Submit Button */
.btn-submit-login {
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-car), var(--accent-man));
    color: hsl(224, 30%, 7%);
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-submit-login:hover {
    transform: scale(1.015);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4);
}

body.light-theme .btn-submit-login {
    color: #fff;
    box-shadow: 0 6px 20px rgba(138, 79, 255, 0.25);
}

/* Login Mock Help Desk */
.login-help {
    margin-top: 24px;
    border-top: 1px dashed var(--border-color);
    padding-top: 20px;
}

.help-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.login-help ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-help li {
    font-size: 11.5px;
    color: var(--text-secondary);
}

.login-help code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 600;
    color: var(--text-primary);
}

body.light-theme .login-help code {
    background: rgba(0, 0, 0, 0.05);
}

.help-desc {
    color: var(--text-muted);
}

/* -------------------------------------------------------------
 * FULL-SCREEN ADMIN MANAGEMENT OVERLAY PANEL
 * ------------------------------------------------------------- */
.admin-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 9, 17, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 105;
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto;
    padding: 40px 24px;
}

.admin-panel-card {
    background: var(--bg-card);
    border: 1px solid rgba(138, 79, 255, 0.25);
    box-shadow: 0 10px 40px rgba(138, 79, 255, 0.15);
    border-radius: 24px;
    margin: auto;
    padding: 32px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    backdrop-filter: blur(16px);
}

.admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.admin-header-title h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.admin-header-title p {
    font-size: 13.5px;
    color: var(--text-muted);
}

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

.btn-add-user-trigger {
    background: linear-gradient(135deg, #00f2fe, #2ecc71);
    color: hsl(224, 30%, 7%);
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.25);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-add-user-trigger:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

body.light-theme .btn-add-user-trigger {
    color: #fff;
}

.btn-close-admin {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--btn-toggle-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.btn-close-admin:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Admin Users Table */
.admin-table-wrapper {
    overflow-x: auto;
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13.5px;
}

.admin-users-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    font-weight: 700;
    font-family: var(--font-heading);
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

body.light-theme .admin-users-table th {
    background: rgba(0, 0, 0, 0.01);
}

.admin-users-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.admin-users-table tr:last-child td {
    border-bottom: none;
}

.admin-users-table tr:hover {
    background: rgba(255, 255, 255, 0.015);
}

body.light-theme .admin-users-table tr:hover {
    background: rgba(0, 0, 0, 0.008);
}

.text-center {
    text-align: center;
}

.table-loading {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 30px !important;
}

/* Compact Table Elements */
.user-meta-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-main-name {
    font-weight: 700;
    color: var(--text-primary);
}

.user-sub-email {
    font-size: 11.5px;
    color: var(--text-muted);
}

.user-pos-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-pos-primary {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 12.5px;
}

.user-pos-org {
    font-size: 11.5px;
    color: var(--text-secondary);
}

.user-pos-dept {
    font-size: 11.5px;
    color: var(--accent-car);
    font-weight: 600;
}

body.light-theme .user-pos-dept {
    color: hsl(200, 95%, 40%);
}

/* Actions Column Buttons */
.table-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-edit-user, .btn-delete-user {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--btn-toggle-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-edit-user {
    color: var(--accent-academic);
}

.btn-edit-user:hover {
    background: rgba(255, 170, 0, 0.1);
    border-color: var(--accent-academic);
    transform: scale(1.08);
}

.btn-delete-user {
    color: #ff4d4d;
}

.btn-delete-user:hover {
    background: rgba(255, 77, 77, 0.1);
    border-color: #ff4d4d;
    transform: scale(1.08);
}

/* Role Dropdown Selector in Admin Panel */
.admin-role-selector {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 6px 12px;
    font-size: 12.5px;
    font-family: var(--font-body);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.admin-role-selector:focus {
    border-color: var(--accent-man);
}

body.light-theme .admin-role-selector {
    background: #fff;
}

/* Admin Panel Checkbox Slide (Toggle Slider) */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--btn-toggle-bg);
    border: 1px solid var(--border-color);
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: rgba(138, 79, 255, 0.2);
    border-color: var(--accent-man);
}

input:checked + .slider:before {
    background-color: var(--accent-man);
    transform: translateX(22px);
}

/* -------------------------------------------------------------
 * GLASSMORPHIC CRUD FORM MODAL OVERLAY
 * ------------------------------------------------------------- */
.crud-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 9, 17, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 110;
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto;
    padding: 40px 20px;
}

.crud-modal-card {
    background: var(--bg-card);
    border: 1px solid rgba(138, 79, 255, 0.25);
    border-radius: 28px;
    margin: auto;
    width: 100%;
    max-width: 650px;
    padding: 36px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: modalScaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.crud-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--btn-toggle-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.crud-modal-close:hover {
    transform: rotate(90deg);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.crud-card-header {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.crud-card-header h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.crud-card-header p {
    font-size: 12.5px;
    color: var(--text-muted);
}

/* CRUD Form Fields */
.crud-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 12px;
}

/* Custom Scrollbar inside CRUD Form */
.crud-form::-webkit-scrollbar {
    width: 6px;
}

.crud-form::-webkit-scrollbar-track {
    background: transparent;
}

.crud-form::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.crud-form::-webkit-scrollbar-thumb:hover {
    background: var(--accent-man);
}

.form-row {
    display: flex;
    gap: 16px;
    width: 100%;
}

.form-row .form-group {
    flex: 1;
}

.crud-form input {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0 16px;
    font-family: var(--font-body);
    font-size: 13.5px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
}

body.light-theme .crud-form input {
    background: rgba(0, 0, 0, 0.02);
}

.crud-form input:focus {
    border-color: var(--accent-man);
    box-shadow: 0 0 12px rgba(138, 79, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.crud-form select {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0 16px;
    font-family: var(--font-body);
    font-size: 13.5px;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
}

body.light-theme .crud-form select {
    background: #fff;
}

.crud-form select:focus {
    border-color: var(--accent-man);
    box-shadow: 0 0 12px rgba(138, 79, 255, 0.15);
}

/* Checkbox Switch Row */
.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
}

.checkbox-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Error message inside CRUD Form */
.crud-error-msg {
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.25);
    color: #ff4d4d;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.3s ease-out;
}

/* Form Actions Button Bar */
.crud-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.btn-cancel-crud {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 12px;
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel-crud:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.btn-submit-crud {
    background: linear-gradient(135deg, var(--accent-man), #6236ff);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(138, 79, 255, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit-crud:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(138, 79, 255, 0.4);
}

/* Glassmorphic Centered Capsule for Greeting */
#header-greeting-wrapper {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 8px 22px;
    border-radius: 30px;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.01), 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.3s, box-shadow 0.3s;
    z-index: 10;
}

#header-greeting-wrapper:hover {
    border-color: rgba(0, 242, 254, 0.25);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.01), 0 4px 20px rgba(0, 242, 254, 0.1);
}

body.light-theme #header-greeting-wrapper {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

body.light-theme #header-greeting-wrapper:hover {
    border-color: rgba(138, 79, 255, 0.25);
}

#header-greeting-wrapper .user-welcome-name {
    font-weight: 700;
    margin-left: 2px;
}

/* =============================================================
   ACCESSIBILITY & USABILITY OVERRIDES: HIGH-CONTRAST WHITE POPUPS & INPUTS
   Ensure form popups and input fields are bright white with dark text
   for optimal readability in both dark and light parent themes.
   ============================================================= */

/* 1. Modal Containers - Force Bright White Background and Dark Text */
.login-modal-card,
.crud-modal-card,
.modal-card.user-modal-card,
.modal-card.confirm-modal-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 1) !important;
    color: #1a202c !important;
}

/* 2. Modal Headers & Headings */
.login-card-header h3,
.crud-card-header h3,
.modal-header h3 {
    color: #1a202c !important;
    text-shadow: none !important;
}

.login-card-header p,
.crud-card-header p,
.modal-subtitle {
    color: #4a5568 !important;
}

/* 3. Form Labels, Switch Text & Legends */
.form-group label,
.checkbox-label,
.role-label,
.role-select-group label {
    color: #2d3748 !important;
    font-weight: 600 !important;
}

/* 4. Close Buttons on Modals */
.login-modal-close,
.crud-modal-close,
.modal-close-btn {
    background: #f7fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #4a5568 !important;
}

.login-modal-close:hover,
.crud-modal-close:hover,
.modal-close-btn:hover {
    background: #edf2f7 !important;
    color: #1a202c !important;
    transform: rotate(90deg) scale(1.05);
}

/* 5. Input Fields, Text Areas & Select Boxes inside Modals */
.login-form input,
.crud-form input,
.crud-form select,
.user-form input,
.user-form select,
.admin-role-selector {
    background: #ffffff !important;
    border: 1px solid #cbd5e0 !important;
    color: #1a202c !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* Placeholders in inputs */
.login-form input::placeholder,
.crud-form input::placeholder,
.user-form input::placeholder {
    color: #718096 !important;
    opacity: 1 !important;
}

/* Dropdown list items / options inside Select box */
.crud-form select option,
.user-form select option,
.admin-role-selector option {
    background-color: #ffffff !important;
    color: #1a202c !important;
}

/* Focus state for inputs/selects inside Modals */
.login-form input:focus,
.crud-form input:focus,
.crud-form select:focus,
.user-form input:focus,
.user-form select:focus,
.admin-role-selector:focus {
    border-color: #6236ff !important;
    box-shadow: 0 0 0 3px rgba(98, 54, 255, 0.15) !important;
    background: #ffffff !important;
}

/* 6. Form Groups & Specific Modal Custom Blocks */
/* Login helper desk details */
.login-help {
    border-top: 1px dashed #e2e8f0 !important;
}

.login-help .help-title {
    color: #4a5568 !important;
}

.login-help li {
    color: #4a5568 !important;
}

.login-help code {
    background: #f7fafc !important;
    color: #2b6cb0 !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-theme .login-help code {
    background: #edf2f7 !important;
}

/* Role Selector / Toggle Switch Cards inside Form */
.role-toggle-group {
    background: #f7f4ff !important;
    border: 1px solid #dcd3ff !important;
}

.switch .slider {
    background-color: #edf2f7 !important;
    border: 1px solid #cbd5e0 !important;
}

.switch .slider:before {
    background-color: #a0aec0 !important;
}

input:checked + .slider {
    background-color: #dcd3ff !important;
    border-color: #8a4fff !important;
}

input:checked + .slider:before {
    background-color: #8a4fff !important;
}

/* Avatar upload box in user CRUD */
.form-avatar-section {
    background: #f7fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.avatar-preview {
    border: 2px solid #cbd5e0 !important;
    background: #edf2f7 !important;
}

.btn-upload-avatar {
    background: #edf2f7 !important;
    border: 1px solid #cbd5e0 !important;
    color: #4a5568 !important;
}

.btn-upload-avatar:hover {
    background: #e2e8f0 !important;
    border-color: #8a4fff !important;
    color: #8a4fff !important;
}

.avatar-hint {
    color: #718096 !important;
}

/* 7. Action Button Overrides inside Form */
/* Submit buttons - maintain gradient backgrounds but ensure bright, legible white text */
.btn-submit-login,
.btn-submit-crud,
.btn-submit-form {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    font-weight: 700 !important;
}

/* Cancel / Dismiss Buttons */
.btn-cancel-crud,
.btn-confirm-cancel,
.btn-cancel-action {
    background: #ffffff !important;
    border: 1px solid #cbd5e0 !important;
    color: #4a5568 !important;
}

.btn-cancel-crud:hover,
.btn-confirm-cancel:hover,
.btn-cancel-action:hover {
    background: #f7fafc !important;
    color: #1a202c !important;
    border-color: #a0aec0 !important;
}

/* Confirmation modal text */
.confirm-message {
    color: #2d3748 !important;
}

/* Divider inside forms */
.crud-form-actions {
    border-top: 1px solid #e2e8f0 !important;
}
