/* ==========================================================================
   ARS-PCRU Modern Admin Design System & Theme
   Elevating the Tabler UI to a stunning, modern executive experience
   ========================================================================== */

:root {
    --ars-font-sans: 'Prompt', 'Plus Jakarta Sans', 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ars-primary: #2563eb;
    --ars-primary-hover: #1d4ed8;
    --ars-primary-light: rgba(37, 99, 235, 0.08);
    --ars-primary-glow: rgba(37, 99, 235, 0.25);
    
    --ars-accent: #6366f1;
    --ars-accent-purple: #8b5cf6;
    --ars-pcru-gold: #f59e0b;
    --ars-pcru-gold-light: rgba(245, 158, 11, 0.12);
    
    --ars-success: #10b981;
    --ars-warning: #f59e0b;
    --ars-danger: #ef4444;
    --ars-info: #06b6d4;
    
    --ars-card-radius: 16px;
    --ars-btn-radius: 10px;
    --ars-input-radius: 10px;
    
    --ars-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --ars-shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --ars-shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    --ars-shadow-xl: 0 20px 35px -10px rgba(15, 23, 42, 0.15), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    --ars-shadow-glow: 0 0 25px rgba(59, 130, 246, 0.2);

    --ars-sidebar-bg: linear-gradient(180deg, #0b1120 0%, #0f172a 40%, #070d19 100%);
    --ars-sidebar-border: rgba(255, 255, 255, 0.08);
    --ars-sidebar-item-hover: rgba(255, 255, 255, 0.06);
    --ars-sidebar-item-active: linear-gradient(90deg, rgba(37, 99, 235, 0.25) 0%, rgba(99, 102, 241, 0.08) 100%);
}

/* Dark mode overrides */
[data-bs-theme="dark"] {
    --ars-shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.4);
    --ars-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    --ars-shadow-xl: 0 20px 35px -10px rgba(0, 0, 0, 0.6);
}

/* Base Font & Body */
body.sarabun-regular,
body.admin-body,
.font-prompt {
    font-family: var(--ars-font-sans) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.page-title, .card-title, .navbar-brand {
    font-family: 'Prompt', var(--ars-font-sans);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ==========================================================================
   Smooth Custom Scrollbars
   ========================================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.7);
}

/* ==========================================================================
   Modern Admin Login Experience (/admin)
   ========================================================================== */
.admin-login-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    padding: 2.5rem 1rem;
    background: #090e17;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.22) 0%, transparent 55%),
        radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.20) 0%, transparent 55%),
        radial-gradient(circle at 50% 40%, rgba(139, 92, 246, 0.12) 0%, transparent 60%),
        linear-gradient(180deg, #070b13 0%, #0d1527 50%, #070b14 100%);
    background-repeat: no-repeat;
    background-size: cover;
    transform: translateZ(0);
}

/* Remove grid pattern background completely */
.admin-login-layout::before {
    display: none !important;
}

/* Logo Switching between Dark and Light Mode */
.admin-logo-dark {
    display: inline-block;
}
.admin-logo-light {
    display: none;
}

[data-bs-theme="light"] .admin-logo-dark,
:root:not([data-bs-theme="dark"]) .admin-logo-dark {
    display: none !important;
}

[data-bs-theme="light"] .admin-logo-light,
:root:not([data-bs-theme="dark"]) .admin-logo-light {
    display: inline-block !important;
}

/* Theme toggle button */
.admin-theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}
.admin-theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Ambient Spotlight and Glow - Hardware Accelerated */
.admin-login-spotlight {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    width: 1000px;
    height: 600px;
    background: radial-gradient(ellipse 70% 50% at 50% 30%, rgba(37, 99, 235, 0.22) 0%, rgba(99, 102, 241, 0.10) 40%, transparent 70%);
    filter: blur(35px);
    pointer-events: none;
    z-index: 0;
    contain: strict;
    backface-visibility: hidden;
}

/* Ambient floating orb lights - Smooth 60fps GPU Composited */
.admin-login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
    opacity: 0.65;
    z-index: 0;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    contain: strict;
    backface-visibility: hidden;
}
.admin-login-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.45) 0%, rgba(59, 130, 246, 0.2) 40%, transparent 70%);
    top: -100px;
    left: -100px;
    animation: orbFloat1 18s ease-in-out infinite alternate;
}
.admin-login-orb-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, rgba(139, 92, 246, 0.18) 40%, transparent 70%);
    bottom: -120px;
    right: -120px;
    animation: orbFloat2 22s ease-in-out infinite alternate;
}
.admin-login-orb-3 {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, rgba(6, 182, 212, 0.16) 40%, transparent 70%);
    top: 35%;
    right: 5%;
    animation: orbFloat3 20s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(60px, 40px, 0) scale(1.08); }
    100% { transform: translate3d(-30px, 60px, 0) scale(0.96); }
}

