/*
 * UMMIGO partner panel: top bar, sidebar and dashboard (views in resources/views/filament/shell,
 * resources/views/livewire/shell-search.blade.php and resources/views/filament/pages/dashboard.blade.php).
 * Some rules carry !important because older panel styles in AdminPanelProvider use it on the same boxes.
 */
:root {
    --um-bg: #F3F3EF; --um-card: #FFFFFF; --um-bd: #ECECE6; --um-line: #EFEFEA; --um-bd2: #E2E2DB; --um-bd3: #D6D6CF;
    --um-fg: #121212; --um-fg2: #3A3A36; --um-mut: #6B6B66; --um-mut2: #9A9A94; --um-hdr: rgba(243, 243, 239, .86);
    --um-redBg: #FDE8E5; --um-red: #C2372B; --um-lime: #4D7C0F; --um-amber: #B26B00; --um-blue: #2F6BFF; --um-purple: #6D4FD8;
    --um-teal: #0E8F74; --um-coral: #E0561A; --um-shadow: 0 18px 40px rgba(0, 0, 0, .05); --um-ring: transparent;
    --um-pop: 0 24px 60px rgba(0, 0, 0, .14); --um-acid: #A4E635; --um-acid2: #B8F25A;
    --um-ease: cubic-bezier(.2, .8, .2, 1);
}
.dark {
    --um-bg: #0A0A0B; --um-card: #141416; --um-bd: #1F1F22; --um-line: #1C1C1F; --um-bd2: #232326; --um-bd3: #2A2A2D;
    --um-fg: #F2F2EE; --um-fg2: #C9C9C3; --um-mut: #8E8E88; --um-mut2: #5E5E59; --um-hdr: rgba(10, 10, 11, .86);
    --um-redBg: #2A1614; --um-red: #FF8A7E; --um-lime: #A4E635; --um-amber: #F5B547; --um-blue: #6B95FF; --um-purple: #A98BFF;
    --um-teal: #3DD6B5; --um-coral: #F06A26; --um-shadow: 0 1px 0 rgba(255, 255, 255, .02); --um-ring: #A4E635;
    --um-pop: 0 24px 60px rgba(0, 0, 0, .6);
}

@keyframes umFade { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
@keyframes umPulse { 0% { box-shadow: 0 0 0 0 rgba(164, 230, 53, .7) } 100% { box-shadow: 0 0 0 10px rgba(164, 230, 53, 0) } }

html body.fi-body, html.dark body.fi-body { background-color: var(--um-bg) !important; color: var(--um-fg); font-family: 'Satoshi', system-ui, sans-serif !important; font-weight: 500; }
.um-shell, .um-shell * { scrollbar-width: thin; scrollbar-color: var(--um-bd3) transparent; }
.um-shell button { font-family: inherit; }

/* ── Frame ─────────────────────────────────────────────────────────── */
.um-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--um-bg); }
.um-shell .fi-layout.um-body {
    display: flex !important; flex-direction: row-reverse !important; flex: 1 1 auto !important;
    min-height: calc(100vh - 78px) !important; width: 100% !important; overflow-x: clip !important; background: transparent !important;
}
.um-shell.um-bare .fi-layout.um-body { min-height: 100vh !important; }
.um-shell .fi-main-ctn.um-main-ctn {
    flex: 1 1 0% !important; min-width: 0 !important; width: auto !important; max-width: 100% !important; margin: 0 !important;
    padding: 0 !important; display: flex !important; flex-direction: column !important; opacity: 1 !important;
}
.um-shell main.fi-main.um-main {
    flex: 1 1 auto !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; box-sizing: border-box !important;
    padding: 24px 28px 32px !important;
}
.um-shell.um-bare main.fi-main.um-main { padding: 0 !important; }

