/* Quiz Plus Finance — premium UI system, November 2026.
   One shared presentation layer for admin, employee and detail views.
   No structural repositioning of keyboard-aware sheets or app scroll containers. */
:root{
  --premium-metal:#c8d7d0;
  --premium-emerald:#10b778;
  --premium-focus:rgba(35,214,145,.18);
  --premium-ring:rgba(114,151,138,.24);
  --premium-glow:0 20px 54px rgba(0,0,0,.30);
  --radius-xl:24px;
  --radius-lg:20px;
  --radius-md:15px;
}
:root:not([data-theme="light"]){
  --bg:#090e12;--bg-deep:#05080b;--surface:#11181c;--surface-2:#141c21;
  --surface-3:#1a2429;--line:#2a373d;--line-soft:#202b31;
  --text:#f4f7f6;--muted:#a1afb0;--muted-2:#7e9091;
  --ui-bg:#090e12;--ui-surface:#11181c;--ui-surface-raised:#172126;
  --ui-border:#2b383d;--ui-border-strong:#415158;
  --ui-text:#f4f7f6;--ui-muted:#a1afb0;
  --ui-accent:#009c62;--ui-accent-pressed:#007b4c;
  --green:#009c62;--accent:#009c62;--success:#41dda0;
}
:root[data-theme="light"]{
  --bg:#f4f6f5;--bg-deep:#e9efed;--surface:#ffffff;--surface-2:#f7faf9;
  --line:#ccd8d3;--line-soft:#e3eae7;--text:#15201c;
  --muted:#5d7069;--muted-2:#71877f;
  --premium-metal:#354d43;--premium-ring:#d6e5dd;
  --premium-focus:rgba(0,156,98,.13);--premium-glow:0 16px 46px rgba(21,53,41,.10);
  --ui-accent:#078d60;--ui-accent-pressed:#06714d;--accent:#078d60;
}
html,body,#app{font-family:-apple-system,BlinkMacSystemFont,'Inter','Segoe UI',sans-serif;font-feature-settings:'kern';}
.shell{background:radial-gradient(ellipse 115% 320px at 50% -135px,rgba(18,120,84,.14),transparent 76%),var(--bg);}
:root[data-theme="light"] .shell{background:radial-gradient(ellipse 120% 290px at 50% -145px,rgba(22,153,109,.10),transparent 77%),var(--bg)!important;}
/* Header: improved legibility and generous title breathing room */
.top{
  padding:18px 18px 16px;
  background:rgba(9,14,18,.92);
  border-bottom:1px solid rgba(131,163,150,.13);
  box-shadow:0 8px 34px rgba(0,0,0,.11);
  backdrop-filter:blur(22px) saturate(120%);
  -webkit-backdrop-filter:blur(22px) saturate(120%);
}
.title-row{margin-top:17px;align-items:end;min-height:43px;}
.brand{font-style:normal;font-size:19px;font-weight:930;letter-spacing:-.85px;}
.page-title{font-size:clamp(27px,7.9vw,35px);line-height:1.07;letter-spacing:-1.3px;font-weight:870;overflow-wrap:anywhere;}
.period{font-size:10px;letter-spacing:.09em;color:var(--muted);}
.admin{font-size:11px;color:var(--muted);}
main{padding:20px 18px 27px;}
.section-title,.eyebrow{font-size:11px;line-height:1.4;letter-spacing:.11em;font-weight:790;color:var(--premium-metal);}
.section-title{margin:27px 0 12px;}
/* Cards: precise single-pixel strokes and restrained material contrast */
:is(.person,.event,.operation,.report,.pnl,.feed,.bank-transaction,.transaction-overview,.birthday-card,
.task-card,.task-detail-section,.schedule-card,.schedule-detail-section,.leader-next-event-card,
.props-event-card,.props-expense-card,.portal-departments>div,.employee-data,.employee-report){
  border-radius:20px;
  border:1px solid var(--premium-ring);
  background:linear-gradient(166deg,rgba(255,255,255,.042),rgba(255,255,255,0) 40%),var(--surface);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 8px 28px rgba(0,0,0,.13);
}
:is(.person,.event,.task-card,.schedule-card,.bank-transaction,.props-event-card){
  transition:border-color .18s ease,background-color .18s ease,transform .18s ease,box-shadow .18s ease;
}
:is(.person,.event,.task-card,.schedule-card,.bank-transaction,.props-event-card):active{
  transform:scale(.992);
  border-color:rgba(48,194,139,.42);
}
.person{padding:15px 14px;gap:13px;margin-bottom:10px;min-height:78px;}
.avatar{width:46px;height:46px;border-radius:15px;background:linear-gradient(145deg,#1a272b,#11191e);border-color:#33434a;color:#e8f2ee;font-size:13px;box-shadow:inset 0 1px 0 rgba(255,255,255,.07);}
.person-name{font-size:14px;line-height:1.25;font-weight:820;letter-spacing:-.25px;}
.person-meta{font-size:11px;line-height:1.45;margin-top:5px;color:var(--muted);}
.balance b{font-size:13px;letter-spacing:-.15px;font-weight:850;}
.balance span{font-size:10px;color:var(--muted);margin-top:5px;}
.event-title{font-size:15px;line-height:1.25;}
.event-meta,.feed-main span{font-size:11px;color:var(--muted);}
.feed-main b{font-size:14px;line-height:1.3;}
.feed-side{font-size:11px;}
.pnl{padding:17px;min-height:116px;}
.pnl small,.transaction-overview small{font-size:10px;letter-spacing:.08em;color:var(--muted);}
.pnl b{font-size:clamp(18px,4.8vw,23px);letter-spacing:-.65px;white-space:normal;overflow-wrap:anywhere;}
.pnl span{font-size:11px;color:var(--muted);line-height:1.45;}
.hero{padding:16px 1px 11px;}
.hero-value{font-size:clamp(34px,10vw,51px);letter-spacing:-1.7px;line-height:1.03;}
.hero-sub{font-size:12px;color:var(--muted);}
.birthday-card{padding:16px;gap:14px;}
.birthday-main>small{font-size:10px;color:var(--muted);letter-spacing:.08em;}
.birthday-person b{font-size:14px;}
.birthday-person span{font-size:11px;color:var(--muted);}
.birthday-date{border-radius:16px;background:rgba(20,174,117,.09);}
.birthday-date span{font-size:9px;}
/* Form controls: comfortable iPhone hit targets */
:is(.search,.employee-directory-controls select,.field input,.field select,.field textarea,
.portal-team-department-tabs button,.employee-status-tabs button){
  border-color:var(--line);
  border-radius:15px;
}
.search,.employee-directory-controls select{
  width:100%;min-height:54px;padding:13px 15px;
  background:var(--surface);color:var(--text);
  font-size:16px;line-height:1.35;
  border:1px solid var(--line);outline:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
.search{margin:9px 0 11px;}
.employee-directory-controls{display:grid;gap:10px;margin:16px 0 13px;}
.employee-directory-controls .search{margin:0;}
.employee-directory-controls select{appearance:auto;-webkit-appearance:auto;min-width:0;}
:is(.search,.employee-directory-controls select,.field input,.field select,.field textarea):focus-visible{
  border-color:rgba(42,197,140,.74);
  outline:0;box-shadow:0 0 0 3px var(--premium-focus);
}
.field label{font-size:11px;letter-spacing:.105em;font-weight:790;color:var(--muted);}
.field input,.field select,.field textarea{font-size:16px;min-height:52px;background:var(--surface-2);color:var(--text);border-color:var(--line);}
.field textarea{line-height:1.55;}
.employee-status-tabs,.home-tabs,.transaction-filter-tabs,.task-tabs,.ledger-tabs,
.portal-team-workspace-tabs,.units{
  border-radius:17px;
  border:1px solid var(--line);
  background:color-mix(in srgb,var(--surface) 83%,black);
  padding:5px;gap:5px;
}
.employee-status-tabs button,.home-tabs button,.transaction-filter-tabs button,.task-tabs button,
.ledger-tabs button,.portal-team-workspace-tabs button,.unit-btn{
  min-height:42px;border-radius:12px;font-size:12px;font-weight:780;
}
:is(.employee-status-tabs button,.home-tabs button,.transaction-filter-tabs button,.task-tabs button,
.ledger-tabs button,.portal-team-workspace-tabs button,.unit-btn).active{
  color:var(--text);
  background:var(--surface-3);
  box-shadow:inset 0 0 0 1px var(--line),0 4px 13px rgba(0,0,0,.11);
}
.ui-button,.ui-icon-button{border-radius:15px;transition:transform .18s ease,box-shadow .18s ease,background .18s ease,border-color .18s ease;}
.ui-button{min-height:48px;font-size:13px;font-weight:790;}
.ui-button--primary{
  background:linear-gradient(160deg,#10b979 0%,#078d5e 85%);
  border-color:rgba(88,238,171,.42);
  color:white;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 9px 22px rgba(0,127,80,.20);
}
.ui-button--secondary,.ui-icon-button{
  background:linear-gradient(165deg,var(--surface-2),var(--surface));
  border-color:var(--line);color:var(--text);
}
.ui-button:focus-visible,.ui-icon-button:focus-visible,.nav:focus-visible{outline:2px solid #36d99b;outline-offset:2px;}
.section-action{min-height:54px;border-radius:17px;font-size:14px;justify-content:center;}
/* Floating navigation in both admin and employee apps */
.bottom{
  bottom:calc(8px + var(--qpf-safe-bottom));width:min(496px,calc(100% - 20px));
  border:1px solid rgba(122,155,144,.25);border-radius:23px;
  padding:7px 6px;
  background:rgba(17,24,29,.94);
  box-shadow:0 18px 52px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.075);
  backdrop-filter:blur(26px) saturate(115%);-webkit-backdrop-filter:blur(26px) saturate(115%);
}
.nav{border-radius:16px;min-height:55px;font-size:11px;gap:5px;padding:7px 2px;color:#91a1a4;}
.nav.active{background:linear-gradient(165deg,rgba(33,61,54,.68),rgba(18,32,32,.50));color:#eaf9f1;}
.nav .nav-label{font-size:10px;line-height:1.15;font-weight:780;}
.nav.active:after{background:#25cf8d;box-shadow:0 0 12px rgba(37,207,141,.3);}
.fab{
  min-height:54px;border-radius:19px;
  background:linear-gradient(155deg,#13b87b,#018556);
  border-color:rgba(77,222,154,.45);
  box-shadow:0 12px 30px rgba(1,123,77,.31),inset 0 1px 0 rgba(255,255,255,.2);
}
.fab-label{font-size:13px;font-weight:830;}
/* Sheets retain their original fixed keyboard-safe geometry */
.sheet{background:var(--bg);border-color:rgba(120,150,143,.36);border-radius:28px 28px 0 0;box-shadow:0 -25px 65px rgba(0,0,0,.52);}
.sheet-head{padding:20px 20px 16px;background:var(--bg);border-bottom:1px solid var(--line-soft);}
.sheet-title{font-size:26px;line-height:1.1;letter-spacing:-.8px;font-weight:860;}
.sheet-body{padding:18px 20px 24px;}
.form-actions{padding-left:20px;padding-right:20px;background:var(--bg);border-color:var(--line-soft);}
.form-actions .ui-button{min-height:54px;border-radius:16px;font-size:14px;}
.props-reimbursement-toggle{border-radius:16px;border-color:var(--line);background:var(--surface-2);padding:16px;}
.props-reimbursement-toggle small{font-size:12px;color:var(--muted);}
.props-event-name,.props-expenses-toolbar h3{font-size:16px;}
.props-event-card small,.props-event-date,.props-expense-card p{font-size:12px;}
/* Detail page refinement */
:is(.employee-avatar,.portal-avatar){border-color:var(--line);box-shadow:var(--premium-glow);}
:is(.portal-profile-head h2,.employee-name){letter-spacing:-.75px;line-height:1.12;}
.portal-info-row span,.portal-departments span{font-size:11px;color:var(--muted);}
.portal-info-row b,.portal-departments b{font-size:13px;}
.portal-bottom .nav-label{font-size:10px;}
/* Light theme retains premium contrast without dark hard-coded surfaces */
:root[data-theme="light"] :is(.person,.event,.operation,.report,.pnl,.feed,.bank-transaction,.transaction-overview,
.birthday-card,.task-card,.task-detail-section,.schedule-card,.schedule-detail-section,.leader-next-event-card,
.props-event-card,.props-expense-card,.portal-departments>div,.employee-data,.employee-report){
  background:#fff!important;
  color:#15201c!important;
  border-color:#d7e1dc!important;
  box-shadow:0 9px 26px rgba(30,64,49,.065),inset 0 1px 0 #fff!important;
}
:root[data-theme="light"] .top{background:rgba(255,255,255,.96)!important;border-color:#e0e8e3!important;}
:root[data-theme="light"] .brand{color:#16241d;}
:root[data-theme="light"] .bottom{background:rgba(255,255,255,.96)!important;border:1px solid #d2dfd8!important;box-shadow:0 15px 44px rgba(35,73,52,.13)!important;}
:root[data-theme="light"] .nav{color:#6c8177;}
:root[data-theme="light"] .nav.active{color:#076843;background:#e6f6ed;}
:root[data-theme="light"] :is(.search,.employee-directory-controls select,.field input,.field select,.field textarea){background:#fff!important;color:#14221a!important;border-color:#ccd9d1!important;}
:root[data-theme="light"] .sheet,:root[data-theme="light"] .sheet-head,:root[data-theme="light"] .form-actions{background:#fff!important;color:#15201c!important;}
:root[data-theme="light"] .ui-button--primary{color:#fff!important;}
:root[data-theme="light"] .avatar{background:#eef6f0;border-color:#d4e4da;color:#245442;}
:root[data-theme="light"] .birthday-person span,:root[data-theme="light"] .person-meta,:root[data-theme="light"] .balance span{color:#62776b;}
@media(max-width:390px){
 .top{padding:16px 15px 14px;}
 main{padding:17px 14px 25px;}
 .page-title{font-size:28px;}
 .person{padding:13px 11px;gap:10px;}
 .avatar{width:43px;height:43px;flex-basis:43px;}
 .balance b{font-size:12px;}
 .bottom{width:calc(100% - 16px);}
 .nav .nav-label,.portal-bottom .nav-label{font-size:9px;}
 .sheet-head{padding:17px 16px 13px;}
 .sheet-body{padding:16px;}
 .form-actions{padding-left:16px;padding-right:16px;}
}
@media(prefers-reduced-motion:reduce){
 :is(.person,.event,.task-card,.schedule-card,.bank-transaction,.props-event-card,.ui-button,.ui-icon-button){transition:none;}
}
