/*
 * HeroUI look for the Lineone theme: Inter type, HeroUI radii, soft surface shadows,
 * pill buttons, 12px fields with a focus ring, quiet table headers and rounded overlays.
 * Colours come from heroui-palette.css (generated); dark mode keeps the navy surfaces.
 */
:root {
    --hu-accent: #0485f7;
    --hu-accent-hover: #0372d6;
    --hu-accent-soft: rgb(4 133 247 / .12);
    --hu-focus-ring: 0 0 0 2px #fff, 0 0 0 4px rgb(4 133 247 / .55);
    --hu-surface-shadow: 0 2px 4px 0 rgb(0 0 0 / .04), 0 1px 2px 0 rgb(0 0 0 / .06), 0 0 1px 0 rgb(0 0 0 / .06);
    --hu-overlay-shadow: 0 2px 8px 0 rgb(0 0 0 / .06), 0 -6px 12px 0 rgb(0 0 0 / .03), 0 14px 28px 0 rgb(0 0 0 / .08);
    --hu-field-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
    --hu-muted: #71717a;
    --hu-border: #e4e4e7;
}
.dark {
    --hu-focus-ring: 0 0 0 2px #192132, 0 0 0 4px rgb(4 133 247 / .6);
    --hu-surface-shadow: 0 0 0 1px rgb(255 255 255 / .04);
    --hu-overlay-shadow: 0 0 1px 0 rgb(255 255 255 / .3) inset, 0 24px 48px -12px rgb(0 0 0 / .7);
    --hu-field-shadow: none;
    --hu-muted: #a3adc2;
    --hu-border: #384766;
}

/* Type */
html, body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
body { font-feature-settings: 'cv11', 'ss01'; letter-spacing: -.003em; }
h1, h2, h3, h4, h5, h6 { letter-spacing: -.01em; }

/* Surfaces */
.card {
    border-radius: 1.25rem;
    box-shadow: var(--hu-surface-shadow);
}

/* Buttons: HeroUI pill shape with a press scale */
.btn {
    border-radius: 9999px;
    letter-spacing: 0;
    font-weight: 500;
    transition: transform .25s cubic-bezier(.25, .46, .45, .94), background-color .1s ease-out, box-shadow .1s ease-out, color .1s ease-out;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:focus-visible { outline: none; box-shadow: var(--hu-focus-ring); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Form fields: 12px radius, soft shadow, accent focus ring */
.form-input, .form-select, .form-textarea, .form-multiselect {
    border-radius: .75rem;
    box-shadow: var(--hu-field-shadow);
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease-out;
}
.form-input:focus, .form-select:focus, .form-textarea:focus, .form-multiselect:focus {
    border-color: var(--hu-accent) !important;
    box-shadow: 0 0 0 3px rgb(4 133 247 / .18);
}
.form-checkbox, .form-radio { transition: background-color .15s ease, border-color .15s ease; }
.form-checkbox { border-radius: .4rem; }
.form-switch { border-radius: 9999px; }

/* Tables: quiet header row with rounded ends, hover tint */
table thead th { font-size: .72rem; letter-spacing: .04em; }
.card > table thead th:first-child, .card table thead tr:first-child th:first-child { border-start-start-radius: .75rem; border-end-start-radius: .75rem; }
.card table thead tr:first-child th:last-child { border-start-end-radius: .75rem; border-end-end-radius: .75rem; }
.is-hoverable tbody tr { transition: background-color .12s ease; }
.is-hoverable tbody tr:hover { background-color: #f4f4f5; }
.dark .is-hoverable tbody tr:hover { background-color: rgb(255 255 255 / .03); }

/* Dashboard header rows whose dark tint never reached the build */
.dark thead tr[class*="dark:bg-navy-800"] { background-color: #202b40; }

/* Badges and tags */
.badge, .tag { border-radius: 9999px; }

/* Sidebar */
.main-sidebar a.rounded-lg { border-radius: .75rem; }
nav.header { box-shadow: none; }

/* Dropdowns, popovers */
.popper-box, [x-show].absolute.rounded-lg.border, .dropdown-menu { border-radius: .9rem; box-shadow: var(--hu-overlay-shadow); }

/* SweetAlert2 dialogs as HeroUI modals */
.swal2-popup { border-radius: 1.5rem !important; box-shadow: var(--hu-overlay-shadow) !important; font-family: inherit !important; }
.swal2-popup .swal2-actions .btn, .swal2-popup .swal2-styled { border-radius: 9999px !important; }
.swal2-container.swal2-backdrop-show { background: rgb(0 0 0 / .5) !important; backdrop-filter: blur(4px); }
.dark .swal2-popup { background: #26334d !important; color: #e7e9ef !important; }
.dark .swal2-container.swal2-backdrop-show { background: rgb(0 0 0 / .6) !important; }

/* Custom modals used across the app */
.pf-modal-panel { border-radius: 1.5rem !important; box-shadow: var(--hu-overlay-shadow) !important; }
.dark .pf-modal-panel { background: #26334d !important; }
.pf-modal-backdrop { background: rgb(0 0 0 / .5) !important; backdrop-filter: blur(4px); }

/* Pagination */
.pagination a, .pagination span, nav[role="navigation"] a, nav[role="navigation"] span[aria-current] > span { border-radius: .65rem; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgb(24 24 27 / .15) transparent; }
.dark * { scrollbar-color: rgb(250 250 250 / .15) transparent; }

/* Selection */
::selection { background: rgb(4 133 247 / .2); }

/* Sidebar links keep their height; the list scrolls once the branches are open */
.main-sidebar .overflow-y-auto > * { flex-shrink: 0; }
.main-sidebar .overflow-y-auto { padding-bottom: 1rem; }
