/* =====================================================================
   VIBRANT PAYOUTS  —  SHARED THEME   (build 3: light neumorphic)
   ---------------------------------------------------------------------
   Build 1 was peach Soft-UI. It read as heavy because the background was a
   warm colour AND everything was embossed — colour and depth fighting on
   the same surface.

   Build 3 keeps the neumorphism and takes the colour out of it: a neutral
   light-grey surface, so the soft shading is the only thing you notice.
   That is the half BAC gets right — a quiet #F3F3F9 workspace, cards that
   lift off it, and no decoration anywhere else.

   THE ONE THING NEUMORPHISM GETS WRONG, FIXED
   In a pure soft-UI every button is the same colour as the page with a
   soft edge, so nothing looks pressable — on the legacy-names screen the
   "Not an agent" button was indistinguishable from the row it sat in.
   BAC never does this: every action there is a SOLID FILL with a glow in
   its own colour (indigo to act, red to delete), so you can see what the
   buttons are before you read them. Same rule here — panels and inputs
   stay soft, ACTIONS ARE SOLID, and they are colour-coded by what they do.

   HOW IT OVERRIDES
   Each page has its own <style> block loaded after this file. Most of it
   is driven by the five variables below, so it re-skins for free; only the
   font, the buttons and a few hardcoded peach values need !important.
   Reverting the whole look is reverting this one file.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    /* Surface and page are the SAME colour on purpose — that is what makes
       a soft shadow read as a raised panel instead of a drop shadow. */
    --bg-color:     #ECEFF4;   /* the whole workspace, and every panel on it */
    --shadow-light: #FFFFFF;   /* top-left highlight */
    --shadow-dark:  #C6CCD8;   /* bottom-right shade */
    --text-main:    #2E3746;   /* body text — darkened a shade for definition */
    --icon-color:   #0F766E;   /* Vibrant teal — the ONE accent, kept so staff
                                  can tell this from the CRM at a glance */

    /* supporting values used by this file */
    --text-mute:    #5E6675;
    --line:         #D8DDE5;
    --danger:       #E5484D;
    --danger-soft:  #FDECEC;
    --ok:           #16A34A;
}

