/* UFit look: the daisyUI "ufit" theme, Nunito, Material Symbols and the app shell (sidebar, topbar, stat cards). */

@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url("../vendor/fonts/nunito/nunito-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url("../vendor/fonts/nunito/nunito-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Nunito";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("../vendor/fonts/nunito/nunito-italic-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Nunito";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("../vendor/fonts/nunito/nunito-italic-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Material Symbols Outlined";
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url("../vendor/fonts/material-symbols/material-symbols-outlined.woff2") format("woff2");
}

[data-theme=ufit] {
    color-scheme: light;
    --color-base-100: #ffffff;
    --color-base-200: #f8fafb;
    --color-base-300: #e8ecef;
    --color-base-content: #252631;
    --color-primary: #4d7cfe;
    --color-primary-content: #ffffff;
    --color-secondary: #fe4d97;
    --color-secondary-content: #ffffff;
    --color-accent: #6dd230;
    --color-accent-content: #1f3d0c;
    --color-neutral: #252631;
    --color-neutral-content: #f8fafb;
    --color-info: #1ab4fe;
    --color-info-content: #ffffff;
    --color-success: #6dd230;
    --color-success-content: #1f3d0c;
    --color-warning: #ffab2b;
    --color-warning-content: #4a2e00;
    --color-error: #fe4d5f;
    --color-error-content: #ffffff;
    --radius-selector: 1rem;
    --radius-field: 0.5rem;
    --radius-box: 0.5rem;
    --size-selector: 0.25rem;
    --size-field: 0.25rem;
    --border: 1px;
    --depth: 0;
    --noise: 0;
}

