/* Import Sora for headings and the existing body fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300..800;1,300..800&family=Plus+Jakarta+Sans:ital,wght@0,300..800;1,300..800&family=Sora:wght@400;500;600;700&display=swap');

:root {
    /* --font-heading: 'Sora', 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif; */
    --font-heading: 'Sora', sans-serif;
    --font-body: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
    --color-ink: #111111;
    --color-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-canvas: #f8f9fa;
}

body,
html {
    font-family: var(--font-body);
    color: var(--color-ink);
    letter-spacing: -0.01em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.025em;
    color: var(--color-ink);
}

/* Eufro DMC Brand Badges & Pill Tags */
.eufro-badge,
.pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background-color: #f1f5f9;
    color: #334155;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Custom scrollbar */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

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

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

/* Sidebar transitions */
.sidebar-transition {
    transition: width 0.3s ease, transform 0.3s ease;
}

/* Card hover effects */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

/* Status pulse animation */
@keyframes pulse-dot {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

.pulse-dot {
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Skeleton loading */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

/* Table row hover */
.table-row-hover {
    transition: background-color 0.15s ease;
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ==========================================================================
   GLOBAL FORM CONTROLS OVERRIDES (Fixing Tailwind Preflight Padding: 0 Reset)
   ========================================================================== */

/* Fix padding: 0 reset for form elements */
button,
input,
optgroup,
select,
textarea {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Default Input, Select, Textarea Padding and Styling */
input[type="text"],
/*input[type="email"], 
input[type="password"],*/
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="url"],
input[type="search"],
select,
textarea {
    /* padding: 0.625rem 0.875rem !important; */
    /* Fix 0 padding reset */
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.75rem !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background-color 0.15s ease-in-out !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03) !important;
}

/* Exception for Checkboxes and Radios */
input[type="checkbox"],
input[type="radio"] {
    padding: 0 !important;
    accent-color: #4f46e5;
    cursor: pointer;
}

/* Hover & Focus states for form inputs */
input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
input[type="search"]:hover,
select:hover,
textarea:hover {
    border-color: #94a3b8 !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    outline: 2px solid transparent !important;
    outline-offset: 2px !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12) !important;
    background-color: #ffffff !important;
}

/* Disabled State */
input:disabled,
select:disabled,
textarea:disabled {
    background-color: #f8fafc !important;
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

/* Placeholder Styling */
input::placeholder,
textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

/* Custom Select Dropdown Chevron Arrow */
select:not([multiple]) {
    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' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%6b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 0.75rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.25em 1.25em !important;
    padding-right: 2.5rem !important;
}

/* Optgroup styling */
optgroup {
    font-weight: 700;
    color: #334155;
    padding: 0.25rem 0.5rem;
}

/* Form Label Styling */
label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.375rem;
}

/* Glassmorphism effects */
.glass {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .print-full-width {
        width: 100% !important;
    }

    body {
        font-size: 12pt;
    }
}

/* Custom stat card indicators */
.stat-indigo {
    border-left: 4px solid #6366f1;
}

.stat-emerald {
    border-left: 4px solid #10b981;
}

.stat-amber {
    border-left: 4px solid #f59e0b;
}

.stat-rose {
    border-left: 4px solid #f43f5e;
}

/* Timeline styles */
.timeline-step {
    position: relative;
}

.timeline-step::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    height: 2rem;
    width: 2px;
    background: #e2e8f0;
    transform: translateX(-50%);
}

.timeline-step:last-child::before {
    display: none;
}

.timeline-step.completed::before {
    background: #10b981;
}

.timeline-step.active {
    color: #6366f1;
}

/* ==========================================================================
   STYLING FOR RICH CONTENT & PROSE HTML LISTS (Fixing Tailwind Preflight Reset)
   ========================================================================== */