@keyframes orbFloat2 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-50px, -40px, 0) scale(1.06); }
    100% { transform: translate3d(30px, -60px, 0) scale(0.94); }
}

@keyframes orbFloat3 {
    0% { transform: translate3d(0, 0, 0) scale(0.96); }
    50% { transform: translate3d(-50px, 35px, 0) scale(1.08); }
    100% { transform: translate3d(40px, -40px, 0) scale(1); }
}

/* Admin Glassmorphism Login Card - High Performance */
.admin-login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 460px;
    padding: 1.5rem;
}

.admin-login-card {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    padding: 2.25rem 2rem;
    transition: all 0.3s ease;
    color: #f1f5f9;
    transform: translateZ(0);
}

/* Glowing top badge / logo container */
.admin-brand-glow {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.25rem;
}

.admin-brand-glow img {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.admin-brand-glow:hover img {
    transform: scale(1.04);
}

.admin-portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #93c5fd;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.admin-login-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.admin-login-subtitle {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 1.75rem;
}

/* Modern Input Groups on Login */
.admin-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.admin-input-label {
    display: block;
    font-size: 0.815rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 0.4rem;
}

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

.admin-input-icon {
    position: absolute;
    left: 14px;
    color: #64748b;
    pointer-events: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.admin-input-control {
    width: 100%;
    height: 46px;
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    padding-left: 44px !important;
    padding-right: 44px !important;
    color: #ffffff !important;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.admin-input-control:focus {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), 0 4px 12px rgba(37, 99, 235, 0.15) !important;
    outline: none;
}

.admin-input-control:focus + .admin-input-icon,
.admin-input-wrapper:focus-within .admin-input-icon {
    color: #60a5fa;
}

.admin-password-toggle {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.admin-password-toggle:hover {
    color: #93c5fd;
    background: rgba(255, 255, 255, 0.05);
}

.admin-input-control.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

/* Captcha Component */
.admin-captcha-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

[data-bs-theme="light"] .admin-captcha-box,
:root:not([data-bs-theme="dark"]) .admin-captcha-box {
    background: rgba(241, 245, 249, 0.85);
    border: 1px solid rgba(203, 213, 225, 0.9);
}

.captcha-img-wrapper img {
    max-height: 44px;
    height: auto;
    display: block;
}

.admin-captcha-hint {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.35;
}

[data-bs-theme="light"] .admin-captcha-hint,
:root:not([data-bs-theme="dark"]) .admin-captcha-hint {
    color: #64748b;
}

.rotate-spin svg {
    animation: spinOnce 0.4s ease;
}

@keyframes spinOnce {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* PMIS Notice Card */
.admin-pmis-notice {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-top: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.815rem;
    color: #fef3c7;
    line-height: 1.45;
}

.admin-pmis-notice-icon {
    color: #f59e0b;
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Gradient Primary Button */
.btn-admin-gradient {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.975rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-admin-gradient:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%) !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.btn-admin-gradient:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.btn-admin-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    transition: 0.6s ease;
}

.btn-admin-gradient:hover::after {
    left: 140%;
}

/* Trust footer badges */
.admin-trust-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.775rem;
    color: #64748b;
    text-align: center;
}

.admin-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
}

/* ==========================================================================
   Admin Shell / Layout Elements
   ========================================================================== */

/* Modernized Vertical Sidebar */
.navbar-vertical.navbar-expand-lg {
    background: var(--ars-sidebar-bg) !important;
    border-right: 1px solid var(--ars-sidebar-border) !important;
    box-shadow: 4px 0 24px -4px rgba(0, 0, 0, 0.25);
}

.navbar-vertical .navbar-brand {
    padding: 1.25rem 1rem;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 80px;
}

.navbar-vertical .navbar-brand img {
    height: 78px;
    max-height: 88px;
    width: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.navbar-vertical .navbar-brand:hover img {
    transform: scale(1.03);
}

/* Sidebar User Mini-Card */
.sidebar-user-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0.85rem;
    margin: 0.75rem 0.85rem 1rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.sidebar-user-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    flex-shrink: 0;
}

.sidebar-user-info {
    min-width: 0;
    flex: 1;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.sidebar-user-role {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Category Section Headers in Sidebar */
.sidebar-category-header {
    padding: 0.85rem 1rem 0.35rem 1rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

/* Sidebar Nav Items */
.navbar-vertical .navbar-nav .nav-link {
    border-radius: 10px;
    margin: 2px 8px;
    padding: 0.55rem 0.85rem;
    color: #cbd5e1 !important;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.navbar-vertical .navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background: var(--ars-sidebar-item-hover) !important;
    transform: translateX(2px);
}

.navbar-vertical .navbar-nav .nav-item.active > .nav-link,
.navbar-vertical .navbar-nav .nav-link.active {
    color: #ffffff !important;
    background: var(--ars-sidebar-item-active) !important;
    font-weight: 600;
    box-shadow: inset 3px 0 0 0 #3b82f6;
}

.navbar-vertical .navbar-nav .nav-link-icon {
    width: 1.35rem;
    height: 1.35rem;
    margin-right: 0.65rem;
    color: #94a3b8;
    transition: color 0.2s ease, transform 0.2s ease;
}

.navbar-vertical .navbar-nav .nav-link:hover .nav-link-icon,
.navbar-vertical .navbar-nav .nav-link.active .nav-link-icon {
    color: #60a5fa;
    transform: scale(1.08);
}

/* Submenu / Dropdowns in Sidebar */
.navbar-vertical .dropdown-menu {
    background: rgba(11, 17, 32, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px;
    padding: 0.4rem;
    margin: 0.2rem 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.navbar-vertical .dropdown-item {
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    color: #94a3b8 !important;
    font-size: 0.825rem;
    transition: all 0.15s ease;
}

.navbar-vertical .dropdown-item:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    padding-left: 1.05rem;
}

.navbar-vertical .dropdown-item.active {
    color: #60a5fa !important;
    background: rgba(37, 99, 235, 0.18) !important;
    font-weight: 600;
}

/* Modern Top Header */
header.navbar.navbar-expand-md {
    background: rgba(var(--tblr-bg-surface-rgb), 0.85) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(var(--tblr-border-color-rgb), 0.7) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 70px;
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
}

/* Header greeting badge */
.header-greeting-title {
    font-size: 0.925rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.header-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--tblr-secondary);
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(var(--tblr-secondary-rgb), 0.08);
}

/* Header Action Icons */
.header-icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--tblr-secondary);
    border: 1px solid rgba(var(--tblr-border-color-rgb), 0.6);
    background: rgba(var(--tblr-bg-surface-rgb), 0.5);
    transition: all 0.2s ease;
    padding: 0 !important;
    position: relative;
}

.header-icon-btn:hover {
    color: var(--tblr-primary);
    border-color: rgba(var(--tblr-primary-rgb), 0.4);
    background: rgba(var(--tblr-primary-rgb), 0.08);
    transform: translateY(-1px);
}

/* Header Notification Badge - comfortably positioned without clipping ceiling */
#admin-notification-badge,
.header-notification-badge {
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    min-width: 18px !important;
    height: 18px !important;
    line-height: 1 !important;
    padding: 0 5px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    background-color: #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.35) !important;
    pointer-events: none;
    z-index: 2;
}

/* User Avatar in Header */
.header-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

/* ==========================================================================
   Modern Cards, Tables & Dashboard Components
   ========================================================================== */
.card {
    border-radius: var(--ars-card-radius) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px -2px rgba(0, 0, 0, 0.05), 0 1px 4px -1px rgba(0, 0, 0, 0.03) !important;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    background-color: #ffffff;
}

[data-bs-theme="dark"] .card {
    background-color: #182230 !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.4) !important;
}

.card:hover {
    box-shadow: var(--ars-shadow-lg) !important;
}

.card-header {
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 0.875rem 1.25rem;
    background-color: #f8fafc !important;
}

[data-bs-theme="dark"] .card-header {
    background-color: rgba(11, 19, 32, 0.45) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
}

.card-footer {
    border-top: 1px solid #e2e8f0 !important;
    padding: 0.85rem 1.25rem;
    background-color: #f8fafc !important;
}

[data-bs-theme="dark"] .card-footer {
    background-color: rgba(11, 19, 32, 0.45) !important;
    border-top: 1px solid rgba(148, 163, 184, 0.18) !important;
}

.card-title {
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modern Executive Profile Header Card (Sleek, integrated, no banner) */
.profile-header-card,
.profile-hero-card {
    border-radius: 18px !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02) !important;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    padding: 1.5rem 1.75rem;
    background-image: radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.05) 0%, transparent 60%) !important;
}