@layer components {
html { scroll-behavior: smooth; }
body { font-family: "Nunito", ui-sans-serif, system-ui, sans-serif; }
[x-cloak] { display: none !important; }

.material-symbols-outlined {
    font-family: "Material Symbols Outlined";
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    direction: ltr;
    font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---- Shell ----------------------------------------------------------------------------------------------- */
:root { --sidebar-w: 252px; }
html.nav-collapsed { --sidebar-w: 80px; }

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 252px;
    background: #fff;
    border-right: 1px solid #e8ecef;
    display: flex;
    flex-direction: column;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .2s ease-out;
}
.app-sidebar.is-open { transform: translateX(0); }
.app-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(37, 38, 49, .3); }

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: 64px;
    background: rgba(248, 250, 251, .92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid #e8ecef;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #252631;
    position: relative;
    transition: background .15s ease, color .15s ease;
}
.side-link .material-symbols-outlined { color: #778ca2; transition: color .15s ease; }
.side-link:hover { background: #f8fafb; }
.side-link.is-active { background: #f8fafb; color: #4d7cfe; }
.side-link.is-active .material-symbols-outlined { color: #4d7cfe; }
.side-link.is-active::after {
    content: "";
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    border-radius: 2px 0 0 2px;
    background: #4d7cfe;
}
.side-heading { color: #778ca2; font-size: 13px; font-weight: 400; padding: 0 12px; margin-bottom: 6px; }
.side-tooltip { display: none; }

.bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 40;
    background: rgba(255, 255, 255, .8);
    backdrop-filter: blur(14px);
    border: 1px solid #e8ecef;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 22px;
    box-shadow: 0 8px 24px rgba(37, 38, 49, .08);
}
.bottom-nav a, .bottom-nav button { color: #778ca2; display: flex; align-items: center; justify-content: center; }
.bottom-nav .is-active { color: #4d7cfe; }

@media (min-width: 1024px) {
    .app-topbar { padding: 0 32px; }
    .app-sidebar { transform: translateX(0); width: var(--sidebar-w); transition: width .2s ease; }
    .app-main { margin-left: var(--sidebar-w); transition: margin-left .2s ease; }
    .sidebar-backdrop, .bottom-nav { display: none; }

    html.nav-collapsed .side-label,
    html.nav-collapsed .side-heading,
    html.nav-collapsed .sidebar-wordmark { display: none; }
    html.nav-collapsed .side-link { justify-content: center; padding-left: 0; padding-right: 0; }
    html.nav-collapsed .side-link.is-active::after { right: -13px; }
    html.nav-collapsed .sidebar-logo-row { justify-content: center; padding-left: 0; padding-right: 0; }
    html.nav-collapsed .sidebar-toggle-icon { transform: rotate(180deg); }
    html.nav-collapsed .sidebar-scroll { padding-left: 12px; padding-right: 12px; overflow: visible; }
    html.nav-collapsed .side-tooltip {
        display: block;
        position: absolute;
        left: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%);
        background: #252631;
        color: #fff;
        font-size: 12px;
        font-weight: 600;
        padding: 6px 10px;
        border-radius: 6px;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity .12s ease;
        z-index: 60;
    }
    html.nav-collapsed .side-link:hover .side-tooltip { opacity: 1; }
}
.sidebar-toggle-icon { transition: transform .2s ease; }

/* ---- Content pieces from the templates ---------------------------------------------------------------------- */
.section-title { color: #778ca2; font-size: 16px; font-weight: 600; }
.stat-card {
    background: #fff;
    border: 1px solid #e8ecef;
    border-radius: 8px;
    padding: 20px 24px;
    min-height: 103px;
}
.feature-card { background: #fff; border: 1px solid #e8ecef; border-radius: 8px; display: flex; flex-direction: column; }
.feature-card-title {
    color: #778ca2;
    font-size: 14px;
    font-weight: 600;
    padding: 16px 24px;
    border-bottom: 1px solid #e8ecef;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.feature-card-body { padding: 20px 24px; overflow-x: auto; }
.feature-card, .stat-card { min-width: 0; }
.app-content :where(.grid, .flex) > * { min-width: 0; }

/* Unstyled content (guide text, lists in cards) keeps readable defaults under Tailwind's reset. */
:where(.app-content, .print-content) a:where(:not(.btn, .pill-tab, .side-link, .badge)) { color: #4d7cfe; }
:where(.app-content, .print-content) a:where(:not(.btn, .pill-tab, .side-link, .badge)):hover { text-decoration: underline; }
:where(.app-content, .print-content) dt { font-weight: 700; }
:where(.app-content, .print-content) ul:not([class]) { list-style: disc; padding-left: 1.25rem; }
:where(.app-content, .print-content) ol:not([class]) { list-style: decimal; padding-left: 1.25rem; }
.app-content :where(table.table) th { color: #778ca2; font-weight: 600; }
:where(.app-content, .print-content) :where(p, ul, ol, dl, pre) { margin-bottom: 1rem; }
:where(.app-content, .print-content) :where(h2, h3, h4) { margin-bottom: .5rem; }
:where(.app-content, .print-content) :where(dd) { margin-bottom: .5rem; }
:where(.feature-card-body, .stat-card, .alert, td, th, li, label, .dropdown-content, .modal-box) > :where(p, ul, ol, dl):last-child { margin-bottom: 0; }

.pill-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.pill-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; color: #778ca2; transition: background .15s ease, color .15s ease; }
.pill-tab:hover { color: #252631; background: #f2f4f6; }
.pill-tab.is-active { background: #eef2ff; color: #4d7cfe; }

@media print {
    .no-print { display: none !important; }
}
}

/* Overrides of daisyUI components: daisyUI 5 ships them in the utilities layer, so these follow it there.
   Tailwind's own utilities still come later and win. */
@layer utilities {
.checkbox { border-radius: 6px; }
.alert:where(:not(:has(> .material-symbols-outlined))) { display: block; }
.input:focus, .input:focus-within, .select:focus, .select:focus-within, .textarea:focus, .file-input:focus {
    outline: none; border-color: #4d7cfe; box-shadow: 0 0 0 3px rgba(77, 124, 254, .15);
}
}