/* ── Top bar ───────────────────────────────────────────────────────── */
.um-topbar {
    position: sticky; top: 0; z-index: 40; height: 78px; box-sizing: border-box; background: var(--um-hdr);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--um-line);
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 0 24px 0 18px; color: var(--um-fg);
}
.um-top-start { display: flex; align-items: center; gap: 14px; min-width: 0; }
.um-top-search { width: 100%; max-width: 760px; justify-self: center; min-width: 0; display: flex; align-items: center; gap: 10px; }
.um-top-search > .um-search { flex: 1; }
.um-top-end { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.um-round {
    position: relative; width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--um-bd2); background: var(--um-card);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--um-fg); cursor: pointer; transition: background .2s;
}
.um-round:hover { background: var(--um-line); }
.um-bell svg { stroke: var(--um-fg2); }
.um-bell-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #FF6B5E; border: 2px solid var(--um-card); }
.um-logo { display: flex; align-items: center; gap: 10px; color: var(--um-fg) !important; text-decoration: none; }
.um-logo-mark { width: 36px; height: 36px; border-radius: 50%; background: #111; box-shadow: 0 0 0 2px var(--um-ring); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.um-logo-mark span { width: 22px; height: 22px; border-radius: 50%; border: 5px solid #A4E635; box-sizing: border-box; background: #111; }
.um-logo-name { display: flex; align-items: center; gap: 8px; }
.um-logo-name b { font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--um-fg); }
.um-logo-name i { font-style: normal; font-size: 10px; font-weight: 800; background: #A4E635; color: #111; padding: 2px 6px; border-radius: 4px; }
.um-theme { height: 42px; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--um-card); border: 1px solid var(--um-bd2); cursor: pointer; box-sizing: border-box; }
.um-theme span { width: 32px; height: 32px; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: var(--um-mut); transition: all .3s var(--um-ease); }
.um-theme span.on { background: #A4E635; color: #0A0A0B; }
.um-avatar {
    width: 42px; height: 42px; border-radius: 50%; background: var(--um-bd3); border: 2px solid #A4E635; display: flex; align-items: center;
    justify-content: center; font-weight: 900; font-size: 14px; flex-shrink: 0; color: var(--um-fg); overflow: hidden; box-sizing: border-box;
}
.um-avatar img { width: 100%; height: 100%; object-fit: cover; }
.um-topbar .fi-user-menu > button, .um-topbar .fi-dropdown-trigger { display: flex; }

/* ── Search ────────────────────────────────────────────────────────── */
.um-search { position: relative; width: 100%; min-width: 0; }
.um-search-box {
    display: flex; align-items: center; height: 50px; min-width: 0; background: var(--um-card); border: 1px solid var(--um-bd2);
    border-radius: 999px; transition: all .2s; box-sizing: border-box;
}
.um-search-box.focus { border-color: var(--um-lime); box-shadow: 0 0 0 4px rgba(164, 230, 53, .12); }
.um-search-scope { position: relative; height: 100%; flex-shrink: 0; }
.um-search-scope > button {
    height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 16px 0 20px; background: transparent; border: none;
    border-right: 1px solid var(--um-bd2); border-radius: 999px 0 0 999px; font-size: 13px; font-weight: 800; color: var(--um-fg2);
    white-space: nowrap; transition: background .2s; cursor: pointer;
}
.um-search-scope > button:hover { background: var(--um-line); }
.um-search-scope > button svg { color: var(--um-mut2); transition: transform .25s var(--um-ease); }
.um-search-ic { stroke: var(--um-mut); margin-left: 14px; flex-shrink: 0; }
.um-search input[type=search] {
    flex: 1; min-width: 0; height: 100%; background: transparent !important; border: none !important; outline: none !important; box-shadow: none !important;
    color: var(--um-fg); font-family: inherit; font-size: 15px; font-weight: 500; padding: 0 12px; -webkit-appearance: none; appearance: none;
}
.um-search input[type=search]::placeholder { color: var(--um-mut2); }
.um-search input[type=search]::-webkit-search-cancel-button { display: none; }
.um-search-clear { background: var(--um-bd2); border: none; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--um-fg2); margin-right: 8px; cursor: pointer; flex-shrink: 0; }
.um-kbd { display: flex; gap: 4px; margin-right: 12px; }
.um-kbd span { font-size: 11px; font-weight: 800; color: var(--um-mut); border: 1px solid var(--um-bd3); border-radius: 6px; padding: 3px 7px; }
.um-pop { background: var(--um-card); border: 1px solid var(--um-bd3); box-shadow: var(--um-pop); animation: umFade .2s var(--um-ease); color: var(--um-fg); }
.um-pop-title { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--um-mut2); padding: 8px 10px 6px; }
.um-scope-pop { position: absolute; top: 56px; left: 0; z-index: 50; width: 240px; border-radius: 20px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.um-scope-pop button { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border: none; border-radius: 12px; background: transparent; text-align: left; width: 100%; transition: background .2s; cursor: pointer; color: var(--um-mut); }
.um-scope-pop button:hover { background: var(--um-line); }
.um-scope-pop button.on { background: rgba(164, 230, 53, .14); color: var(--um-lime); }
.um-scope-pop button span { flex: 1; font-size: 13.5px; font-weight: 700; color: var(--um-fg); }
.um-scope-pop button small { font-size: 11.5px; font-weight: 700; color: var(--um-mut); }
.um-scope-pop .tick { color: var(--um-lime); }
.um-search-results { position: absolute; top: 56px; left: 0; right: 0; z-index: 50; border-radius: 24px; padding: 10px; max-height: 440px; overflow: auto; animation-duration: .18s; }
.um-search-results a { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; text-decoration: none; color: var(--um-fg); transition: background .2s; box-sizing: border-box; }
.um-search-results a:hover, .um-search-results a.hi { background: var(--um-line); }
.um-search-results .ab { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; flex-shrink: 0; }
.um-search-results .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.um-search-results .tx b { font-size: 14px; font-weight: 700; color: var(--um-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-search-results .tx small { font-size: 12px; color: var(--um-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-search-results .kind { font-size: 11px; font-weight: 800; color: var(--um-mut); border: 1px solid var(--um-bd3); border-radius: 20px; padding: 3px 9px; flex-shrink: 0; }
.um-search-none { padding: 22px; text-align: center; color: var(--um-mut); font-size: 14px; }

/* ── Sidebar ───────────────────────────────────────────────────────── */
.um-sidebar {
    width: 272px; flex-shrink: 0; position: sticky; top: 78px; height: calc(100vh - 78px); box-sizing: border-box; border-right: 1px solid var(--um-line);
    background: var(--um-card); display: flex; flex-direction: column; transition: width .35s var(--um-ease); z-index: 10; color: var(--um-fg);
}
.um-sidebar.collapsed, .um-sidebar.pre-collapsed:not(.open) { width: 76px; }
.um-side-head { padding: 16px 14px 10px; display: flex; flex-direction: column; gap: 10px; }
.um-side-find { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 999px; background: var(--um-bg); border: 1px solid var(--um-bd2); color: var(--um-mut); box-sizing: border-box; cursor: text; }
.um-side-find input { flex: 1; min-width: 0; border: none !important; outline: none !important; box-shadow: none !important; background: transparent !important; color: var(--um-fg); font-family: inherit; font-size: 13px; font-weight: 600; padding: 0; -webkit-appearance: none; appearance: none; }
.um-side-find input::placeholder { color: var(--um-mut2); }
.um-side-find input::-webkit-search-cancel-button { display: none; }
.um-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.um-group { display: flex; flex-direction: column; gap: 2px; padding-top: 14px; }
.um-group.first, .um-sidebar.collapsed .um-group { padding-top: 0; }
.um-group-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 4px; border: none; background: transparent; text-align: left; width: 100%; cursor: pointer; color: var(--um-fg); }
.um-group-head .bar { width: 3px; height: 14px; border-radius: 2px; background: #A4E635; flex-shrink: 0; }
.um-group-head .tx { flex: 1; font-size: 13px; font-weight: 700; color: var(--um-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-group-head svg { color: var(--um-mut2); transition: transform .3s var(--um-ease); flex-shrink: 0; }
.um-group-head svg.shut { transform: rotate(180deg); }
.um-group-rule { height: 1px; background: var(--um-line); margin: 6px 8px; }
.um-group-items { display: flex; flex-direction: column; gap: 2px; }
.um-item {
    display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 10px; border-radius: 14px; background: transparent; color: var(--um-fg) !important;
    text-decoration: none; width: 100%; box-sizing: border-box; transition: background .2s, color .2s; flex-shrink: 0;
}
.um-item:hover { background: var(--um-line); }
.um-item.child { padding-left: 20px; }
.um-item-ic { width: 20px; height: 20px; flex-shrink: 0; color: var(--um-mut); }
.um-item-dot { width: 20px; display: flex; justify-content: center; flex-shrink: 0; }
.um-item-dot span { width: 6px; height: 6px; border-radius: 50%; background: var(--um-mut2); }
.um-item-tx { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-item-badge { font-size: 11px; font-weight: 800; border: 1px solid var(--um-bd3); color: var(--um-fg2); padding: 2px 8px; border-radius: 8px; flex-shrink: 0; }
.um-item.on { background: rgba(164, 230, 53, .14); }
.um-item.on:hover { background: rgba(164, 230, 53, .2); }
.um-item.on .um-item-ic { color: var(--um-lime); }
.um-item.on .um-item-tx { font-weight: 800; }
.um-item.on .um-item-dot span { background: var(--um-lime); }
.um-item.dash { background: #A4E635; color: #111 !important; }
.um-item.dash:hover { background: #B8F25A; }
.um-item.dash .um-item-ic { color: #111; }
.um-item.dash .um-item-tx { font-weight: 800; }
.um-item.dash .um-item-badge { color: #111; border-color: rgba(0, 0, 0, .25); }
.um-sidebar.collapsed .um-item, .um-sidebar.pre-collapsed:not(.open) .um-item { padding: 0; justify-content: center; }
.um-sidebar.collapsed .um-item-tx, .um-sidebar.collapsed .um-item-badge,
.um-sidebar.pre-collapsed:not(.open) .um-item-tx, .um-sidebar.pre-collapsed:not(.open) .um-item-badge,
.um-sidebar.pre-collapsed:not(.open) .um-group-head, .um-sidebar.pre-collapsed:not(.open) .um-side-find,
.um-sidebar.pre-collapsed:not(.open) .um-side-foot { display: none !important; }
.um-nav-none { padding: 20px 8px; text-align: center; font-size: 13px; color: var(--um-mut); }
.um-side-foot { padding: 12px 14px 16px; border-top: 1px solid var(--um-line); }
.um-app {
    width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; border: none; background: #A4E635; color: #111 !important;
    text-decoration: none; box-sizing: border-box; transition: transform .3s var(--um-ease);
}
.um-app:hover { transform: translateY(-2px); }
.um-app span { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.um-app small { font-size: 11.5px; font-weight: 700; }
.um-app b { font-size: 15px; font-weight: 900; }
.um-side-overlay { display: none; }

/* Business / branch switcher at the top of the sidebar */
.um-sidebar .ummigo-sidebar-wrapper { padding: 0 !important; }
.um-sidebar .raycast-trigger {
    padding: 8px !important; border-radius: 18px !important; border: 1px solid var(--um-bd2) !important; background: var(--um-bg) !important;
    box-shadow: none !important; transform: none !important; gap: 10px; transition: border-color .2s !important;
}
.um-sidebar .raycast-trigger:hover { border-color: var(--um-bd3) !important; box-shadow: none !important; }
.um-sidebar .raycast-trigger-avatar {
    width: 38px !important; height: 38px !important; min-width: 38px !important; border-radius: 12px !important; background: #A4E635 !important;
    box-shadow: none !important; font-size: 15px !important; overflow: visible !important;
}
.um-sidebar .raycast-trigger-avatar img { border-radius: 12px !important; }
.um-sidebar .raycast-status-dot { right: -2px !important; bottom: -2px !important; width: 10px !important; height: 10px !important; background: #2BB673 !important; border: 2px solid var(--um-bg) !important; box-shadow: none !important; }
.um-sidebar .raycast-trigger-title { font-size: 13.5px !important; font-weight: 900 !important; color: var(--um-fg) !important; text-transform: uppercase; }
.um-sidebar .raycast-trigger-sub { font-size: 11.5px !important; color: var(--um-lime) !important; }
.um-sidebar .raycast-trigger-sub > span { display: none !important; }
.um-sidebar .raycast-trigger-arrows svg { color: var(--um-mut2) !important; }
.um-sidebar.collapsed .raycast-trigger, .um-sidebar.pre-collapsed:not(.open) .raycast-trigger { justify-content: center !important; }
.um-sidebar.collapsed .raycast-trigger-labels, .um-sidebar.collapsed .raycast-trigger-arrows,
.um-sidebar.pre-collapsed:not(.open) .raycast-trigger-labels, .um-sidebar.pre-collapsed:not(.open) .raycast-trigger-arrows { display: none !important; }

/* ── Phones and tablets: the sidebar becomes a drawer ─────────────── */
@media (max-width: 1023px) {
    .um-topbar { height: 64px; gap: 10px; padding: 0 12px; }
    .um-shell .fi-layout.um-body { min-height: calc(100vh - 64px) !important; flex-direction: column !important; }
    .um-logo-name { display: none; }
    .um-kbd { display: none; }
    .um-top-end { gap: 8px; }
    .um-sidebar, .um-sidebar.collapsed, .um-sidebar.pre-collapsed:not(.open) {
        position: fixed; top: 0; left: -300px; height: 100vh; height: 100dvh; width: 280px; z-index: 60; transition: left .35s var(--um-ease);
        box-shadow: var(--um-pop);
    }
    .um-sidebar.drawer { left: 0; }
    .um-side-overlay { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .45); }
    .um-shell main.fi-main.um-main { padding: 16px 12px 28px !important; }
}
@media (max-width: 640px) {
    .um-search-scope { display: none; }
    .um-search-box { height: 44px; }
    .um-search-results { position: fixed; top: 64px; left: 8px; right: 8px; }
    .um-theme { display: none; }
    .um-round, .um-avatar { width: 38px; height: 38px; }
    .um-logo-mark { width: 32px; height: 32px; }
}

@media print {
    .um-topbar, .um-sidebar, .um-side-overlay { display: none !important; }
    .um-shell main.fi-main.um-main { padding: 0 !important; }
}

/* ── Dashboard ─────────────────────────────────────────────────────── */
.umd { padding: 4px 0 8px; display: flex; flex-direction: column; gap: 20px; max-width: 1640px; width: 100%; box-sizing: border-box; margin: 0 auto; color: var(--um-fg); font-variant-numeric: tabular-nums; }
.umd a { text-decoration: none; }
.umd b { font-weight: 800; }
.umd .b7 { font-weight: 700; }
.umd .b8 { font-weight: 800; }
.umd .r { text-align: right; justify-content: flex-end; }
.umd-mut { color: var(--um-mut); font-weight: 700; }
.umd-mut2 { color: var(--um-mut2); }
.umd-fg2 { color: var(--um-fg2); }
.umd-sub { font-size: 13px; color: var(--um-mut); font-weight: 500; }
.umd-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.umd-hello { display: flex; flex-direction: column; gap: 6px; }
.umd-date { font-size: 13px; color: var(--um-mut); font-weight: 700; }
.umd-title { font-size: 34px; font-weight: 900; letter-spacing: -.03em; margin: 0; line-height: 1.15; color: var(--um-fg); }
.umd-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; position: relative; z-index: 5; }
.umd-pop { position: relative; }
.umd-pill {
    display: flex; align-items: center; gap: 10px; background: var(--um-card); border: 1px solid var(--um-bd2); border-radius: 999px; height: 42px; padding: 0 16px;
    font-size: 13px; font-weight: 800; white-space: nowrap; transition: border-color .2s, background .2s; color: var(--um-fg); cursor: pointer; box-sizing: border-box;
}
.umd-pill:hover { background: var(--um-line); }
.umd-pill.focus, .umd-pill.on { border-color: var(--um-lime); }
.umd-pill > span { display: flex; align-items: center; gap: 8px; }
.umd-pill.soft { background: var(--um-line); border-color: var(--um-bd3); height: auto; padding: 9px 16px; }
.umd-pill[disabled] { opacity: .6; }
.umd-ranges { display: flex; flex-wrap: wrap; background: var(--um-card); border: 1px solid var(--um-bd2); border-radius: 999px; padding: 4px; gap: 2px; }
.umd-ranges button { border: none; border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 800; transition: all .3s var(--um-ease); background: transparent; color: var(--um-fg2); cursor: pointer; }
.umd-ranges button:hover { background: var(--um-line); }
.umd-ranges button.on { background: #A4E635; color: #0A0A0B; }
.umd-menu { position: absolute; top: 50px; right: 0; z-index: 30; min-width: 230px; max-height: 360px; overflow: auto; background: var(--um-card); border: 1px solid var(--um-bd3); border-radius: 20px; box-shadow: var(--um-pop); padding: 8px; display: flex; flex-direction: column; gap: 2px; animation: umFade .2s var(--um-ease); }
.umd-menu-item { text-align: left; height: 40px; padding: 0 12px; border: none; border-radius: 12px; background: transparent; font-size: 13.5px; font-weight: 700; color: var(--um-fg); cursor: pointer; white-space: nowrap; }
.umd-menu-item:hover { background: var(--um-line); }
.umd-menu-item.on { background: rgba(164, 230, 53, .14); color: var(--um-lime); }

.umd-cal { position: absolute; top: 50px; z-index: 30; background: var(--um-card); border: 1px solid var(--um-bd2); border-radius: 24px; box-shadow: var(--um-pop); padding: 18px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; animation: umFade .25s var(--um-ease); }
.umd-cal-ends { display: flex; gap: 10px; }
.umd-cal-ends > div { flex: 1; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--um-bd2); border-radius: 16px; padding: 10px 14px; }
.umd-cal-ends > div.on { border-color: var(--um-lime); }
.umd-cal-ends span { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--um-mut); }
.umd-cal-ends b { font-size: 15px; }
.umd-cal-months { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.umd-cal-month { display: flex; flex-direction: column; gap: 10px; width: 266px; }
.umd-cal-mhead { display: flex; align-items: center; justify-content: space-between; height: 32px; }
.umd-cal-mhead b { font-size: 15px; }
.umd-cal-mhead button { width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--um-bd2); background: transparent; display: flex; align-items: center; justify-content: center; color: var(--um-fg); cursor: pointer; }
.umd-cal-gap { width: 32px; }
.umd-cal-grid { display: grid; grid-template-columns: repeat(7, 38px); row-gap: 2px; }
.umd-cal-wd { height: 28px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--um-mut2); }
.umd-cal-cell { height: 38px; display: flex; align-items: center; justify-content: center; }
.umd-cal-cell.band { background: rgba(164, 230, 53, .16); }
.umd-cal-cell.band.s { border-radius: 999px 0 0 999px; }
.umd-cal-cell.band.e { border-radius: 0 999px 999px 0; }
.umd-cal-cell button { width: 36px; height: 36px; border-radius: 999px; border: none; background: transparent; color: var(--um-fg); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s var(--um-ease); }
.umd-cal-cell button:hover:not([disabled]):not(.edge) { background: var(--um-line); }
.umd-cal-cell button[disabled] { opacity: .3; cursor: default; }
.umd-cal-cell button.today { border: 1.5px solid var(--um-lime); font-weight: 800; }
.umd-cal-cell button.edge { background: #A4E635; color: #0A0A0B; font-weight: 800; }
.umd-cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--um-line); padding-top: 14px; flex-wrap: wrap; }
.umd-cal-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.umd-cal-presets button, .umd-cal-actions button { border: 1px solid var(--um-bd3); background: transparent; border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 800; color: var(--um-fg2); cursor: pointer; }
.umd-cal-presets button:hover { background: var(--um-line); }
.umd-cal-actions { display: flex; align-items: center; gap: 8px; }
.umd-cal-actions span { font-size: 12.5px; color: var(--um-mut); font-weight: 700; }
.umd-cal-actions button { padding: 9px 16px; font-size: 13px; color: var(--um-fg); }
.umd-cal-actions button.go { border: none; background: #A4E635; color: #0A0A0B; padding: 9px 18px; }
.umd-cal-actions button.go:hover { background: #B8F25A; }

.umd-card {
    background: var(--um-card); border: 1px solid var(--um-bd); box-shadow: var(--um-shadow); border-radius: 28px; padding: 22px; display: flex;
    flex-direction: column; gap: 16px; color: var(--um-fg); box-sizing: border-box; min-width: 0; transition: transform .35s var(--um-ease);
}
a.umd-card { color: var(--um-fg) !important; }
a.umd-card:hover { transform: translateY(-3px); }
.umd-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.umd-card-head > div:not(.umd-tabs) { display: flex; flex-direction: column; gap: 4px; }
.umd-h2 { font-size: 17px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.umd-link { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--um-lime) !important; }
.umd-link:hover { opacity: .8; }
.umd-badge { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 20px; }
.umd-badge.red { background: var(--um-redBg); color: var(--um-red); }
.umd-empty { padding: 28px; text-align: center; color: var(--um-mut); font-size: 14px; }
.umd-empty-card { align-items: flex-start; }
.umd-go { background: #A4E635; color: #0A0A0B !important; border-radius: 999px; padding: 10px 18px; font-size: 13px; font-weight: 800; }

.umd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.umd-kpi {
    background: var(--um-card); border: 1px solid var(--um-bd); box-shadow: var(--um-shadow); border-radius: 24px; padding: 18px; display: flex; flex-direction: column;
    gap: 12px; transition: transform .35s var(--um-ease); animation: umFade .5s var(--um-ease) both; color: var(--um-fg); box-sizing: border-box; min-width: 0;
}
.umd-kpi:hover { transform: translateY(-3px); }
.umd-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.umd-kpi-top > span:first-child { font-size: 13px; color: var(--um-mut); font-weight: 700; }
.umd-delta { font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
.umd-delta.up { color: var(--um-lime); background: rgba(164, 230, 53, .1); }
.umd-delta.down { color: var(--um-red); background: rgba(255, 107, 94, .12); }
.umd-kpi-val { font-size: 28px; font-weight: 900; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.umd-spark { width: 100%; height: 28px; display: block; overflow: visible; }
.umd-kpi .umd-sub { font-size: 12.5px; }

.umd-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 20px; }
.umd-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.umd-grid-2fix { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.umd-mini { padding: 20px; gap: 8px; }
.umd-big { font-size: 26px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.umd-note { font-size: 12.5px; font-weight: 700; }
.umd-note.lime { color: var(--um-lime); }
.umd-note.amber { color: #F5B547; }
.umd-grow { flex: 1; gap: 14px; }

.umd-donut-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.umd-donut { width: 150px; height: 150px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.umd-donut > div { width: 104px; height: 104px; border-radius: 50%; background: var(--um-card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.umd-donut b { font-size: 24px; font-weight: 900; }
.umd-donut span { font-size: 11px; color: var(--um-mut); font-weight: 700; }
.umd-donut-list { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; }
.umd-donut-row { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--um-line); }
.umd-donut-row .dot { width: 10px; height: 10px; border-radius: 3px; }
.umd-donut-row .nm { font-size: 14px; font-weight: 700; }
.umd-donut-row .umd-sub { font-size: 12px; }
.umd-donut-row b { font-size: 14px; min-width: 96px; text-align: right; }

.umd-stack { display: flex; height: 12px; border-radius: 8px; overflow: hidden; gap: 3px; }
.umd-table { display: flex; flex-direction: column; }
.umd-tr { display: grid; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--um-line); font-size: 14px; color: var(--um-fg); }
.umd-th { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--um-mut2); padding: 6px 0; border-top: none; }
.umd-cols-type { grid-template-columns: 1.4fr .8fr 1fr .9fr .7fr; }
.umd-cols-type .umd-fg2, .umd-cols-type span:last-child { font-size: 13px; }
.umd-cols-branch { grid-template-columns: 1.6fr 1fr .8fr 1fr .9fr .8fr .8fr; gap: 12px; padding: 12px 0; }
.umd-cols-orders { grid-template-columns: .9fr .7fr 1.4fr 1fr 1.1fr 1fr 1fr 1.1fr; gap: 12px; padding: 12px 0; font-size: 13.5px; }
.umd-th.umd-cols-branch, .umd-th.umd-cols-orders { padding: 8px 0; font-size: 11px; }
.umd-name { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.umd-name .sq { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.umd-stack-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.umd-stack-txt .umd-sub { font-size: 12px; }
.umd-rating, .umd-growth { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.umd-scroll { overflow-x: auto; }
.umd-rowlink { color: var(--um-fg) !important; border-radius: 0; transition: background .2s; }
.umd-rowlink:hover { background: var(--um-line); }
.umd-status { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.umd-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.umd-tabs button { border: 1px solid var(--um-bd3); background: transparent; color: var(--um-fg2); border-radius: 999px; padding: 8px 14px; font-size: 12.5px; font-weight: 800; transition: all .3s var(--um-ease); cursor: pointer; }
.umd-tabs button.on { background: #A4E635; color: #0A0A0B; border-color: #A4E635; }

.umd-list { display: flex; flex-direction: column; }
.umd-unpaid { display: grid; grid-template-columns: minmax(0, 1.6fr) .9fr .9fr auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--um-line); }
.umd-unpaid .who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.umd-unpaid .who b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.umd-unpaid .who .umd-sub { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.umd-unpaid .age { font-size: 12px; font-weight: 800; }
.umd-unpaid .amt { font-size: 14px; font-weight: 900; text-align: right; }
.umd-modal .umd-unpaid { grid-template-columns: minmax(0, 1fr) auto; }
.umd-collect { background: #A4E635; color: #0A0A0B !important; border: none; border-radius: 999px; padding: 8px 14px; font-size: 12px; font-weight: 800; transition: all .25s var(--um-ease); text-align: center; white-space: nowrap; }
.umd-collect:hover { background: #B8F25A; transform: scale(1.04); }
.umd-allclear { padding: 30px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--um-lime); font-weight: 800; }
.umd-more { padding: 12px 0 0; border-top: 1px solid var(--um-line); font-size: 13px; font-weight: 800; color: var(--um-lime) !important; }

.umd-pay { display: flex; flex-direction: column; gap: 7px; }
.umd-pay-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.umd-pay-top > b { font-weight: 700; }
.umd-pay-top > span { color: var(--um-mut); }
.umd-pay-top > span b { color: var(--um-fg); }
.umd-bar { height: 8px; background: var(--um-line); border-radius: 6px; overflow: hidden; }
.umd-bar > div { height: 100%; border-radius: 6px; transition: width .6s var(--um-ease); }
.umd-bar.fat { height: 26px; border-radius: 999px; }
.umd-bar.fat > div { background: #A4E635; border-radius: 999px; }

.umd-legend { display: flex; gap: 16px; font-size: 12.5px; font-weight: 700; color: var(--um-fg2); }
.umd-legend span { display: flex; align-items: center; gap: 6px; }
.umd-legend i.solid { width: 14px; height: 3px; background: #A4E635; border-radius: 2px; }
.umd-legend i.dash { width: 14px; height: 0; border-top: 2px dashed var(--um-mut2); }
.umd-trend { display: grid; grid-template-columns: 52px 1fr; gap: 8px; }
.umd-trend > div:last-child { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.umd-yticks { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--um-mut2); font-weight: 700; text-align: right; height: 240px; }
.umd-trend-svg { width: 100%; height: 240px; display: block; }
.umd-xticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--um-mut2); font-weight: 700; }

.umd-brow { display: grid; grid-template-columns: 130px 1fr 96px; gap: 12px; align-items: center; }
.umd-brow > span { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.umd-brow > b { font-size: 13.5px; text-align: right; }
.umd-item { display: grid; grid-template-columns: 26px 1fr auto auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--um-line); }
.umd-item .rank { font-size: 12px; font-weight: 900; color: var(--um-mut2); }
.umd-item .nm { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.umd-item .nm b { font-size: 14px; font-weight: 700; }
.umd-item .nm .umd-sub { font-size: 12px; }
.umd-item .umd-fg2 { font-size: 12.5px; }
.umd-item .amt { font-size: 14px; min-width: 92px; text-align: right; }

.umd-stock { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.umd-stock-card { flex-direction: row; align-items: center; gap: 14px; color: var(--um-fg) !important; }
.umd-stock-card .ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.umd-stock-card > div:last-child { display: flex; flex-direction: column; gap: 3px; }
.umd-stock-card b { font-size: 22px; font-weight: 900; }
.umd-stock-card .umd-sub { font-size: 12.5px; }

.umd-modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px; color: var(--um-fg); }
.umd-modal-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.umd-modal-box { position: relative; width: 100%; max-width: 560px; max-height: 86vh; overflow: auto; background: var(--um-card); border: 1px solid var(--um-bd2); border-radius: 28px; box-shadow: var(--um-pop); padding: 22px; display: flex; flex-direction: column; gap: 12px; animation: umFade .2s var(--um-ease); }
.umd-modal-box p { margin: 0; }
.umd-modal-foot { display: flex; justify-content: flex-end; padding-top: 6px; }
.umd-x { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--um-bd2); background: transparent; font-size: 20px; line-height: 1; color: var(--um-fg); cursor: pointer; }
.umd-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #111; color: #fff; font-weight: 700; font-size: 14px; padding: 13px 22px; border-radius: 999px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); z-index: 80; white-space: nowrap; }

@media (max-width: 640px) {
    .umd-title { font-size: 26px; }
    .umd-tools { width: 100%; }
    .umd-grid-2fix { grid-template-columns: 1fr; }
    .umd-card { padding: 18px; border-radius: 24px; }
    .umd-unpaid { grid-template-columns: minmax(0, 1fr) auto; }
    .umd-unpaid .age { display: none; }
    .umd-brow { grid-template-columns: 90px 1fr 84px; }
    .umd-trend { grid-template-columns: 44px 1fr; }
    .umd-xticks span:nth-child(even) { visibility: hidden; }
    .umd-cal-grid { grid-template-columns: repeat(7, 1fr); }
    .umd-cal-month { width: 100%; }
}