/* Subtle top accent gradient line */
.profile-header-card::before,
.profile-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    background: linear-gradient(90deg, #2563eb 0%, #4f46e5 50%, #06b6d4 100%);
    z-index: 1;
}

[data-bs-theme="dark"] .profile-header-card,
[data-bs-theme="dark"] .profile-hero-card {
    background-color: #182230 !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4) !important;
    background-image: radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.1) 0%, transparent 60%) !important;
}

.profile-hero-banner {
    display: none !important;
}

.profile-header-body,
.profile-hero-content {
    position: relative;
    z-index: 2;
    padding: 0 !important;
    margin-top: 0 !important;
}

.profile-avatar-wrapper {
    position: relative;
    display: inline-flex;
}

.profile-header-avatar,
.profile-hero-avatar {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 50%, #6366f1 100%);
    border: 2.5px solid #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

[data-bs-theme="dark"] .profile-header-avatar,
[data-bs-theme="dark"] .profile-hero-avatar {
    border: 2.5px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.profile-status-beacon {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #10b981;
    border: 2.5px solid #ffffff;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

[data-bs-theme="dark"] .profile-status-beacon {
    border-color: #182230;
}

.profile-info-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

[data-bs-theme="dark"] .profile-info-row {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.profile-info-row:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

[data-bs-theme="dark"] .profile-info-row:hover {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(148, 163, 184, 0.4);
}

.profile-info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
}

[data-bs-theme="dark"] .profile-info-label {
    color: #94a3b8;
}

.profile-info-val {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    text-align: right;
}

[data-bs-theme="dark"] .profile-info-val {
    color: #f8fafc;
}

/* Modern Pill Badges */
.badge-soft-primary {
    background: rgba(37, 99, 235, 0.12) !important;
    color: #2563eb !important;
    border: 1px solid rgba(37, 99, 235, 0.25) !important;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.35em 0.75em;
}

.badge-soft-success {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.35em 0.75em;
}

.badge-soft-warning {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #d97706 !important;
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.35em 0.75em;
}

.badge-soft-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.35em 0.75em;
}

.badge-soft-indigo {
    background: rgba(99, 102, 241, 0.12) !important;
    color: #6366f1 !important;
    border: 1px solid rgba(99, 102, 241, 0.25) !important;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.35em 0.75em;
}

/* ==========================================================================
   High-Contrast Modern Form Controls inside Cards & Throughout Admin
   ========================================================================== */

/* Form Labels: clear, readable, prominent */
.form-label,
label.form-label {
    font-weight: 600 !important;
    font-size: 0.84rem !important;
    color: #1e293b !important;
    margin-bottom: 0.375rem !important;
    letter-spacing: -0.01em;
}

[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] label.form-label {
    color: #e2e8f0 !important;
}

/* Form Controls: standard text inputs */
.form-control,
textarea.form-control {
    border-radius: var(--ars-input-radius) !important;
    background-color: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
    font-size: 0.875rem !important;
    padding: 0.55rem 0.85rem !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.2s ease-in-out !important;
}

/* Form Selects: dedicated right padding & modern crisp chevron arrow */
.form-select {
    border-radius: var(--ars-input-radius) !important;
    background-color: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
    font-size: 0.875rem !important;
    padding: 0.55rem 2.25rem 0.55rem 0.85rem !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.2s ease-in-out !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 14px 10px !important;
    cursor: pointer;
}

/* Form Select Small */
.form-select-sm {
    padding: 0.285rem 1.85rem 0.285rem 0.65rem !important;
    font-size: 0.8125rem !important;
    border-radius: 8px !important;
    background-position: right 0.55rem center !important;
    background-size: 12px 8px !important;
}

/* DataTables length dropdown specifically (#dt-length-0, .dt-length select) */
div.dt-container div.dt-length select,
.dataTables_length select {
    display: inline-block !important;
    width: auto !important;
    min-width: 4.5rem !important;
    padding: 0.285rem 1.85rem 0.285rem 0.65rem !important;
    font-size: 0.8125rem !important;
    line-height: 1.5 !important;
    border-radius: 8px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.55rem center !important;
    background-size: 12px 8px !important;
    cursor: pointer !important;
}

/* Placeholder readability */
.form-control::placeholder,
textarea.form-control::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

/* Form Controls Hover State */
.form-control:hover,
.form-select:hover,
textarea.form-control:hover,
div.dt-container div.dt-length select:hover,
.dataTables_length select:hover {
    border-color: #94a3b8 !important;
    background-color: #ffffff !important;
}

/* Form Controls Focus State */
.form-control:focus,
.form-select:focus,
textarea.form-control:focus,
div.dt-container div.dt-length select:focus,
.dataTables_length select:focus {
    background-color: #ffffff !important;
    border-color: #2563eb !important;
    color: #0f172a !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18), inset 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    outline: none !important;
}

/* Readonly & Disabled Controls */
.form-control:disabled,
.form-control[readonly],
.form-select:disabled,
textarea.form-control:disabled,
textarea.form-control[readonly] {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #64748b !important;
    opacity: 0.85;
    cursor: not-allowed;
    box-shadow: none !important;
}

/* Input Groups & Text Addons */
.input-group-text {
    background-color: #f1f5f9 !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #475569 !important;
    font-weight: 500;
    padding: 0.55rem 0.85rem;
}

.input-group-flat > .form-control:not(:last-child) {
    border-right-color: transparent !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group-flat > .input-group-text:not(:first-child) {
    border-left-color: transparent !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    background-color: #f8fafc !important;
}

/* Checkboxes & Radios */
.form-check-input {
    border: 1.5px solid #94a3b8 !important;
    background-color: #f8fafc !important;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
}

.form-check-label {
    color: #1e293b !important;
    font-weight: 500;
    font-size: 0.85rem;
}

[data-bs-theme="dark"] .form-check-label {
    color: #e2e8f0 !important;
}

/* TomSelect Integration */
.ts-control {
    background-color: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: var(--ars-input-radius) !important;
    color: #0f172a !important;
    padding: 0.45rem 0.85rem !important;
    min-height: calc(1.5em + 1.1rem + 2px) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.2s ease;
}

.ts-wrapper.focus .ts-control {
    background-color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
}

.ts-dropdown {
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

/* Dark Mode Form Control Overrides */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] textarea.form-control,
[data-bs-theme="dark"] div.dt-container div.dt-length select,
[data-bs-theme="dark"] .dataTables_length select {
    background-color: #0b1320 !important;
    border: 1.5px solid rgba(148, 163, 184, 0.35) !important;
    color: #f8fafc !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] div.dt-container div.dt-length select,
[data-bs-theme="dark"] .dataTables_length select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3e%3c/svg%3e") !important;
}

[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] textarea.form-control::placeholder {
    color: #64748b !important;
}

[data-bs-theme="dark"] .form-control:hover,
[data-bs-theme="dark"] .form-select:hover,
[data-bs-theme="dark"] textarea.form-control:hover {
    border-color: rgba(148, 163, 184, 0.6) !important;
    background-color: #080e1a !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] textarea.form-control:focus {
    background-color: #060a12 !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
}

[data-bs-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-control[readonly],
[data-bs-theme="dark"] .form-select:disabled,
[data-bs-theme="dark"] textarea.form-control:disabled,
[data-bs-theme="dark"] textarea.form-control[readonly] {
    background-color: rgba(15, 23, 42, 0.5) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .input-group-text {
    background-color: #1e293b !important;
    border: 1.5px solid rgba(148, 163, 184, 0.35) !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .input-group-flat > .input-group-text:not(:first-child) {
    background-color: #0b1320 !important;
}

[data-bs-theme="dark"] .form-check-input {
    border: 1.5px solid rgba(148, 163, 184, 0.45) !important;
    background-color: #0b1320 !important;
}

[data-bs-theme="dark"] .form-check-input:checked {
    background-color: #38bdf8 !important;
    border-color: #38bdf8 !important;
}

[data-bs-theme="dark"] .ts-control {
    background-color: #0b1320 !important;
    border: 1.5px solid rgba(148, 163, 184, 0.35) !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .ts-wrapper.focus .ts-control {
    border-color: #38bdf8 !important;
    background-color: #060a12 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
}

[data-bs-theme="dark"] .ts-dropdown {
    background-color: #0f172a !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
    color: #f8fafc !important;
}

/* Modern Signature Pad area */
.signature-box-wrapper {
    background: #ffffff;
    border: 2px dashed rgba(var(--tblr-border-color-rgb), 0.9);
    border-radius: 14px;
    padding: 1rem;
    position: relative;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.03);
}

[data-bs-theme="dark"] .signature-box-wrapper {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.15);
}

/* Modern Modals */
.modal-content {
    border-radius: 20px !important;
    border: 1px solid rgba(var(--tblr-border-color-rgb), 0.8) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(var(--tblr-border-color-rgb), 0.6);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(var(--tblr-border-color-rgb), 0.6);
}

/* Footer modern look */
footer.footer {
    border-top: 1px solid rgba(var(--tblr-border-color-rgb), 0.5) !important;
    padding: 1.25rem 0;
    font-size: 0.825rem;
    color: var(--tblr-secondary);
}

/* Light Mode Overrides for Login Page */
/* Light Mode Overrides for Login Page - Stunning High-End Aurora Aesthetic */
[data-bs-theme="light"] .admin-login-layout,
:root:not([data-bs-theme="dark"]) .admin-login-layout {
    background-color: #f1f5f9;
    background-image: 
        radial-gradient(ellipse 65% 55% at 0% 0%, rgba(59, 130, 246, 0.35) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 100% 0%, rgba(14, 165, 233, 0.30) 0%, transparent 55%),
        radial-gradient(ellipse 65% 55% at 100% 100%, rgba(168, 85, 247, 0.28) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 0% 100%, rgba(99, 102, 241, 0.28) 0%, transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(244, 114, 182, 0.16) 0%, transparent 65%),
        linear-gradient(135deg, #f8fafc 0%, #edf2f7 50%, #f1f5f9 100%);
    background-repeat: no-repeat;
    background-size: cover;
}

[data-bs-theme="light"] .admin-login-layout::before,
:root:not([data-bs-theme="dark"]) .admin-login-layout::before {
    display: none !important;
}

[data-bs-theme="light"] .admin-login-spotlight,
:root:not([data-bs-theme="dark"]) .admin-login-spotlight {
    background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.24) 0%, rgba(14, 165, 233, 0.16) 35%, rgba(168, 85, 247, 0.10) 55%, transparent 70%);
    filter: blur(35px);
}

[data-bs-theme="light"] .admin-login-orb-1,
:root:not([data-bs-theme="dark"]) .admin-login-orb-1 {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.45) 0%, rgba(59, 130, 246, 0.22) 40%, transparent 70%);
    opacity: 0.85;
}

[data-bs-theme="light"] .admin-login-orb-2,
:root:not([data-bs-theme="dark"]) .admin-login-orb-2 {
    background: radial-gradient(circle, rgba(147, 51, 234, 0.40) 0%, rgba(99, 102, 241, 0.20) 40%, transparent 70%);
    opacity: 0.85;
}

[data-bs-theme="light"] .admin-login-orb-3,
:root:not([data-bs-theme="dark"]) .admin-login-orb-3 {
    background: radial-gradient(circle, rgba(244, 114, 182, 0.35) 0%, rgba(236, 72, 153, 0.18) 40%, transparent 70%);
    opacity: 0.8;
}

[data-bs-theme="light"] .admin-theme-toggle-btn,
:root:not([data-bs-theme="dark"]) .admin-theme-toggle-btn {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(203, 213, 225, 0.9);
    color: #1e293b;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08);
}

[data-bs-theme="light"] .admin-theme-toggle-btn:hover,
:root:not([data-bs-theme="dark"]) .admin-theme-toggle-btn:hover {
    background: #ffffff;
    color: #0f172a;
    border-color: #94a3b8;
    box-shadow: 0 6px 20px -2px rgba(37, 99, 235, 0.15);
}

[data-bs-theme="light"] .admin-login-card,
:root:not([data-bs-theme="dark"]) .admin-login-card {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 
        0 25px 50px -12px rgba(30, 41, 59, 0.12),
        0 10px 20px -8px rgba(30, 41, 59, 0.06),
        0 0 0 1px rgba(226, 232, 240, 0.7) !important;
    color: #1e293b !important;
    transform: translateZ(0);
}

/* Light mode solid opaque logo badge */
[data-bs-theme="light"] .admin-brand-glow,
:root:not([data-bs-theme="dark"]) .admin-brand-glow {
    background: #ffffff !important;
    border: 1.5px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 
        0 12px 28px -6px rgba(37, 99, 235, 0.15),
        0 4px 10px -2px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 #ffffff !important;
}

[data-bs-theme="light"] .admin-brand-glow img,
:root:not([data-bs-theme="dark"]) .admin-brand-glow img {
    filter: none !important;
}

[data-bs-theme="light"] .admin-portal-badge,
:root:not([data-bs-theme="dark"]) .admin-portal-badge {
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%) !important;
    border: 1px solid #bfdbfe !important;
    color: #1d4ed8 !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08) !important;
}

[data-bs-theme="light"] .admin-pulse-dot,
:root:not([data-bs-theme="dark"]) .admin-pulse-dot {
    background-color: #2563eb !important;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.7) !important;
}

[data-bs-theme="light"] .admin-login-title,
:root:not([data-bs-theme="dark"]) .admin-login-title {
    color: #0f172a;
    font-weight: 700;
}

[data-bs-theme="light"] .admin-login-subtitle,
:root:not([data-bs-theme="dark"]) .admin-login-subtitle {
    color: #64748b;
}

[data-bs-theme="light"] .admin-input-control,
:root:not([data-bs-theme="dark"]) .admin-input-control {
    background: rgba(248, 250, 252, 0.85) !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-bs-theme="light"] .admin-input-control:focus,
:root:not([data-bs-theme="dark"]) .admin-input-control:focus {
    background: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15) !important;
}

