/* 
   Our Savior's Medical Transport (OSMT) 
   Custom Premium Stylesheet (Vanilla CSS Additions)
*/

:root {
    --primary-color: #0F2942;     /* Deep Medical Navy */
    --secondary-color: #38bdf8;   /* Sky Blue Accent */
    --accent-color: #C5A880;      /* Golden/Bronze representing Veteran/Faith-guided theme */
    --background-color: #F8FAFC;  /* Soft slate light background */
    --dark-bg: #09131C;           /* Sleek dark portal background */
}

/* Elegant Text Gradients */
.text-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-accent {
    background: linear-gradient(135deg, var(--accent-color) 0%, #a1825c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Premium Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(15, 41, 66, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    box-shadow: 0 12px 40px 0 rgba(15, 41, 66, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Dark Mode Glassmorphism (Portals) */
.glass-card-dark {
    background: rgba(15, 25, 36, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.3);
}

/* Custom Micro-Animations */
.hover-lift {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(15, 41, 66, 0.15);
}

.hover-gold:hover {
    color: var(--accent-color);
}

/* Input Fields Transition */
.form-input-custom {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input-custom:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
    outline: none;
}

/* Pulse Glow for Live Indicators */
.pulse-glow {
    position: relative;
}

.pulse-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;
    opacity: 0.4;
    animation: pulse-ring 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.2);
        opacity: 0;
    }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Custom Background Gradients */
.bg-medical-grad {
    background: radial-gradient(circle at 10% 20%, rgba(242, 246, 249, 1) 0%, rgba(228, 239, 244, 0.8) 90.1%);
}

.bg-portal-grad {
    background: linear-gradient(135deg, #09131C 0%, #0F2030 100%);
}

/* Sticky CTA Footer Banner on Mobile */
.sticky-cta-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}