/* ---------------------------------------------------------------- base */
body {
    font-family: 'Roboto', -apple-system, 'Segoe UI', sans-serif !important;
    background-color: var(--bg-color) !important;
    color: var(--text-main);
    font-size: 15.5px;
    -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------- panels
   Left to the page styles, which already draw these from the variables.
   Only the corner radius is softened and the padding opened up — BAC's
   whole trick is air, not decoration. */
.card       { border-radius: 14px !important; padding: 1.15rem 1.3rem !important; }
.stat       { border-radius: 14px !important; }
.tata-panel { border-radius: 18px; }

/* ------------------------------------------------------------- tables
   The peach hairlines are hardcoded in every page's <style> block, so
   these have to be forced. Rows get room to breathe the way BAC's do,
   without going to its 15px-per-cell extreme — these screens carry three
   times the columns. */
.tbl th {
    border-bottom: 1px solid var(--line) !important;
    color: var(--text-main) !important;
    font-size: .82rem !important;
    font-weight: 600 !important;
    letter-spacing: .02em;
    opacity: 1 !important;
    padding: .62rem .55rem !important;
}
.tbl td {
    border-bottom: 1px solid #DFE4EB !important;
    padding: .68rem .55rem !important;
    font-size: .95rem !important;
}
.tbl tbody tr:hover td { background: rgba(255,255,255,.55); }
.tbl tbody tr:last-child td { border-bottom: none !important; }

/* -------------------------------------------------------------- forms
   Inputs stay ENGRAVED — that is the good half of neumorphism, and it is
   what tells you a thing is for typing into. */
.tata-input, select.tata-input, textarea.tata-input {
    border-radius: 9px !important;
    padding: .55rem .85rem !important;
    font-weight: 400 !important;
    font-size: .95rem;
    border: 1px solid transparent !important;
    /* NOT !important: a handful of pages set an inline width/max-width on
       purpose (a compact confirm box, an auto-sized select) — those must
       keep winning. Without this default, a plain <select> with long option
       text (e.g. an insurer name) sizes itself to its widest option and
       blows out its grid column, skewing every other filter box in the row. */
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.tata-input:focus, select.tata-input:focus, textarea.tata-input:focus {
    border: 1px solid rgba(15,118,110,.45) !important;
}
.tata-input-readonly {
    background-color: #E4E8EE !important;
    color: var(--text-mute) !important;
}
select.tata-input {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378818F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat; background-position: right .7rem center;
    background-size: .9em; padding-right: 2.1rem !important;
}

/* Labels were UPPERCASE everywhere, which turns a form into shouting.
   BAC uses plain sentence case above the field. */
label, label.fl, .fl {
    color: var(--text-mute) !important;
    font-weight: 500 !important;
    font-size: .83rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    opacity: 1 !important;
    margin-bottom: .3rem !important;
    display: block;
}

/* ================================================================
   ACTIONS — the part that had to stop being neumorphic
   Every one of these is a solid fill on the grey, with a glow in its
   own colour. You can tell a button from a panel across the room, and
   you can tell what KIND of button it is before reading the label.
   ================================================================ */

/* PRIMARY — do the thing */
.tata-btn-primary {
    background-color: var(--icon-color) !important;
    border: 1px solid var(--icon-color) !important;
    border-radius: 9px !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    font-size: .9rem;
    letter-spacing: .01em;
    cursor: pointer;
    box-shadow: 0 2px 3px rgba(15,118,110,.22),
                0 5px 14px -6px rgba(15,118,110,.55) !important;
    transition: background .15s ease, box-shadow .15s ease, transform .1s ease;
}
.tata-btn-primary:hover {
    background-color: #0C625B !important;
    box-shadow: 0 3px 5px rgba(15,118,110,.26),
                0 7px 18px -6px rgba(15,118,110,.6) !important;
    transform: none !important;
}
.tata-btn-primary:active { transform: translateY(1px) !important; }

/* SECONDARY — a real, visible button, not a ghost of the background.
   White fill + hairline border + a small lift: BAC's grey table-tool
   buttons, in this palette. */
.tata-btn, .tata-btn-soft {
    background: #F7F9FB !important;
    border: 1px solid var(--line) !important;
    border-radius: 9px !important;
    color: var(--text-main) !important;
    font-weight: 600 !important;
    font-size: .9rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(58,67,83,.07),
                0 2px 8px -4px rgba(58,67,83,.18) !important;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.tata-btn:hover, .tata-btn-soft:hover {
    background: #FFFFFF !important;
    border-color: #B9C1CD !important;
    color: var(--text-main) !important;
    box-shadow: 0 2px 4px rgba(58,67,83,.1),
                0 4px 12px -4px rgba(58,67,83,.22) !important;
}
.tata-btn-soft:active { transform: translateY(1px); }

/* COLOUR-CODED BY WHAT IT DOES — read off the icon already in the markup,
   so no page has to change. BAC does the same thing with its red Delete
   sitting next to an indigo Payment History. */
.tata-btn-soft:has(.fa-ban),
.tata-btn-soft:has(.fa-trash),
.tata-btn-soft:has(.fa-trash-can),
.tata-btn-soft:has(.fa-xmark) {
    background: var(--danger-soft) !important;
    border-color: #F3B9BB !important;
    color: #B4282D !important;
}
.tata-btn-soft:has(.fa-ban):hover,
.tata-btn-soft:has(.fa-trash):hover,
.tata-btn-soft:has(.fa-trash-can):hover,
.tata-btn-soft:has(.fa-xmark):hover {
    background: var(--danger) !important; border-color: var(--danger) !important; color: #fff !important;
}
.tata-btn-soft:has(.fa-file-excel) {
    background: #EAF6EE !important; border-color: #B4DDC3 !important; color: #14713A !important;
}
.tata-btn-soft:has(.fa-file-excel):hover { background: #16A34A !important; border-color: #16A34A !important; color: #fff !important; }

/* icon-only buttons — square them up so a row of them lines up */
.tata-btn-soft:has(.fa-eye), .tata-btn-soft:has(.fa-rotate-left) { color: var(--text-mute) !important; }
.tata-btn-soft i, .tata-btn-primary i { font-size: .9rem; }

/* dashboard nav tiles stay soft — they are surfaces you enter, not actions */
.tata-tab { border-radius: 14px; padding: 1rem 1.15rem !important; }
.tata-tab:hover { border-color: transparent; }

/* ------------------------------------------------- module switcher row
   The cross-module header links (pay_module_nav()) as boxes instead of
   plain text, matching the tata-tab language but compact enough for a
   header. The current page's box shows pressed in, same as .tab.on. */
.nav-boxes {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.nav-box {
    display: flex; align-items: center; gap: .45rem;
    background: var(--bg-color); border-radius: 10px;
    padding: .55rem .9rem; font-size: .84rem; font-weight: 600;
    color: var(--icon-color); text-decoration: none; white-space: nowrap;
    box-shadow: 4px 4px 9px var(--shadow-dark), -4px -4px 9px var(--shadow-light);
    border: 1px solid rgba(255,255,255,.3); transition: all .15s ease-in-out;
}
.nav-box:hover { box-shadow: inset 3px 3px 7px var(--shadow-dark), inset -3px -3px 7px var(--shadow-light); border-color: transparent; }
.nav-box.on { background: var(--icon-color); color: #fff; box-shadow: inset 3px 3px 7px rgba(0,0,0,.2), inset -2px -2px 5px rgba(255,255,255,.1); }
.nav-box.home { color: var(--text-mute); padding: .55rem .7rem; }

/* ------------------------------------------------- badges and pills
   Solid saturated blocks were out-shouting the money next to them. Same
   colours as a tint with the text in the strong shade — still reads as a
   status instantly, no longer a traffic light. */
.badge {
    font-size: .7rem; font-weight: 600; letter-spacing: .02em;
    text-transform: uppercase; padding: .16rem .45rem;
    border-radius: 5px !important; color: #fff; white-space: nowrap;
}
.badge[style*="#B45309"], .badge[style*="#D97706"] { background: #FBEBD5 !important; color: #96530F !important; }
.badge[style*="#B89A88"], .badge[style*="#9A6B4F"] { background: #E7EBF1 !important; color: #59636F !important; }
.badge[style*="#6B7280"]                           { background: #E7EBF1 !important; color: #59636F !important; }
.badge[style*="#16A34A"]                           { background: #E1F2E7 !important; color: #14713A !important; }
.badge[style*="#0F766E"], .badge[style*="#0E7490"] { background: #DFEEEC !important; color: #0C625B !important; }
.badge[style*="#0EA5E9"]                           { background: #DEEDF8 !important; color: #0B6E9E !important; }
.badge[style*="#6366F1"], .badge[style*="#7C3AED"] { background: #E7E6FC !important; color: #4B44C7 !important; }
.pill, .pill-on, .pill-off { border-radius: 9px !important; }

/* ------------------------------------------------------- typography */
.tata-text     { color: var(--text-main); font-size: .98rem; font-weight: 500; }
.tata-icon     { color: var(--icon-color); font-size: 1.15rem; width: 28px; text-align: center; }
.tata-heading  { color: var(--text-main); font-size: 1.18rem; font-weight: 600; margin-bottom: .8rem; padding-left: 0; }
.section-title { color: var(--text-main); font-size: 1.22rem; font-weight: 600; margin-bottom: 1rem; }
.section-title i, .sechead i { color: var(--icon-color); }
.sechead { font-weight: 500; margin: 1.2rem 0 .55rem; padding-bottom: .35rem; border-bottom: 1px solid var(--line) !important; }
h1 { font-size: 1.5rem !important; font-weight: 600 !important; }
h2 { font-size: 1.22rem !important; font-weight: 600 !important; }

/* ------------------------------------------------ peach left in place
   These hexes are written inline across the pages. Re-pointed here by the
   exact value they were written with; delete a line once its page is
   cleaned up. */
[style*="#F6E0D2"] { background: #E3E8F0 !important; color: var(--text-main) !important; border-radius: 10px; }
[style*="#B89A88"] { background: #E7EBF1 !important; }
[style*="#9A6B4F"] { background: #DDE2EA !important; }
[style*="#E0C4B2"], [style*="#E7D2C4"] { background: var(--line) !important; }
[style*="rgba(180,83,9,.06)"],
[style*="rgba(180,83,9,.07)"],
[style*="rgba(180,83,9,.09)"] { background: rgba(255,247,232,.75) !important; }   /* needs attention */
[style*="rgba(15,118,110,.06)"] { background: rgba(223,238,236,.7) !important; }

/* ------------------------------------------------------------ density
   The copy stays — some of it is load-bearing — but it stops being the
   loudest thing on the page. */
p.text-sm.opacity-70, p.text-xs.opacity-60, p.text-xs.opacity-70 {
    color: var(--text-mute) !important; opacity: 1 !important;
    font-size: .86rem !important; line-height: 1.55;
}
.opacity-50, .opacity-55, .opacity-60 { opacity: 1 !important; color: var(--text-mute) !important; }

.overflow-x-auto::-webkit-scrollbar { height: 9px; }
.overflow-x-auto::-webkit-scrollbar-thumb { background: #C6CCD8; border-radius: 5px; }
.overflow-x-auto::-webkit-scrollbar-track { background: transparent; }