[data-bs-theme="light"] .admin-input-label,
:root:not([data-bs-theme="dark"]) .admin-input-label {
    color: #334155;
}

[data-bs-theme="light"] .admin-input-icon,
:root:not([data-bs-theme="dark"]) .admin-input-icon {
    color: #64748b;
}

[data-bs-theme="light"] .admin-input-wrapper:focus-within .admin-input-icon,
:root:not([data-bs-theme="dark"]) .admin-input-wrapper:focus-within .admin-input-icon {
    color: #2563eb;
}

[data-bs-theme="light"] .admin-pmis-notice,
:root:not([data-bs-theme="dark"]) .admin-pmis-notice {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #f59e0b;
    color: #92400e;
}

[data-bs-theme="light"] .admin-trust-footer,
:root:not([data-bs-theme="dark"]) .admin-trust-footer {
    border-top-color: #e2e8f0;
    color: #64748b;
}

[data-bs-theme="light"] .admin-trust-badge,
:root:not([data-bs-theme="dark"]) .admin-trust-badge {
    color: #475569;
}

/* ==========================================================================
   ARS Online Petition / Request & Approval Animated Decorations
   ========================================================================== */
.ars-decor-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
    contain: layout paint;
    transform: translateZ(0);
}

/* Background animated workflow SVG path - Zero scroll jank */
.ars-workflow-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    width: 100%;
    height: 100%;
    min-width: 1100px;
    min-height: 600px;
    pointer-events: none;
    z-index: 1;
}