.prose ul,
.rich-content ul,
ul.rich-list {
    list-style-type: disc !important;
    padding-left: 1.5rem !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.prose ol,
.rich-content ol,
ol.rich-list {
    list-style-type: decimal !important;
    padding-left: 1.5rem !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.prose li,
.rich-content li,
li.rich-item {
    margin-top: 0.25rem !important;
    margin-bottom: 0.25rem !important;
    display: list-item !important;
    line-height: 1.6 !important;
}

.prose p,
.rich-content p {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.prose blockquote,
.rich-content blockquote {
    border-left: 4px solid #cbd5e1 !important;
    padding-left: 1rem !important;
    font-style: italic !important;
    color: #475569 !important;
    margin: 0.5rem 0 !important;
}

/* ==========================================================================
   MONOCHROME APPLICATION THEME
   The admin and agent shells use black, white, and neutral grays only. The
   utility overrides also keep legacy screens visually consistent.
   ========================================================================== */
.app-shell {
    --mono-ink: #111111;
    --mono-muted: #6b7280;
    --mono-line: #d4d4d4;
    --mono-canvas: #f7f7f7;
    --mono-soft: #f1f1f1;
    background: var(--mono-canvas);
    color: var(--mono-ink);
}

.app-shell :focus-visible {
    outline: 2px solid #111111 !important;
    outline-offset: 3px;
}

.app-shell :is([class*="bg-blue-"], [class*="bg-indigo-"], [class*="bg-violet-"],
    [class*="bg-purple-"], [class*="bg-pink-"], [class*="bg-rose-"],
    [class*="bg-red-"], [class*="bg-orange-"], [class*="bg-amber-"],
    [class*="bg-yellow-"], [class*="bg-lime-"], [class*="bg-green-"],
    [class*="bg-emerald-"], [class*="bg-teal-"], [class*="bg-cyan-"],
    [class*="bg-sky-"]) {
    background-color: var(--mono-soft) !important;
}

/* Filled actions retain a clear, high-contrast black treatment. */
.app-shell :is([class*="bg-blue-500"], [class*="bg-blue-600"], [class*="bg-blue-700"],
    [class*="bg-indigo-500"], [class*="bg-indigo-600"], [class*="bg-indigo-700"],
    [class*="bg-violet-500"], [class*="bg-violet-600"], [class*="bg-violet-700"],
    [class*="bg-purple-500"], [class*="bg-purple-600"], [class*="bg-purple-700"],
    [class*="bg-pink-500"], [class*="bg-pink-600"], [class*="bg-pink-700"],
    [class*="bg-rose-500"], [class*="bg-rose-600"], [class*="bg-rose-700"],
    [class*="bg-red-500"], [class*="bg-red-600"], [class*="bg-red-700"],
    [class*="bg-orange-500"], [class*="bg-amber-500"], [class*="bg-yellow-500"],
    [class*="bg-green-500"], [class*="bg-green-600"], [class*="bg-emerald-500"],
    [class*="bg-emerald-600"]) {
    background-color: #111111 !important;
}

.app-shell :is([class*="text-blue-"], [class*="text-indigo-"], [class*="text-violet-"],
    [class*="text-purple-"], [class*="text-pink-"], [class*="text-rose-"],
    [class*="text-red-"], [class*="text-orange-"], [class*="text-amber-"],
    [class*="text-yellow-"], [class*="text-lime-"], [class*="text-green-"],
    [class*="text-emerald-"], [class*="text-teal-"], [class*="text-cyan-"],
    [class*="text-sky-"]) {
    color: var(--mono-ink) !important;
}

.app-shell :is([class*="border-blue-"], [class*="border-indigo-"], [class*="border-violet-"],
    [class*="border-purple-"], [class*="border-pink-"], [class*="border-rose-"],
    [class*="border-red-"], [class*="border-orange-"], [class*="border-amber-"],
    [class*="border-yellow-"], [class*="border-lime-"], [class*="border-green-"],
    [class*="border-emerald-"], [class*="border-teal-"], [class*="border-cyan-"],
    [class*="border-sky-"], [class*="ring-blue-"], [class*="ring-indigo-"],
    [class*="ring-red-"], [class*="ring-amber-"], [class*="ring-emerald-"],
    [class*="ring-rose-"], [class*="border-l-blue-"], [class*="border-l-indigo-"],
    [class*="border-l-red-"], [class*="border-l-amber-"], [class*="border-l-green-"],
    [class*="border-l-emerald-"], [class*="border-l-rose-"]) {
    border-color: var(--mono-line) !important;
    --tw-ring-color: #a3a3a3 !important;
}

/* .app-shell :is([class*="from-"], [class*="to-"]) { background-image: none !important; } */

.app-shell input[type="checkbox"],
.app-shell input[type="radio"] {
    accent-color: #111111;
}

.app-shell input:focus,
.app-shell select:focus,
.app-shell textarea:focus {
    border-color: #111111 !important;
    box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.10) !important;
}

/* ==========================================================================
    AUTHENTICATION UI TOKENS
    ========================================================================== */
.auth-shell {
    --auth-black: #000000;
    --auth-ink: #111111;
    --auth-dark: #333333;
    --auth-muted: #666666;
    --auth-subtle: #999999;
    --auth-line: #d9d9d9;
    --auth-soft: #eeeeee;
    --auth-canvas: #f7f7f7;
    --auth-white: #ffffff;
    background-color: var(--auth-canvas);
    color: var(--auth-ink);
}

.auth-shell .bg-neutral-950 {
    background-color: var(--auth-black) !important;
}

.auth-shell .bg-neutral-100 {
    background-color: var(--auth-canvas) !important;
}

.auth-shell .bg-neutral-200 {
    background-color: var(--auth-soft) !important;
}

.auth-shell .text-neutral-950,
.auth-shell .text-neutral-900 {
    color: var(--auth-ink) !important;
}

.auth-shell .text-neutral-800,
.auth-shell .text-neutral-700 {
    color: var(--auth-dark) !important;
}

.auth-shell .text-neutral-600,
.auth-shell .text-neutral-500 {
    color: var(--auth-muted) !important;
}

.auth-shell .text-neutral-400 {
    color: var(--auth-subtle) !important;
}

.auth-shell .border-neutral-300,
.auth-shell .border-neutral-200 {
    border-color: var(--auth-line) !important;
}

.auth-shell .auth-card {
    border-color: var(--auth-line) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08) !important;
}

.auth-shell input:not([type="checkbox"]),
.auth-shell select,
.auth-shell textarea {
    color: var(--auth-ink) !important;
    background-color: var(--auth-white) !important;
    border-color: var(--auth-line) !important;
}

.auth-shell input:not([type="checkbox"]):hover,
.auth-shell select:hover,
.auth-shell textarea:hover {
    border-color: var(--auth-subtle) !important;
}

.auth-shell input:not([type="checkbox"]):focus,
.auth-shell select:focus,
.auth-shell textarea:focus {
    border-color: var(--auth-ink) !important;
    box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.10) !important;
}

