/* =====================================================================
   VIBRANT INSURANCE CRM  —  SHARED THEME
   Single source of truth for the colour palette + Soft-UI components.
   Change the 5 variables in :root below to re-skin the ENTIRE CRM.
   Current theme: SKY BLUE
   ===================================================================== */

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

:root {
    --bg-color:     #E8F1FA;   /* Sky-blue background (grey was #F2F5F8) */
    --shadow-light: #FFFFFF;   /* Top-left white highlight */
    --shadow-dark:  #C4D8ED;   /* Bottom-right soft-blue shadow (grey was #D5DFE9) */
    --text-main:    #1A3668;   /* Deep navy text */
    --icon-color:   #0078D4;   /* Vibrant blue accent (icons, primary buttons) */
}

/* ---- To try another theme later, just swap the block above, e.g. ----
   Pastel Peach : --bg-color:#FBEEE6; --shadow-dark:#E7D2C4; --text-main:#6E4636;
   Mint Green   : --bg-color:#E9F5EE; --shadow-dark:#C9E3D4; --text-main:#1E4A38;
   Lavender     : --bg-color:#F0ECFB; --shadow-dark:#D8CEEE; --text-main:#3D2C6B;
   (accent --icon-color can be any brand colour, e.g. #22C55E, #14B8A6, #F97316)
--------------------------------------------------------------------- */

body {
    font-family: 'Jost', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
}

/* A. Protruding Panels (Containers & Wrappers) */
.tata-panel {
    background-color: var(--bg-color);
    border-radius: 20px;
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 2rem;
}

/* Grounded outer workspace wrapper */
.tata-wrapper {
    background-color: var(--bg-color);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 2px 2px 10px rgba(0, 0, 0, 0.04),
                inset -2px -2px 10px rgba(255, 255, 255, 0.5);
}

/* B. Engraved Inputs (Forms, Selects, Textareas) */
.tata-input {
    background-color: var(--bg-color) !important;
    border-radius: 10px;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    border: 1px solid transparent;
    color: var(--text-main);
    padding: 0.75rem 1rem;
    width: 100%;
    outline: none;
    transition: all 0.2s ease;
    font-weight: 500;
}
.tata-input:focus {
    box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
    border: 1px solid rgba(0, 120, 212, 0.2);
}
/* Dropdowns keep the engraved look + accent-coloured chevron */
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='%230078D4' 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 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}
/* Readonly / disabled variant */
.tata-input-readonly {
    background-color: #E8EEF3 !important;
    box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    color: #4A6382;
    pointer-events: none;
}

/* C. Secondary Buttons & Tabs */
.tata-btn {
    background-color: var(--bg-color);
    border-radius: 10px;
    box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
    color: var(--text-main);
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
}
.tata-btn:hover, .tata-tab-active {
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    border: 1px solid transparent;
    color: var(--icon-color);
}

/* Neumorphic navigation tabs (dashboard tiles) */
.tata-tab {
    background-color: var(--bg-color);
    border-radius: 12px;
    box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
    transition: all 0.2s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
}
.tata-tab:hover {
    box-shadow: inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light);
    border: 1px solid transparent;
}

/* D. Primary CTA Button (Accent) */
.tata-btn-primary {
    background-color: var(--icon-color);
    border-radius: 10px;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.12), -4px -4px 10px var(--shadow-light);
    color: #FFFFFF;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tata-btn-primary:hover { transform: translateY(-2px); }

/* D2. THEMED SUGGESTION DROPDOWN (replaces the native <datalist> popup)
   The browser draws a datalist itself — plain white, system font, unstyleable —
   so every type-to-search field in the CRM looked like it belonged to a different
   application. ui_picker.php suppresses the native popup and renders this instead.
   Lives here so the look arrives on every page that already links theme.css. */
.vb-drop {
    position: fixed;
    z-index: 9999;
    display: none;
    background-color: var(--bg-color);
    border-radius: 12px;
    box-shadow: 8px 8px 18px var(--shadow-dark), -8px -8px 18px var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.6);
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
    font-family: 'Jost', sans-serif;
}
.vb-drop.open { display: block; }
.vb-item {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.25;
}
.vb-item:hover, .vb-item.active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    color: var(--icon-color);
}
.vb-item .vb-sub {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.6;
    margin-top: 1px;
}
.vb-empty { padding: 0.7rem 0.75rem; font-size: 0.8rem; opacity: 0.6; font-weight: 500; }
.vb-more  { padding: 0.45rem 0.75rem; font-size: 0.68rem; opacity: 0.55; font-weight: 600; text-align: center; }

/* E. Typography & Icons */
.tata-text  { color: var(--text-main); font-size: 1.05rem; font-weight: 600; }
.tata-icon  { color: var(--icon-color); font-size: 1.3rem; width: 32px; text-align: center; }
.tata-heading { color: var(--text-main); font-size: 1.25rem; font-weight: 600; margin-bottom: 1.25rem; padding-left: 0.5rem; }
label {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-bottom: 0.4rem;
    display: block;
}
.section-title { color: var(--text-main); font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; }
.section-title i { color: var(--icon-color); }