.ars-flow-path-bg {
    color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="light"] .ars-flow-path-bg,
:root:not([data-bs-theme="dark"]) .ars-flow-path-bg {
    color: rgba(99, 102, 241, 0.16);
}

.ars-flow-path-active {
    stroke-dasharray: 160 1200;
    stroke-dashoffset: 0;
    animation: arsFlowDash 14s linear infinite;
    will-change: stroke-dashoffset;
}

@keyframes arsFlowDash {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -1360;
    }
}

/* Floating Document & Approval Items - 60fps Hardware Accelerated */
.ars-floating-item {
    position: absolute;
    border-radius: 18px;
    padding: 1.15rem 1.25rem;
    pointer-events: none;
    z-index: 3;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    /* Dark Mode default */
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* Light Mode Overrides for Floating Items */
[data-bs-theme="light"] .ars-floating-item,
:root:not([data-bs-theme="dark"]) .ars-floating-item {
    background: rgba(255, 255, 255, 0.94);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 18px 40px -10px rgba(30, 41, 59, 0.12),
        0 8px 16px -4px rgba(30, 41, 59, 0.06),
        0 0 0 1px rgba(226, 232, 240, 0.8);
    color: #0f172a;
}

/* Item 1: Online Petition Form (Top-Left) */
.ars-card-request {
    left: 4.5%;
    top: 18%;
    width: 270px;
    animation: arsFloat1 7.5s ease-in-out infinite alternate;
}

/* Item 2: Approved Seal (Right-Center) */
.ars-card-approved {
    right: 4.5%;
    top: 25%;
    width: 280px;
    animation: arsFloat2 8.5s ease-in-out infinite alternate;
}

/* Item 3: Timeline Flow (Left-Bottom) */
.ars-card-timeline {
    left: 5.5%;
    bottom: 12%;
    width: 320px;
    animation: arsFloat3 9s ease-in-out infinite alternate;
}

/* Item 4: Realtime Tracking Seal (Right-Bottom) */
.ars-card-seal {
    right: 5.5%;
    bottom: 15%;
    width: 300px;
    animation: arsFloat4 8s ease-in-out infinite alternate;
}

/* Keyframes for Floating Elements - GPU translate3d without repainting */
@keyframes arsFloat1 {
    0% { transform: translate3d(0, 0px, 0) rotate(0deg); }
    50% { transform: translate3d(0, -14px, 0) rotate(1.2deg); }
    100% { transform: translate3d(0, 8px, 0) rotate(-0.8deg); }
}

@keyframes arsFloat2 {
    0% { transform: translate3d(0, 0px, 0) rotate(0deg); }
    50% { transform: translate3d(0, 14px, 0) rotate(-1.2deg); }
    100% { transform: translate3d(0, -10px, 0) rotate(0.8deg); }
}

@keyframes arsFloat3 {
    0% { transform: translate3d(0, 0px, 0) scale(1); }
    50% { transform: translate3d(0, -12px, 0) scale(1.02); }
    100% { transform: translate3d(0, 8px, 0) scale(0.98); }
}

@keyframes arsFloat4 {
    0% { transform: translate3d(0, 0px, 0) rotate(0deg); }
    50% { transform: translate3d(0, -12px, 0) rotate(-1deg); }
    100% { transform: translate3d(0, 8px, 0) rotate(1.2deg); }
}

/* Micro Elements inside Floating Cards */
.ars-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ars-card-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.2;
}

