:root{
    /* LOCKED WIDTH */
    --add-ui-sidebar-w:320px;

    /* Light theme colors (benchmark-like) */
    --add-ui-bg:#f4f6f9;
    --add-ui-bg-soft:#ffffff;
    --add-ui-card:#ffffff;
    --add-ui-border:#e6e9ef;
    --add-ui-text:#1f2a37;
    --add-ui-text-dim:#64748b;
    --add-ui-accent:#3b82f6;

    /* UI tokens */
    --add-ui-radius:14px;
    --add-ui-shadow:0 6px 18px rgba(0,0,0,.06);
}

*{box-sizing:border-box}
html,body{
    height:100%;margin:0;background:var(--add-ui-bg);color:var(--add-ui-text);
    font-family:'Poppins',system-ui,-apple-system,Segoe UI,Roboto,'Helvetica Neue',Arial,'Noto Sans','Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol',sans-serif !important;
    -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
    font-size: 14px;
}

/* ===== Shell ===== */
.add-ui-body{display:flex;min-height:100%}

/* Sidebar (fixed) */
.add-ui-sidebar{
    position:fixed;inset:0 auto 0 0;width:var(--add-ui-sidebar-w);
    background:var(--add-ui-bg-soft);
    border-right:1px solid var(--add-ui-border);
    display:flex;flex-direction:column;
    padding:16px 14px;
    z-index:1000;
}
.add-ui-brand{display:flex;align-items:center;gap:10px;padding:6px 10px 14px;border-bottom:1px solid var(--add-ui-border);margin-bottom:10px}
.add-ui-logo{width:28px;height:28px;border-radius:8px;display:inline-grid;place-items:center;background:var(--add-ui-accent);color:#fff;font-weight:700;box-shadow:var(--add-ui-shadow)}
.add-ui-brand-text{font-weight:600;letter-spacing:.2px}
.add-ui-nav{display:grid;gap:4px;padding:6px 4px;overflow-y:auto;flex:1}
.add-ui-nav-item{
    display:flex;align-items:center;gap:10px;
    padding:10px 12px;
    color:var(--add-ui-text);text-decoration:none;
    border-radius:10px;border:1px solid transparent;
    transition:background-color .15s,border-color .15s;
    font-weight:500;
}
.add-ui-nav-item:hover{background:#f2f6ff;border-color:#dbe7ff}
.add-ui-nav-item.is-active{background:#e8f0ff;border-color:#cfe0ff}
.add-ui-sidebar-footer{padding:8px 10px;color:var(--add-ui-text-dim);font-size:14px}

/* Right shell */
.add-ui-shell{margin-left:var(--add-ui-sidebar-w);min-height:100%;width:calc(100% - var(--add-ui-sidebar-w));display:flex;flex-direction:column}

/* Topbar */
.add-ui-topbar{
    height:60px;display:flex;align-items:center;justify-content:space-between;
    padding:0 20px;border-bottom:1px solid var(--add-ui-border);
    background:var(--add-ui-bg-soft);position:sticky;top:0;z-index:900
}
.add-ui-toplink{color:var(--add-ui-text-dim);text-decoration:none;margin-left:14px;font-weight:500; font-size: 14px; }
.add-ui-toplink:hover{color:#111827}
.add-ui-crumbs{color:var(--add-ui-text-dim);font-size:14px}

/* Content */
.add-ui-content{padding:22px 22px 28px}
.add-ui-container{
    max-width:1200px;      /* keeps things tidy */
    margin:0 auto;
}
.add-ui-page-title{font-size:22px;margin:0 0 14px 0;font-weight:600}

/* Cards */
.add-ui-cards{display:grid;gap:16px;grid-template-columns:repeat(12,1fr)}
.add-ui-card{
    grid-column:span 4;background:var(--add-ui-card);
    border:1px solid var(--add-ui-border);border-radius:12px;box-shadow:var(--add-ui-shadow);padding:16px
}
.add-ui-card h3{font-size:16px;margin:0 0 10px 0;color:#000000;font-weight:500}
.add-ui-num{font-size:26px;font-weight:600}

/* Mobile */
@media (max-width:1024px){
    .add-ui-container{max-width:100%;padding-right:4px;padding-left:4px}
}
@media (max-width:640px){
    .add-ui-topbar{padding-left:14px;padding-right:14px}
    .add-ui-content{padding:16px}
    .add-ui-card{grid-column:span 12}
}

/* ===== Collapsible sidebar (desktop default = expanded 320px) ===== */
.add-ui-toggle{
    margin-right:10px; border:1px solid var(--add-ui-border); background:#fff;
    border-radius:10px; height:36px; width:40px; cursor:pointer; font-size:16px;
}
.add-ui-toggle:hover{ background:#f7f9ff; }

/* Collapsed state */
.add-ui-collapsed .add-ui-sidebar{ width:72px; padding-left:10px; padding-right:10px; }
.add-ui-collapsed .add-ui-shell{ margin-left:72px; width:calc(100% - 72px); }

/* Hide labels when collapsed, keep icons/spacing tidy */
.add-ui-collapsed .add-ui-brand-text,
.add-ui-collapsed .add-ui-sidebar-footer,
.add-ui-collapsed .add-ui-nav-item span { display:none; }
.add-ui-collapsed .add-ui-nav{ padding:8px 2px; }
.add-ui-collapsed .add-ui-nav-item{ justify-content:center; padding:8px; }

/* Auto-collapse on narrow screens */
@media (max-width: 1024px){
    .add-ui-sidebar{ width:72px; }
    .add-ui-shell{ margin-left:72px; width:calc(100% - 72px); }
    .add-ui-brand-text, .add-ui-sidebar-footer, .add-ui-nav-item span{ display:none; }
    .add-ui-nav{ padding:8px 2px; }
    .add-ui-nav-item{ justify-content:center; padding:8px; }
}

/* ===== Tighter nav spacing (desktop) ===== */
.add-ui-nav-item{ padding:8px 10px; min-height:36px; font-weight:500; }
.add-ui-nav{ gap:2px; }

/* Slightly smaller breadcrumbs and card shadows for a cleaner feel */
.add-ui-crumbs{ font-size:13px; }
.add-ui-card{ box-shadow:0 4px 14px rgba(0,0,0,.05); }
/* ====== SIDEBAR REFINEMENT (LOCKED) ====== */

/* Density tokens (adjust here if you want tighter/looser later) */
:root{
    --add-ui-nav-pad-y: 8px;
    --add-ui-nav-pad-x: 12px;
    --add-ui-nav-gap:   4px;
    --add-ui-nav-h:     38px;   /* item height */
    --add-ui-active:    #2563eb; /* active accent (darker than #3b82f6) */
}

/* Container + scroll behavior */
.add-ui-sidebar{
    padding-top: 14px;
    padding-bottom: 12px;
    overflow: hidden;               /* hide scrollbars on the container */
}
.add-ui-nav{
    gap: var(--add-ui-nav-gap);
    padding: 8px 6px;
    overflow-y: auto;               /* scroll only the nav */
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
.add-ui-nav::-webkit-scrollbar{ width: 8px; }
.add-ui-nav::-webkit-scrollbar-thumb{
    background: #dfe6f3;
    border-radius: 8px;
}

/* Items: tighter, with left active rail */
.add-ui-nav-item{
    position: relative;
    min-height: var(--add-ui-nav-h);
    padding: var(--add-ui-nav-pad-y) var(--add-ui-nav-pad-x);
    border-radius: 10px;
    border: 1px solid transparent;
    transition: background-color .15s, border-color .15s;
}
.add-ui-nav-item:hover{
    background: #f3f7ff;
    border-color: #e3edff;
}
.add-ui-nav-item.is-active{
    background: #eef4ff;
    border-color: #d7e6ff;
}
.add-ui-nav-item.is-active::before{
    content: "";
    position: absolute;
    left: -6px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: var(--add-ui-active);
}

/* Labels/Icons alignment slot-ready (even if no icon yet) */
.add-ui-nav-item > .add-ui-icon{
    width: 18px; height: 18px; margin-right: 10px; flex: 0 0 18px;
    display: inline-block; border-radius: 4px; background: #e8eefc;
}
.add-ui-nav-item > span{ line-height: 1.2; }

/* Footer spacing and hairline */
.add-ui-sidebar-footer{
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--add-ui-border);
    font-size: 14px;
}

/* ===== Collapsed state tweaks (unchanged behavior, cleaner look) ===== */
.add-ui-collapsed .add-ui-nav{ padding: 8px 2px; }
.add-ui-collapsed .add-ui-nav-item{
    padding: 8px;
    border-radius: 12px;
}
.add-ui-collapsed .add-ui-nav-item.is-active::before{
    left: 0; top: 10px; bottom: 10px;
}

/* Keep widths locked */
.add-ui-sidebar{ width: var(--add-ui-sidebar-w); }
.add-ui-shell{   margin-left: var(--add-ui-sidebar-w); width: calc(100% - var(--add-ui-sidebar-w)); }
.add-ui-collapsed .add-ui-sidebar{ width: 72px; }
.add-ui-collapsed .add-ui-shell{   margin-left: 72px; width: calc(100% - 72px); }
/* --- COMPLETE any truncated active styles --- */
.add-ui-nav-item.is-active{
    background: #eef4ff;
    position: relative;
}
.add-ui-nav-item.is-active::before{
    content: "";
    position: absolute;
    left: -6px; top: 4px; bottom: 4px;
    width: 3px; border-radius: 3px;
    background: #2563eb;
}
/* === AddPanels UI v1.0 — Sidebar & Nav Spec (LOCKED) === */

/* Sidebar widths (locked) */
.add-ui-sidebar { width: 320px; }
.add-ui-shell   { margin-left: 320px; width: calc(100% - 320px); }

.add-ui-collapsed .add-ui-sidebar { width: 72px; }
.add-ui-collapsed .add-ui-shell   { margin-left: 72px; width: calc(100% - 72px); }

/* Nav density (locked) */
.add-ui-nav { padding: 4px 4px; gap: 1px; }
.add-ui-nav-item{
    font-size: 14px;
    min-height: 30px;        /* <= target height */
    padding: 3px 10px;       /* ~3px top/btm */
    display: flex;
    align-items: center;
    line-height: 1.2;
}
.add-ui-icon{
    width: 16px; height: 16px;
    margin-right: 10px;
    flex: 0 0 16px;
}

/* States */
.add-ui-nav-item:hover{
    background: #f3f7ff;
    border-radius: 8px;
}
.add-ui-nav-item.is-active{
    background: #eef4ff;
    position: relative;
}
.add-ui-nav-item.is-active::before{
    content: "";
    position: absolute;
    left: -6px; top: 4px; bottom: 4px;
    width: 3px; border-radius: 3px;
    background: #2563eb;
}
/* === TEMP DIAG: collapse nav item height (remove after test) === */
.add-ui-nav-item{
    min-height: 0 !important;     /* force zero row height */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 0 !important;    /* text sits flush (ugly, just for test) */
    background: transparent !important;
    border-radius: 0 !important;
    outline: 1px dashed #e5e7eb;  /* visualize true box */
}
.add-ui-nav-item.is-active::before {
    top: 0 !important; bottom: 0 !important;
}
/* === TEMP DIAG: kill inter-item spacing and external margins === */
.add-ui-nav{
    display: flex !important;          /* override any grid/list rules */
    flex-direction: column !important;
    gap: 0 !important;                  /* absolutely no gap */
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}
.add-ui-nav > *{
    margin: 0 !important;               /* kill any margins on children */
}
.add-ui-nav-item{
    margin: 0 !important;               /* no external margin */
    padding-top: 0 !important;          /* keep zero from prev test */
    padding-bottom: 0 !important;
    min-height: 0 !important;
    line-height: 20px !important;       /* 14px font fits nicely */
    border-radius: 0 !important;
    outline: 1px dashed #e5e7eb;        /* visualize rows during test */
}
/* === FINAL: Sidebar nav — 14px, 30px row, 1px gap (LOCKED) === */
.add-ui-nav{
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;           /* compact between items */
    padding: 4px 4px !important;
}
.add-ui-nav > *{ margin: 0 !important; }

.add-ui-nav-item{
    font-size: 14px !important;
    line-height: 20px !important;
    min-height: 30px !important;   /* target height */
    padding: 3px 10px !important;  /* 3px top/btm */
    display: flex !important;
    align-items: center !important;
    border-radius: 8px;            /* restore rounded hover */
    outline: none !important;      /* remove TEMP dashed outline */
}

/* Active rail restored to neat inset */
.add-ui-nav-item.is-active{ background: #eef4ff; position: relative; }
.add-ui-nav-item.is-active::before{
    content:""; position:absolute; left:-6px; top:4px; bottom:4px;
    width:3px; border-radius:3px; background:#2563eb;
}
/* === OVERRIDE: increase nav gap to 10px === */
.add-ui-nav{
    gap: 10px !important;
}
/* === OVERRIDE: add bottom divider to each nav item === */
.add-ui-nav-item{
    border-bottom: 1px solid #e6e9ef !important; /* light grey line */
}

/* Remove the last item's line for a cleaner footer */
.add-ui-nav-item:last-child{
    border-bottom: none !important;
}
/* === OVERRIDE: nav item bottom divider with 5px top space === */
.add-ui-nav-item{
    border-bottom: 1px solid #e6e9ef !important;
    padding-bottom: 5px !important; /* space before the divider */
    margin-bottom: 5px !important;  /* pushes the next item down */
}

/* Remove line from last item */
.add-ui-nav-item:last-child{
    border-bottom: none !important;
    margin-bottom: 0 !important;
}
/* === OVERRIDE: nav item divider offset 5px from content === */
.add-ui-nav-item{
    padding-bottom: 5px !important;            /* space below text */
    border-bottom: 1px solid #e6e9ef !important;
}

.add-ui-nav-item:last-child{
    border-bottom: none !important;
    padding-bottom: 0 !important;             /* no extra gap on last */
}
/* === OVERRIDE: divider 10px below each nav item === */
.add-ui-nav-item{
    position: relative;
    padding-bottom: 0 !important;  /* keep the row compact */
    margin-bottom: 10px !important; /* push space for divider */
}

.add-ui-nav-item::after{
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: -10px;                   /* 10px below content box */
    height: 1px;
    background: #e6e9ef;
}

.add-ui-nav-item:last-child::after{
    display: none; /* no divider on last item */
}
/* === CLEANUP: remove old borders, keep only ::after divider === */
.add-ui-nav-item{
    border-bottom: none !important;   /* kill default border */
}
/* === OVERRIDE: increase divider spacing to 15px === */
.add-ui-nav-item{
    margin-bottom: 15px !important;   /* push divider further down */
}
.add-ui-nav-item::after{
    bottom: -15px !important;         /* align line 15px below item */
}
/* === OVERRIDE: increase top padding of nav to 15px === */
.add-ui-nav{
    padding-top: 15px !important;
}
/* === NAV ICONS (LOCKED) === */
.add-ui-icon{
    display:inline-flex; align-items:center; justify-content:center;
    width:16px; height:16px; margin-right:10px; flex:0 0 16px;
    color:#94a3b8; /* muted slate */
}
.add-ui-icon svg{ width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

.add-ui-nav-item:hover .add-ui-icon{ color:#1f2a37; }         /* darker on hover */
.add-ui-nav-item.is-active .add-ui-icon{ color:#2563eb; }     /* primary when active */

/* collapsed: center icon, no label (already hidden by your rules) */
.add-ui-collapsed .add-ui-icon{ margin-right:0; }
/* === OVERRIDE: Active nav uses text color instead of background === */
.add-ui-nav-item.is-active {
    background: none !important;       /* remove pale blue background */
    border-color: transparent !important; /* remove light blue borders */
}

.add-ui-nav-item.is-active span {
    color: #2563eb !important;   /* blue active label */
    font-weight: 600;            /* semibold for emphasis */
}
/* === Active nav: blue label only, no row highlight === */
.add-ui-nav-item.is-active{
    background: none !important;
    border-color: transparent !important;
}

/* Make ONLY the label (second span) blue; keep icon color unchanged */
.add-ui-nav-item.is-active > span:not(.add-ui-icon){
    color: #2563eb !important;
    font-weight: 600;
}
/* ===== Auth (Login) styles — add-ui-* (LOCKED) ===== */
.add-ui-guest{
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: var(--add-ui-bg);
    padding: 24px;
}
.add-ui-auth-card{
    width: 100%; max-width: 420px;
    background: #fff;
    border: 1px solid var(--add-ui-border);
    border-radius: 14px;
    box-shadow: var(--add-ui-shadow);
    padding: 20px;
}
.add-ui-auth-head{ text-align:center; margin-bottom: 12px; }
.add-ui-auth-logo{
    width: 44px; height: 44px; margin: 0 auto 6px;
    display:grid;place-items:center;border-radius:12px;
    background: var(--add-ui-accent); color:#fff; font-weight:700;
}
.add-ui-auth-title{ margin:0 0 4px 0; font-size: 20px; font-weight:600; color: var(--add-ui-text); }
.add-ui-auth-status{ margin: 6px 0 0; font-size: 13px; color: var(--add-ui-text-dim); }

.add-ui-form{ display: grid; gap: 12px; }
.add-ui-field{ display: grid; gap: 6px; }
.add-ui-label{ font-size: 13px; color: var(--add-ui-text-dim); }

.add-ui-input{
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--add-ui-border);
    border-radius: 10px;
    background: #fff; color: var(--add-ui-text);
    outline: none;
}
.add-ui-input:focus{ border-color: var(--add-ui-accent); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }

.add-ui-error{ color:#dc2626; font-size:12.5px; margin:2px 0 0; }

.add-ui-row{
    display:flex; align-items:center; justify-content:space-between;
    gap: 10px; margin-top: 4px;
}
.add-ui-check{ display:inline-flex; align-items:center; gap:8px; font-size: 13.5px; color: var(--add-ui-text); }
.add-ui-check input{ width:16px; height:16px; }

.add-ui-link{ font-size: 13.5px; text-decoration: none; color: var(--add-ui-accent); }
.add-ui-link:hover{ text-decoration: underline; }

.add-ui-actions{ margin-top: 4px; }
.add-ui-btn{
    display:inline-flex; align-items:center; justify-content:center;
    height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent;
    font-weight: 600; cursor: pointer;
}
.add-ui-btn-primary{ background: var(--add-ui-accent); color:#fff; border-color: var(--add-ui-accent); }
.add-ui-btn-primary:hover{ filter: brightness(0.95); }
/* === Force topbar link size === */
.add-ui-topbar-right .add-ui-toplink {
    font-size: 14px !important;
}

/* === Table header styling === */
.add-ui-table th {
    font-size: 14px;
    color: #0a0a0a;
    font-weight: 600;
    color: var(--add-ui-text-dim);
    padding: 10px 12px;
    border-bottom: 1px solid var(--add-ui-border);
    background: #fafbff;
    text-align: left;
}
/* === Table polish & status badges (LOCKED) === */
.add-ui-table tbody tr:hover { background: #f6f9ff; } /* crisper hover */

.add-ui-badge {
    display:inline-block; padding: 4px 10px; border-radius: 999px;
    font-size: 12px; line-height: 1; border:1px solid var(--add-ui-border);
    background:#fff; color: var(--add-ui-text);
}
.add-ui-badge--ok    { border-color:#c6f6d5; background:#ecfdf5; color:#065f46; } /* green */
.add-ui-badge--warn  { border-color:#fde68a; background:#fffbeb; color:#92400e; } /* amber */
.add-ui-badge--error { border-color:#fecaca; background:#fef2f2; color:#991b1b; } /* red */

.add-ui-emptystate {
    text-align:center; padding:28px 16px; color: var(--add-ui-text-dim);
}


/* === Global button styling (LOCKED) === */
.add-ui-btn {
    font-size: 14px;
    text-decoration: none !important;
}

#userMenuBtn:hover {
    font-weight: 600;
    color: var(--add-ui-accent);
}

.add-ui-toplink {
    color: var(--add-ui-text-dim);
    text-decoration: none;
    margin-left: 14px;
    font-weight: 500;
    font-size: 14px;
}

.add-ui-toplink:hover {
    color: var(--add-ui-accent);
}

/* Active state (current page) */
.add-ui-toplink.is-active {
    color: var(--add-ui-accent, #2563eb) !important;
    font-weight: 700;
}
/* === Topbar links (active + hover) === */
.add-ui-toplink { color: var(--add-ui-text-dim); text-decoration: none; margin-left: 14px; font-weight: 500; font-size: 14px; }
.add-ui-toplink:hover { color: var(--add-ui-accent, #2563eb); }
.add-ui-toplink.is-active { color: var(--add-ui-accent, #2563eb) !important; font-weight: 600; }

/* === User dropdown === */
.add-ui-user { position: relative; display: inline-block; }
.add-ui-userbtn { cursor: pointer; background: none; border: none; padding: 0; font: inherit; color: inherit; }
.add-ui-userbtn:hover { color: var(--add-ui-accent, #2563eb); }
.add-ui-userdd {
    display: none; position: absolute; right: 0; top: calc(100% + 8px);
    background: #fff; border: 1px solid var(--add-ui-border, #e5e7eb);
    border-radius: 10px; min-width: 180px; box-shadow: 0 8px 24px rgba(0,0,0,.08); z-index: 50;
}
.add-ui-userdd a, .add-ui-userdd button {
    display: block; padding: 10px 12px; width: 100%; text-align: left; text-decoration: none;
    border: none; background: none; color: var(--add-ui-text, #111827); font: inherit; cursor: pointer;
}
.add-ui-userdd a:hover, .add-ui-userdd button:hover { background: #f6f9ff; }

/* User dropdown links */
.add-ui-userdd a,
.add-ui-userdd button {
    font-size: 14px;
}

/* =========================
   DARK THEME OVERRIDES (append-only)
   Keeps all existing locked styles intact.
   ========================= */
.theme-dark{
    /* map your existing tokens to dark values */
    --add-ui-bg:        #0b1020;   /* page background */
    --add-ui-bg-soft:   #11172a;   /* topbar / sidebar surfaces */
    --add-ui-card:      #11172a;   /* card surface */
    --add-ui-border:    #1f2a37;   /* hairlines */
    --add-ui-text:      #e5e7eb;   /* primary text */
    --add-ui-text-dim:  #9aa3b2;   /* secondary text */
    --add-ui-accent:    #3b82f6;   /* brand blue (unchanged) */
}

/* page background + base text already use tokens from your :root,
   so they pick up instantly in dark mode */

/* Cards: only color fix (no layout change) */
.theme-dark .add-ui-card h3{
    color: var(--add-ui-text);
}

/* Topbar links */
.theme-dark .add-ui-toplink{
    color: var(--add-ui-text-dim);
}
.theme-dark .add-ui-toplink:hover,
.theme-dark .add-ui-toplink.is-active{
    color: var(--add-ui-accent);
}

/* Sidebar items inherit var(--add-ui-text); keep your active rail intact */
.theme-dark .add-ui-nav-item{ color: var(--add-ui-text); }

/* Tables */
.theme-dark .add-ui-table{ color: var(--add-ui-text); }
.theme-dark .add-ui-table th{
    background: #0f172a;
    border-color: var(--add-ui-border);
    color: var(--add-ui-text-dim);
}
.theme-dark .add-ui-table td{ border-color: var(--add-ui-border); }
.theme-dark .add-ui-table tbody tr:hover{ background:#10182d; }

/* Inputs */
.theme-dark .add-ui-input{
    background:#0f172a;
    color:var(--add-ui-text);
    border-color: var(--add-ui-border);
}
.theme-dark .add-ui-input:focus{
    border-color: var(--add-ui-accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,.25);
}

/* Dropdown menu (Account ▾) */
.theme-dark .add-ui-userdd{
    background:#0f172a;
    border-color: var(--add-ui-border);
}
.theme-dark .add-ui-userdd a,
.theme-dark .add-ui-userdd button{
    color: var(--add-ui-text);
}
.theme-dark .add-ui-userdd a:hover,
.theme-dark .add-ui-userdd button:hover{
    background:#0b1324;
}
/* === Dark theme border refinements === */
.theme-dark{
    --add-ui-border:#1b2230; /* softer border for dark mode */
}

/* Sidebar + nav borders in dark */
.theme-dark .add-ui-sidebar {
    border-color: var(--add-ui-border);
}

.theme-dark .add-ui-nav-item {
    border-bottom: 1px solid #151a24 !important;
}

.theme-dark .add-ui-nav-item:last-child {
    border-bottom: none !important;
}

/* --- Dark sidebar hover (subtle) --- */
.theme-dark .add-ui-nav-item:hover{
    background:#10182d;                /* subtle hover */
    border-color: var(--add-ui-border); /* match dark divider */
}

/* --- Ensure card titles always respect theme token --- */
.add-ui-card h3{ color: var(--add-ui-text); } /* safe for both themes */

/* (Optional) reduce card shadow in dark to avoid glow */
.theme-dark .add-ui-card{ box-shadow: 0 4px 12px rgba(0,0,0,.30); }

/* === TABLE CELL PADDING OVERRIDE === */
.add-ui-table th,
.add-ui-table td {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    line-height: 1.3;  /* keeps text readable */
}

/* === TABLE ROW HEIGHT CONTROL === */
.add-ui-table tr {
    line-height: 1.25 !important;   /* tighter vertical spacing */
    height: 44px !important;        /* target row height */
}



/* =========================================================
   REMINDER: Dark theme nav-item divider brightness
   ---------------------------------------------------------
   Current divider color in dark mode is set via:
     .theme-dark .add-ui-nav-item { border-bottom: 1px solid #151a24 !important; }
   If it still looks too bright on your display or on lighter
   palettes, consider trying slightly darker values:
     #0f1520   (very subtle)
     #121a26   (subtle)
     #1a2230   (soft)
   or align it to the page bg with small alpha:
     rgba(255,255,255,0.03)

   Keep sidebar structure border readable:
     .theme-dark .add-ui-sidebar { border-color: var(--add-ui-border); }
   And leave active rail (#2563eb) unchanged.
   ========================================================= */
