/* ═══════════════════════════════════════════════════════════════════════════
   NovaFleet Admin — Custom CSS overrides for django-unfold
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Light-mode text readability ────────────────────────────────────────── */
html:not(.dark) body {
    --color-font-subtle-light: rgb(100, 100, 100);
    --color-font-default-light: rgb(40, 40, 40);
    --color-font-important-light: rgb(10, 10, 10);
    color: rgb(40, 40, 40);
}

html:not(.dark) h1,
html:not(.dark) h2,
html:not(.dark) h3,
html:not(.dark) label,
html:not(.dark) .text-font-important-light {
    color: rgb(10, 10, 10);
    font-weight: 600;
}

html:not(.dark) th {
    color: rgb(30, 30, 30);
    font-weight: 600;
}

html:not(.dark) td,
html:not(.dark) td a {
    color: rgb(40, 40, 40);
}

/* Sidebar text only — scoped to #nav-sidebar to avoid header buttons */
html:not(.dark) #nav-sidebar a,
html:not(.dark) #nav-sidebar span {
    color: rgb(50, 50, 50);
}

html:not(.dark) input,
html:not(.dark) select,
html:not(.dark) textarea {
    color: rgb(20, 20, 20);
}

html:not(.dark) .text-font-subtle-light,
html:not(.dark) p.help {
    color: rgb(100, 100, 100);
}

/* ── Base typography ────────────────────────────────────────────────────── */
html body {
    font-size: 13.5px;
    line-height: 1.4;
}

html body h1 { font-size: 18px; }
html body h2 { font-size: 16px; }
html body h3 { font-size: 14px; }

/* ── Sidebar: navigation links only ─────────────────────────────────────── */
#nav-sidebar-inner > div:not(:first-child):not(:last-child) a,
#nav-sidebar-inner > div:not(:first-child):not(:last-child) span {
    font-size: 12.5px;
}

/* ── Sidebar: increase site header (logo + name) ───────────────────────── */
#nav-sidebar-inner .text-important {
    font-size: 16px !important;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Larger icon in the sidebar brand square */
#nav-sidebar-inner > div:first-child .material-symbols-outlined {
    font-size: 22px;
}

/* ── Sidebar: pin user/account section at bottom, scroll nav in middle ──── */
/* The parent #nav-sidebar is fixed top-0 bottom-0 max-h-screen.
   The <nav> inside has Tailwind min-h-screen which forces overflow.
   Override it so flex layout constrains children to viewport height. */
nav#nav-sidebar-inner {
    min-height: 0 !important; /* override Tailwind min-h-screen */
    height: 100%;
    overflow: hidden;
}

/* App list already has h-0 grow overflow-auto from Unfold;
   ensure user section at bottom never gets pushed off-screen */
nav#nav-sidebar-inner > div:last-child {
    flex-shrink: 0;
}

/* ── Table layout ───────────────────────────────────────────────────────── */
html body #result_list th,
html body #result_list td,
html body .results th,
html body .results td {
    white-space: nowrap;
}

html body #result_list td,
html body .results td {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 420px;
}

html body #result_list td a,
html body .results td a {
    white-space: nowrap;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}