[data-bs-theme="light"] .ars-card-label,
:root:not([data-bs-theme="dark"]) .ars-card-label {
    color: #64748b;
}

.ars-card-val {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}

.ars-doc-skeleton {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 6px 0;
}

.ars-doc-line {
    height: 5px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.12);
}

[data-bs-theme="light"] .ars-doc-line,
:root:not([data-bs-theme="dark"]) .ars-doc-line {
    background: #e2e8f0;
}

.ars-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
}

.ars-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    animation: arsPulse 1.8s infinite;
}

@keyframes arsPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.ars-doc-code {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
}

.ars-signature-mini {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.18);
}

[data-bs-theme="light"] .ars-signature-mini,
:root:not([data-bs-theme="dark"]) .ars-signature-mini {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #334155;
}

.ars-step-node {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

.ars-step-node.active {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

[data-bs-theme="light"] .ars-step-node {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #64748b;
}

[data-bs-theme="light"] .ars-step-node.active {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #059669;
}

.ars-step-arrow {
    color: #64748b;
    font-size: 0.7rem;
}

.ars-pulse-mini {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #f59e0b;
    animation: arsPulse 1.5s infinite;
}

.ars-seal-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

[data-bs-theme="light"] .ars-seal-icon {
    background: #eff6ff;
    border-color: #bfdbfe;
}

/* Floating SVG Icons */
.ars-floating-icon {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    animation: arsFloatIcon 10s ease-in-out infinite alternate;
}

.ars-float-icon-1 {
    left: 27%;
    top: 10%;
    animation-delay: -2s;
}

.ars-float-icon-2 {
    right: 28%;
    bottom: 11%;
    animation-delay: -5s;
}

@keyframes arsFloatIcon {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); }
    50% { transform: translate3d(0, -20px, 0) rotate(6deg); }
    100% { transform: translate3d(0, 12px, 0) rotate(-5deg); }
}