.auth-shell input::placeholder,
.auth-shell textarea::placeholder {
    color: var(--auth-subtle) !important;
}

.auth-shell input[type="checkbox"] {
    accent-color: var(--auth-black);
}

.auth-shell button[type="submit"],
.auth-shell button.bg-neutral-950,
.auth-shell button.bg-neutral-900 {
    background-color: var(--auth-black) !important;
}

.auth-shell button[type="submit"]:hover,
.auth-shell button.bg-neutral-950:hover,
.auth-shell button.bg-neutral-900:hover {
    background-color: var(--auth-dark) !important;
}

@media (max-width: 639px) {
    .auth-shell .auth-card {
        padding: 1.25rem;
        border-radius: 0.75rem;
    }

    .auth-shell form {
        min-width: 0;
    }
}

@media (max-width: 639px) {
    .app-shell .rounded-2xl {
        border-radius: 1rem;
    }

    .app-shell main {
        min-width: 0;
    }

    .app-shell table th,
    .app-shell table td {
        white-space: nowrap;
    }
}

/* Premium Dashboard Design System Overrides (per PDF Guidelines) */
.app-shell {
    --dash-base: #F5F5F5;
    --dash-card: #FFFFFF;
    --dash-elevated: #FAFAFA;
    --dash-border: #E5E7EB;
    --dash-dark: #111111;
}

