/* THRS V14.18 — Leave Signature Visual & Dropdown Studio
 * Route-scoped premium finish; no new data, handlers, permissions or reordered
 * sections. Existing requests, balances, calendar and leave types remain intact.
 */
html[data-theme="light"] .thrs-page-leaves {
 --lv18-paper:#fff;--lv18-soft:#f7f9fd;--lv18-soft2:#eff4fa;
 --lv18-ink:#142d47;--lv18-muted:#5e748b;--lv18-border:#dbe5ef;
 --lv18-hair:#e7edf4;--lv18-gold:#b88646;--lv18-gold-text:#95642c;
 --lv18-glow:rgba(191,143,76,.2);
 --lv18-shadow:0 3px 9px rgba(16,43,70,.025),0 13px 29px rgba(16,43,70,.073);
 --lv18-shadow-hover:0 8px 18px rgba(16,43,70,.043),0 22px 42px rgba(16,43,70,.115);
}
html[data-theme="dark"] .thrs-page-leaves {
 --lv18-paper:#15324c;--lv18-soft:#1b3a55;--lv18-soft2:#23435f;
 --lv18-ink:#f0f6ff;--lv18-muted:#c1d3e4;--lv18-border:#3b5b78;
 --lv18-hair:#2c4c66;--lv18-gold:#edc78c;--lv18-gold-text:#f1d49d;
 --lv18-glow:rgba(236,193,121,.17);
 --lv18-shadow:0 5px 11px rgba(1,11,24,.11),0 16px 33px rgba(1,11,24,.25);
 --lv18-shadow-hover:0 8px 16px rgba(1,11,24,.18),0 23px 47px rgba(1,11,24,.33);
}
html[data-theme] .thrs-page-leaves {
 color:var(--lv18-ink) !important;
 font-feature-settings:"tnum" 1,"lnum" 1;
 -webkit-font-smoothing:antialiased;
}
html[data-theme] .thrs-page-leaves>.page-header {
 border:1px solid var(--lv18-border) !important;
 background:radial-gradient(ellipse at 91% -16%,color-mix(in srgb,var(--lv18-gold) 11%,transparent),transparent 55%),
 linear-gradient(139deg,var(--lv18-paper),var(--lv18-soft)) !important;
 border-radius:19px !important;
 box-shadow:var(--lv18-shadow),inset 0 1px 0 rgba(255,255,255,.08) !important;
}
html[data-theme] .thrs-page-leaves>.page-header::after{
 background:linear-gradient(90deg,transparent,#ac7e42 16%,#f1d7a5 49%,#bb8a4b 85%,transparent) !important;
}
html[data-theme] .thrs-page-leaves>.page-header .page-title {
 color:var(--lv18-ink) !important;
 font-weight:920 !important;
 letter-spacing:-.032em !important;
 line-height:1.2 !important;
}
html[data-theme] .thrs-page-leaves>.page-header .thrs-btn {
 border-radius:10px !important;
 font-weight:845 !important;
 font-size:12px !important;
 transition:filter .18s,box-shadow .18s,border-color .18s !important;
}
html[data-theme] .thrs-page-leaves>.page-header .thrs-btn-primary{
 background:linear-gradient(131deg,#1b4d70,#0b2c47) !important;
 border:1px solid #bb965f !important;
 color:#fff !important;
 box-shadow:0 7px 18px rgba(8,42,70,.18) !important;
}
html[data-theme] .thrs-page-leaves>.page-header .thrs-btn-secondary{
 background:var(--lv18-paper) !important;
 border:1px solid var(--lv18-border) !important;
 color:var(--lv18-ink) !important;
 box-shadow:0 3px 9px rgba(9,36,64,.045) !important;
}
html[data-theme] .thrs-page-leaves>.page-header .thrs-btn:hover:not(:disabled){
 filter:brightness(1.05);
 box-shadow:0 8px 20px rgba(9,36,64,.13) !important;
}
/* Original dynamic leave balance cards; preserve the donut and actual totals. */
html[data-theme] .thrs-page-leaves>div:has(>.thrs-card):not(.page-header)>.thrs-card{
 position:relative;
 background:radial-gradient(ellipse at 95% 6%,var(--lv18-glow),transparent 56%),
 linear-gradient(145deg,var(--lv18-paper),var(--lv18-soft)) !important;
 border:1px solid var(--lv18-border) !important;
 border-radius:16px !important;
 box-shadow:var(--lv18-shadow) !important;
 transition:box-shadow .19s,border-color .19s,transform .19s !important;
}
html[data-theme] .thrs-page-leaves>div:has(>.thrs-card):not(.page-header)>.thrs-card::before{
 content:"";position:absolute;inset-block-start:0;inset-inline:0;height:3px;
 background:linear-gradient(90deg,transparent,#b98648 24%,#f1d19f 66%,transparent) !important;
 pointer-events:none;
}
html[data-theme] .thrs-page-leaves>div:has(>.thrs-card):not(.page-header)>.thrs-card:hover{
 border-color:color-mix(in srgb,var(--lv18-gold) 38%,var(--lv18-border)) !important;
 box-shadow:var(--lv18-shadow-hover) !important;
 transform:translateY(-2px) !important;
}
html[data-theme] .thrs-page-leaves>div:has(>.thrs-card)>.thrs-card>div>div>p{
 color:var(--lv18-muted) !important;
 font-size:12px !important;
 font-weight:780 !important;
}
html[data-theme] .thrs-page-leaves>div:has(>.thrs-card)>.thrs-card>div>div>div:last-child{
 color:var(--lv18-ink) !important;
 font-weight:710 !important;
}
html[data-theme] .thrs-page-leaves>div:has(>.thrs-card)>.thrs-card>div>div>div:last-child span{
 color:var(--lv18-muted) !important;
}
html[data-theme] .thrs-page-leaves>div:has(>.thrs-card)>.thrs-card svg path:first-child{
 stroke:var(--lv18-border) !important;
}
html[data-theme] .thrs-page-leaves>div:has(>.thrs-card)>.thrs-card svg {
 filter:drop-shadow(0 4px 9px rgba(11,47,75,.07));
}
/* Existing Requests / Types tabs: no change in their order or location. */
html[data-theme] .thrs-page-leaves>div:has(>button):not(.page-header){
 border-bottom:1px solid var(--lv18-border) !important;
 background:linear-gradient(145deg,var(--lv18-paper),var(--lv18-soft)) !important;
 border-radius:13px !important;
 padding-inline:6px !important;
 box-shadow:0 2px 8px rgba(14,43,72,.025) !important;
}
html[data-theme] .thrs-page-leaves>div:has(>button):not(.page-header)>button{
 border-radius:9px !important;
 font-size:12px !important;
 font-weight:830 !important;
 color:var(--lv18-muted) !important;
 transition:color .17s,background .17s,box-shadow .17s !important;
}
html[data-theme] .thrs-page-leaves>div:has(>button):not(.page-header)>button:hover{
 background:var(--lv18-soft2) !important;
 color:var(--lv18-ink) !important;
}
html[data-theme] .thrs-page-leaves>div:has(>button):not(.page-header)>button[style*="font-weight: 700"]{
 background:linear-gradient(132deg,#194969,#0c2d49) !important;
 color:#fff !important;
 border-bottom:2px solid #efc788 !important;
 box-shadow:0 4px 12px rgba(11,43,70,.16) !important;
}
/* Search and status filter controls */
html[data-theme] .thrs-page-leaves>div:has(>input.form-input):has(>select.form-select){
 background:linear-gradient(145deg,var(--lv18-paper),var(--lv18-soft)) !important;
 border:1px solid var(--lv18-border) !important;
 border-radius:14px !important;
 padding:13px 14px !important;
 box-shadow:var(--lv18-shadow) !important;
}
html[data-theme] .thrs-page-leaves>div:has(>input.form-input):has(>select.form-select) :is(input,select){
 color:var(--lv18-ink) !important;
 -webkit-text-fill-color:var(--lv18-ink) !important;
 border:1px solid var(--lv18-border) !important;
 background:var(--lv18-paper) !important;
 border-radius:10px !important;
 font-size:12px !important;
 font-weight:690 !important;
 box-shadow:inset 0 1px 3px rgba(10,39,67,.03) !important;
}
html[data-theme] .thrs-page-leaves input::placeholder{
 color:var(--lv18-muted) !important;
 -webkit-text-fill-color:var(--lv18-muted) !important;
 opacity:.88 !important;
}
html[data-theme] .thrs-page-leaves :is(input,select,textarea,button):focus-visible{
 outline:2px solid var(--lv18-gold) !important;
 outline-offset:2px !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card{
 border:1px solid var(--lv18-border) !important;
 background:linear-gradient(154deg,var(--lv18-paper),var(--lv18-soft)) !important;
 border-radius:17px !important;
 box-shadow:var(--lv18-shadow) !important;
 min-width:0 !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card>.thrs-card-header{
 background:linear-gradient(139deg,var(--lv18-paper),var(--lv18-soft)) !important;
 border-bottom-color:var(--lv18-border) !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card>.thrs-card-header h3{
 color:var(--lv18-ink) !important;
 font-weight:900 !important;
 letter-spacing:-.012em !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card .modern-table-wrap{
 max-width:100% !important;
 overflow-x:auto !important;
 overscroll-behavior-x:contain;
 scrollbar-width:thin;
 scrollbar-color:var(--lv18-gold) transparent;
 background:var(--lv18-paper) !important;
 border:1px solid var(--lv18-border) !important;
 border-radius:12px !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card .modern-table{
 width:100% !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card .modern-table th{
 background:var(--lv18-soft) !important;
 color:var(--lv18-muted) !important;
 border-bottom:1px solid var(--lv18-border) !important;
 font-size:11px !important;
 font-weight:860 !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card .modern-table td{
 color:var(--lv18-ink) !important;
 border-bottom:1px solid var(--lv18-hair) !important;
 font-size:12px !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card .modern-table tr.zebra td{
 background:color-mix(in srgb,var(--lv18-soft) 65%,var(--lv18-paper)) !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card .modern-table tbody tr:hover td{
 background:color-mix(in srgb,var(--lv18-gold) 6%,var(--lv18-soft)) !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card .modern-table .badge{
 border-radius:999px !important;
 font-size:11px !important;
 font-weight:850 !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card .modern-table .badge-success{
 background:#def7ed !important;color:#087653 !important;
 border:1px solid #bee7d7 !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card .modern-table .badge-warning{
 background:#fff1d7 !important;color:#8c560d !important;
 border:1px solid #eed8a2 !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card .modern-table .badge-danger{
 background:#ffeaef !important;color:#a62d40 !important;
 border:1px solid #f1bdc8 !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card .modern-table button{
 font-size:11px !important;
 font-weight:810 !important;
 border-radius:9px !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card .modern-table .thrs-btn-secondary{
 background:var(--lv18-soft2) !important;
 color:var(--lv18-ink) !important;
 border:1px solid var(--lv18-border) !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card .modern-table .thrs-btn-success{
 background:linear-gradient(135deg,#14a377,#087c61) !important;
 color:#fff !important;
 border:1px solid rgba(7,126,92,.35) !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card .modern-table .thrs-btn-danger{
 background:linear-gradient(135deg,#d74b5d,#ae3043) !important;
 color:#fff !important;
 border:1px solid rgba(153,45,67,.35) !important;
}
/* Leave Types is a real, non-Table component <table>; refine it without
   removing any of its editable columns or approval/carryforward controls. */
html[data-theme] .thrs-page-leaves>.thrs-card table:not(.modern-table){
 background:var(--lv18-paper) !important;
 border:1px solid var(--lv18-border) !important;
 border-radius:12px !important;
 color:var(--lv18-ink) !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card table:not(.modern-table) th{
 color:var(--lv18-muted) !important;
 background:var(--lv18-soft) !important;
 font-size:11px !important;
 font-weight:860 !important;
 border-bottom:1px solid var(--lv18-border) !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card table:not(.modern-table) td{
 color:var(--lv18-ink) !important;
 border-bottom:1px solid var(--lv18-hair) !important;
 font-size:12px !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card table:not(.modern-table) tbody tr:hover td{
 background:color-mix(in srgb,var(--lv18-gold) 6%,var(--lv18-soft)) !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card table:not(.modern-table) code{
 background:var(--lv18-soft2) !important;
 color:var(--lv18-ink) !important;
 border:1px solid var(--lv18-border) !important;
 border-radius:7px !important;
 padding:4px 8px !important;
}
html[data-theme] .thrs-page-leaves>.thrs-card .thrs-btn {
 border-radius:10px !important;
 font-size:11.5px !important;
 font-weight:825 !important;
}
/* Both existing request List and Calendar have original content. */
html[data-theme] .thrs-page-leaves .thrs-hr-calendar {
 border-radius:15px !important;
 box-shadow:none !important;
}
/* Leave portal dialogs — scoped to this route, including wide details. */
html[data-theme="light"] body:has(.thrs-page-leaves) .thrs-modal-overlay{
 --lv18-modal:#fff;--lv18-modal-soft:#f8fbff;--lv18-modal-ink:#132e47;
 --lv18-modal-muted:#60778c;--lv18-modal-border:#dbe5ed;--lv18-modal-gold:#ae7e3d;
}
html[data-theme="dark"] body:has(.thrs-page-leaves) .thrs-modal-overlay{
 --lv18-modal:#19364f;--lv18-modal-soft:#22415b;--lv18-modal-ink:#f1f7ff;
 --lv18-modal-muted:#c5d3e2;--lv18-modal-border:#3e5d79;--lv18-modal-gold:#e8c289;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-overlay{
 backdrop-filter:blur(12px) !important;
 -webkit-backdrop-filter:blur(12px) !important;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-overlay>.thrs-modal-card{
 background:linear-gradient(157deg,var(--lv18-modal),var(--lv18-modal-soft)) !important;
 color:var(--lv18-modal-ink) !important;
 border:1px solid var(--lv18-modal-border) !important;
 border-radius:18px !important;
 box-shadow:0 26px 72px rgba(1,16,34,.34),inset 0 1px 0 rgba(255,255,255,.07) !important;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card>div:first-child{
 background:linear-gradient(136deg,var(--lv18-modal),var(--lv18-modal-soft)) !important;
 border-bottom:1px solid var(--lv18-modal-border) !important;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card>div:first-child h2{
 color:var(--lv18-modal-ink) !important;
 font-weight:900 !important;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card :is(.form-label,form label) {
 color:var(--lv18-modal-muted) !important;
 font-size:12px !important;
 font-weight:820 !important;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card :is(input.form-input,select.form-select,textarea.form-textarea){
 background:var(--lv18-modal-soft) !important;
 color:var(--lv18-modal-ink) !important;
 -webkit-text-fill-color:var(--lv18-modal-ink) !important;
 border:1px solid var(--lv18-modal-border) !important;
 border-radius:10px !important;
 box-shadow:inset 0 1px 3px rgba(1,22,41,.055) !important;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card :is(input.form-input,select.form-select,textarea.form-textarea):focus-visible{
 outline:2px solid var(--lv18-modal-gold) !important;
 outline-offset:2px !important;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card .thrs-btn{
 border-radius:10px !important;
 font-weight:850 !important;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card .thrs-btn-primary{
 color:#fff !important;
 background:linear-gradient(130deg,#1d4b6b,#0a2d49) !important;
 border:1px solid rgba(223,182,117,.48) !important;
 box-shadow:0 6px 15px rgba(6,34,60,.17) !important;
}
html[data-theme="dark"] body:has(.thrs-page-leaves) .thrs-modal-card .thrs-btn-primary{
 color:#17304a !important;
 background:linear-gradient(130deg,#f2d8a9,#deaf73) !important;
 border-color:#cfa46b !important;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card .thrs-btn-secondary{
 color:var(--lv18-modal-ink) !important;
 background:var(--lv18-modal-soft) !important;
 border:1px solid var(--lv18-modal-border) !important;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card .thrs-btn-danger{
 color:#fff !important;
 background:linear-gradient(126deg,#d65462,#b73246) !important;
}
/* Detail dialog: original five summary cards, attachments and workflow notes
   are often hardcoded white. Set readable dark/light local tokens on that one
   dialog, without changing actual values, permission buttons or attachments. */
html[data-theme="dark"] body:has(.thrs-page-leaves) .thrs-modal-card[style*="1120px"]{
 --lv18-detail-surface:#fff;
 --lv18-detail-ink:#102942;
 --lv18-detail-muted:#5e748b;
 --lv18-detail-stroke:#dbe5ee;
 --lv18-detail-accent:#f7eddb;
 --lv18-detail-highlight:#f0f7ff;
}
html[data-theme="light"] body:has(.thrs-page-leaves) .thrs-modal-card[style*="1120px"]{
 --lv18-detail-surface:#fff;
 --lv18-detail-ink:#142d46;
 --lv18-detail-muted:#597188;
 --lv18-detail-stroke:#dce6ef;
 --lv18-detail-accent:#fbf4e9;
 --lv18-detail-highlight:#f5f9fe;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card[style*="1120px"]>div:last-child{
 background:linear-gradient(144deg,var(--lv18-detail-surface),var(--lv18-detail-highlight)) !important;
 color:var(--lv18-detail-ink) !important;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card[style*="1120px"]>div:last-child>div>div:nth-child(2)>div,
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card[style*="1120px"]>div:last-child>div>div:nth-child(3)>div>div{
 border-color:var(--lv18-detail-stroke) !important;
 background:var(--lv18-detail-surface) !important;
 box-shadow:0 4px 15px rgba(13,45,73,.04) !important;
 border-radius:14px !important;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card[style*="1120px"]>div:last-child :is(h3,strong){
 color:var(--lv18-detail-ink) !important;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card[style*="1120px"]>div:last-child :is(span,div)[style*="color: rgb(100, 116, 139)"]{
 color:var(--lv18-detail-muted) !important;
}
html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card[style*="1120px"]>div:last-child button{
 border-radius:9px !important;
 font-weight:820 !important;
}
/* Preserve all five summary cards on desktop; only stack them more readably on
   phones, where the original fixed 5-col and 2-col grids overflow. */
@media(max-width:1100px){
 html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card[style*="1120px"]>div:last-child>div>div:nth-child(2){
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
 }
 html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card[style*="1120px"]>div:last-child>div>div:nth-child(3){
  grid-template-columns:minmax(0,1fr) !important;
 }
}
@media(max-width:640px){
 html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card[style*="1120px"]>div:last-child>div>div:nth-child(2){
  grid-template-columns:minmax(0,1fr) !important;
 }
 html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card[style*="1120px"]>div:last-child>div>div:nth-child(3)>div{
  min-width:0 !important;
 }
 html[data-theme] body:has(.thrs-page-leaves) .thrs-modal-card[style*="1120px"]>div:last-child>div{
  overflow-wrap:anywhere;
 }
 html[data-theme] .thrs-page-leaves>.thrs-card .modern-table{
  min-width:840px !important;
 }
 html[data-theme] .thrs-page-leaves>.thrs-card table:not(.modern-table){
  min-width:630px !important;
 }
 html[data-theme] .thrs-page-leaves>.thrs-card>div:last-child:has(>table:not(.modern-table)){
  overflow-x:auto !important;
  overscroll-behavior-x:contain;
 }
}
@media(prefers-reduced-motion:reduce){
 html[data-theme] .thrs-page-leaves :is(.thrs-card,.thrs-btn){
  animation:none !important;transition:none !important;transform:none !important;
 }
}