@media (max-width: 1440px) {
    .ars-card-request { left: 2%; width: 240px; }
    .ars-card-approved { right: 2%; width: 250px; }
    .ars-card-timeline { left: 2%; bottom: 8%; width: 290px; }
    .ars-card-seal { right: 2%; bottom: 8%; width: 270px; }
}

@media (max-width: 1200px) {
    .ars-card-timeline,
    .ars-card-seal {
        display: none !important;
    }
    .ars-card-request { left: 1%; top: 12%; width: 220px; }
    .ars-card-approved { right: 1%; top: 16%; width: 230px; }
}

/* ThaiID Login Button */
.btn-thaiid {
    background: linear-gradient(135deg, #0b1e70 0%, #061148 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.925rem;
    height: 46px;
    border-radius: 12px !important;
    box-shadow: 0 4px 14px rgba(11, 30, 112, 0.35);
    transition: all 0.25s ease;
    text-decoration: none;
}
.btn-thaiid:hover {
    background: linear-gradient(135deg, #132a96 0%, #0a1a6b 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(11, 30, 112, 0.45);
    color: #ffffff !important;
}
[data-bs-theme="light"] .btn-thaiid,
:root:not([data-bs-theme="dark"]) .btn-thaiid {
    background: linear-gradient(135deg, #0d2282 0%, #081657 100%) !important;
    border: 1px solid rgba(13, 34, 130, 0.3) !important;
    box-shadow: 0 4px 14px rgba(13, 34, 130, 0.25);
    color: #ffffff !important;
}