.app-shell input[type="text"],
.app-shell input[type="number"],
.app-shell input[type="email"],
.app-shell input[type="password"],
.app-shell input[type="date"],
.app-shell select {
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 9999px;
    color: #0f172a;
    font-size: 0.875rem;
    transition: all 0.15s ease-in-out;
}

.app-shell input:focus,
.app-shell select:focus,
.app-shell textarea:focus {
    outline: none;
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.app-shell textarea {
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 1rem;
    color: #0f172a;
    font-size: 0.875rem;
    transition: all 0.15s ease-in-out;
}

/* ==========================================================================
    Full-Page Loader Overlay & Generating Loader
    ========================================================================== */
.page-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background-color: rgba(23, 23, 50, 0.96);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.page-loader-overlay.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-loader-overlay .loader-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    font-family: 'Inter', sans-serif;
    font-size: 1.2em;
    font-weight: 300;
    color: #ffffff;
    border-radius: 50%;
    background-color: transparent;
    user-select: none;
}

.page-loader-overlay .loader {
    position: absolute;
    inset: 0;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background-color: transparent;
    animation: page-loader-rotate 2s linear infinite;
    z-index: 0;
}

.page-loader-overlay .loader-letter {
    display: inline-block;
    opacity: 0.4;
    transform: translateY(0);
    animation: page-loader-letter 2s infinite;
    z-index: 1;
    border-radius: 50ch;
    border: none;
}

@keyframes page-loader-rotate {

    0%,
    100% {
        transform: rotate(90deg);
        box-shadow:
            0 10px 20px 0 #ffffff inset,
            0 20px 30px 0 #f6f6f6 inset,
            0 60px 60px 0 #fefdff inset;
    }

    50% {
        transform: rotate(270deg);
        box-shadow:
            0 10px 20px 0 #ffffff inset,
            0 20px 10px 0 #f7f7f7 inset,
            0 40px 60px 0 #eaeaeb inset;
    }
}

@keyframes page-loader-letter {

    0%,
    100% {
        opacity: 0.4;
        transform: translateY(0);
    }

    20% {
        opacity: 1;
        transform: scale(1.15);
    }

    40% {
        opacity: 0.7;
        transform: translateY(0);
    }
}

.page-loader-overlay .loader-letter:nth-child(1) {
    animation-delay: 0s;
}

.page-loader-overlay .loader-letter:nth-child(2) {
    animation-delay: 0.1s;
}

.page-loader-overlay .loader-letter:nth-child(3) {
    animation-delay: 0.2s;
}

.page-loader-overlay .loader-letter:nth-child(4) {
    animation-delay: 0.3s;
}

.page-loader-overlay .loader-letter:nth-child(5) {
    animation-delay: 0.4s;
}

.page-loader-overlay .loader-letter:nth-child(6) {
    animation-delay: 0.5s;
}

.page-loader-overlay .loader-letter:nth-child(7) {
    animation-delay: 0.6s;
}

.page-loader-overlay .loader-letter:nth-child(8) {
    animation-delay: 0.7s;
}

.page-loader-overlay .loader-letter:nth-child(9) {
    animation-delay: 0.8s;
}

.page-loader-overlay .loader-letter:nth-child(10) {
    animation-delay: 0.9s;
}

@media (prefers-reduced-motion: reduce) {

    .page-loader-overlay .loader,
    .page-loader-overlay .loader-letter {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
    }
}