/* --- Premium Sidebar Custom Styles --- */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #94a3b8; /* Dim text color */
}
.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    padding-left: 20px; /* Subtle slide animation */
}
.sidebar-link.active {
    background: linear-gradient(135deg, #c8102e 0%, #b21f35 100%) !important; /* Crimson Red matching Logo */
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(178, 31, 53, 0.4);
    border-left: none !important;
}

/* --- Premium Light Mode Dashboard Theme Overrides --- */
.portal-light {
    background-color: #f0f4f8 !important;
    color: #334155 !important;
}

.portal-light main h1,
.portal-light main h2,
.portal-light main h3,
.portal-light main h4,
.portal-light main h5,
.portal-light main h6 {
    color: #0f172a !important;
}

/* Force dark header texts */
.portal-light main .text-white {
    color: #0f172a !important;
}

.portal-light main .text-slate-300,
.portal-light main .text-slate-400 {
    color: #475569 !important;
}

.portal-light main .text-slate-500 {
    color: #64748b !important;
}

/* Cards style: Clean Solid White with Soft Shadows */
.portal-light main .glass-card-dark,
.portal-light main .glass-card {
    background: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    backdrop-filter: none !important;
    box-shadow: 0 4px 20px 0 rgba(15, 41, 66, 0.03) !important;
    color: #334155 !important;
}

.portal-light main .glass-card-dark:hover,
.portal-light main .glass-card:hover {
    box-shadow: 0 10px 30px 0 rgba(15, 41, 66, 0.06) !important;
    border: 1px solid rgba(226, 232, 240, 1) !important;
}

/* Table styling override */
.portal-light main table {
    border-collapse: separate;
    border-spacing: 0;
}

.portal-light main table thead tr {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

.portal-light main table thead th {
    color: #64748b !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.portal-light main table tbody tr {
    border-bottom: 1px solid #f1f5f9 !important;
}

.portal-light main table tbody tr:hover {
    background-color: #f8fafc !important;
}

.portal-light main table tbody td {
    color: #475569 !important;
}

.portal-light main table tbody td.text-white {
    color: #0f172a !important;
    font-weight: 700 !important;
}

/* Badge Light Color Overrides */
/* Green Badge */
.portal-light .bg-emerald-500\/10 {
    background-color: #def7ec !important;
    border-color: #bdecb6 !important;
    color: #03543f !important;
}
/* Yellow/Amber Badge */
.portal-light .bg-amber-500\/10 {
    background-color: #fef3c7 !important;
    border-color: #fde68a !important;
    color: #92400e !important;
}
/* Red/Rose Badge */
.portal-light .bg-rose-500\/10 {
    background-color: #fde8e8 !important;
    border-color: #fca5a5 !important;
    color: #9b1c1c !important;
}
/* Sky Blue Badge */
.portal-light .bg-sky-500\/10 {
    background-color: #e1f5fe !important;
    border-color: #b3e5fc !important;
    color: #0277bd !important;
}
/* Purple Badge */
.portal-light .bg-purple-500\/10 {
    background-color: #f3e5f5 !important;
    border-color: #e1bee7 !important;
    color: #6a1b9a !important;
}

/* Buttons style override inside main */
.portal-light main .bg-slate-800 {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}
.portal-light main .bg-slate-800:hover {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

/* Form Fields Styling (Including all date, time, and option elements) */
.portal-light main input[type="text"],
.portal-light main input[type="email"],
.portal-light main input[type="password"],
.portal-light main input[type="number"],
.portal-light main input[type="date"],
.portal-light main input[type="time"],
.portal-light main input[type="datetime-local"],
.portal-light main input[type="month"],
.portal-light main input[type="week"],
.portal-light main textarea,
.portal-light main select {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}
.portal-light main input::placeholder,
.portal-light main textarea::placeholder {
    color: #64748b !important;
}
.portal-light main select option,
.portal-light select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* Specific overrides for sub-cards, guidelines, and detail boxes */
.portal-light main .bg-slate-950\/20,
.portal-light main .bg-slate-950\/10,
.portal-light main .bg-slate-950\/30,
.portal-light main .bg-slate-950\/40,
.portal-light main .bg-slate-900\/40 {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

/* Inactive tabs text inside the lightened filter container */
.portal-light main .bg-slate-950\/40 a.text-slate-400 {
    color: #475569 !important;
}
.portal-light main .bg-slate-950\/40 a.text-slate-400:hover {
    color: #0f172a !important;
}

/* Work Type Badges / Grey Buttons inside Main Content */
.portal-light main .bg-slate-800\/80 {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}

/* Deep text elements contrast correction under portal-light */
.portal-light main .text-slate-300 {
    color: #334155 !important;
}
.portal-light main .text-slate-400 {
    color: #475569 !important;
}
.portal-light main .text-slate-500 {
    color: #64748b !important;
}
.portal-light main .font-bold.text-white,
.portal-light main .font-extrabold.text-white {
    color: #0f172a !important;
}

/* Geofence and general info block text fix */
.portal-light main .bg-slate-950\/20 span.text-slate-500,
.portal-light main .bg-slate-950\/20 span.text-slate-600 {
    color: #64748b !important;
}
.portal-light main .bg-slate-950\/20 span.text-white,
.portal-light main .bg-slate-950\/20 span.text-slate-400 {
    color: #0f172a !important;
}

/* Modal Light Theme Overrides */
.portal-light #correction-modal > div {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}
.portal-light #correction-modal h3 {
    color: #0f172a !important;
}
.portal-light #correction-modal label {
    color: #64748b !important;
}
.portal-light #correction-modal button[type="button"] {
    color: #64748b !important;
}
.portal-light #correction-modal button[type="button"]:hover {
    color: #0f172a !important;
}
.portal-light #correction-modal select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* --- Optimized Reading Sizing overrides for portal-light --- */
.portal-light main {
    font-size: 14.5px !important;
}
.portal-light main p,
.portal-light main span,
.portal-light main li,
.portal-light main td,
.portal-light main th {
    font-size: 14.5px !important;
}
.portal-light main .text-xs,
.portal-light main .text-sm {
    font-size: 14.5px !important;
}
.portal-light main .text-\[10px\] {
    font-size: 12.5px !important;
}
.portal-light main table thead th {
    font-size: 12.5px !important;
    font-weight: 700 !important;
}
.portal-light main input,
.portal-light main select,
.portal-light main textarea {
    font-size: 14.5px !important;
}
.portal-light main h1 {
    font-size: 1.875rem !important; /* Keep h1 large and clear */
}
.portal-light main h2 {
    font-size: 1.25rem !important; /* Keep h2 large and clear */
}
.portal-light main h3 {
    font-size: 1.1rem !important; /* Keep h3 readable */
}



