/* GDS CAPITAL INC. · Liquid glass layer.
   Loaded after style.css. It restyles surfaces (colour, glass, borders, shadows, motion) only;
   layout and responsive rules stay in style.css. Brand: GDS red for actions, gold for surfaces,
   black for navigation, white/ivory for reading areas. */

:root {
  --ink: #1d1a14;
  --ink-soft: #5a4e34;          /* 7.6:1 on the lightest gold, 6.1:1 on the deepest box tint */
  --gold-100: #fff8e4;
  --gold-200: #f7e6b4;
  --gold-300: #ebcf86;
  --gold-400: #d9b85c;
  --gold-500: #c29a3e;
  --gold-700: #7c5d18;
  --red-500: #c4283a;
  --red-600: #a91e2d;
  --red-700: #8c1622;

  --glass-gold: linear-gradient(135deg, rgb(255 250 233 / .86) 0%, rgb(246 226 168 / .62) 48%, rgb(255 246 218 / .80) 100%);
  --glass-gold-strong: linear-gradient(135deg, rgb(255 244 210 / .95) 0%, rgb(235 204 125 / .78) 55%, rgb(250 232 178 / .92) 100%);
  --glass-white: linear-gradient(180deg, rgb(255 255 255 / .82), rgb(255 253 247 / .70));
  --glass-edge: rgb(201 160 70 / .42);
  --glass-edge-strong: rgb(194 154 62 / .70);
  --glass-highlight: inset 0 1px 0 rgb(255 255 255 / .9), inset 0 -1px 0 rgb(194 154 62 / .18);
  --glass-shadow: 0 1px 2px rgb(60 40 5 / .06), 0 10px 30px -8px rgb(90 62 12 / .18);
  --glass-shadow-hover: 0 2px 4px rgb(60 40 5 / .08), 0 18px 42px -10px rgb(120 84 16 / .30);
  --blur: blur(18px) saturate(160%);
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  --brand: var(--red-600);
  --accent: var(--gold-400);
  --gold: var(--gold-400);
  --line: rgb(194 154 62 / .22);
  --muted: var(--ink-soft);
  color: var(--ink);
}

/* A warm, softly lit ground for the glass to sit on. */
body,
.employee-shell {
  background:
    radial-gradient(1100px 620px at 8% -8%, rgb(235 207 134 / .42), transparent 62%),
    radial-gradient(900px 520px at 102% 4%, rgb(196 40 58 / .07), transparent 60%),
    radial-gradient(1000px 700px at 50% 112%, rgb(217 184 92 / .22), transparent 60%),
    linear-gradient(180deg, #fbf8f0 0%, #f4eee2 100%);
  background-attachment: fixed;
  color: var(--ink);
}

/* ---------- Gold liquid-glass boxes ---------- */
.card,
.profile-box,
.employee-nav-cards button,
.live-counts button,
.employee-welcome,
.clock-panel,
.login-art {
  position: relative;
  background: var(--glass-gold);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  box-shadow: var(--glass-highlight), var(--glass-shadow);
  color: var(--ink);
  isolation: isolate;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
/* The liquid sheen: a soft specular band across the top of every box. */
.card::before,
.profile-box::before,
.employee-nav-cards button::before,
.live-counts button::before,
.employee-welcome::before,
.clock-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgb(255 255 255 / .70) 0%, rgb(255 255 255 / .18) 28%, transparent 46%);
  pointer-events: none;
  z-index: -1;
}
.card:hover,
.profile-box:hover,
.employee-nav-cards button:hover,
.live-counts button:hover {
  transform: translateY(-2px);
  border-color: var(--glass-edge-strong);
  box-shadow: var(--glass-highlight), var(--glass-shadow-hover);
  background: var(--glass-gold);
}
.card.featured,
.employee-nav-cards button.active,
.live-counts .active {
  background: var(--glass-gold-strong);
  border-color: var(--glass-edge-strong);
  color: var(--ink);
  box-shadow: var(--glass-highlight), inset 0 -3px 0 var(--red-600), var(--glass-shadow);
}
.card-value { color: var(--ink); letter-spacing: -.02em; }
.card-label, .card-foot { color: var(--ink-soft); }
.live-counts strong { color: var(--red-700); }

/* ---------- Reading surfaces: frosted white glass with a gold edge ---------- */
.panel,
.profile-group,
.profile-header {
  background: var(--glass-white);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--glass-highlight), var(--glass-shadow);
  overflow: hidden;
}
.panel { position: relative; }
.panel::after {          /* thin gold light along the top edge */
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-400) 30%, var(--gold-300) 70%, transparent);
  opacity: .75;
  pointer-events: none;
}
.panel-head { border-bottom-color: var(--line); }
.panel-head h2 { letter-spacing: -.01em; }
.panel-foot { background: rgb(255 248 228 / .55); border-top-color: var(--line); color: var(--ink-soft); }

/* ---------- Navigation: black glass ---------- */
.sidebar {
  background:
    radial-gradient(400px 260px at 0% 0%, rgb(217 184 92 / .16), transparent 70%),
    linear-gradient(180deg, #161616 0%, #0e0e0e 100%);
  border-right: 1px solid rgb(217 184 92 / .28);
  box-shadow: inset -1px 0 0 rgb(255 255 255 / .04);
}
.nav button { border-radius: 10px; transition: background .2s var(--ease), color .2s var(--ease); }
.nav button:hover { background: rgb(255 255 255 / .07); color: #fff; }
.nav button.active,
.nav button.active:hover {
  background: linear-gradient(135deg, #f7e2a6 0%, #d9b85c 55%, #c29a3e 100%);
  color: #17130a;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .55), 0 6px 18px -6px rgb(217 184 92 / .55), inset 3px 0 0 var(--red-600);
}
.nav-label { color: rgb(235 207 134 / .75); letter-spacing: .14em; }
.sidebar-bottom { color: rgb(255 255 255 / .72); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(255 252 244 / .72);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.avatar {
  background: linear-gradient(135deg, #f7e2a6, #c29a3e) !important;
  color: #17130a !important;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), 0 2px 8px rgb(120 84 16 / .25);
}

.employee-top {
  background: linear-gradient(180deg, rgb(22 22 22 / .92), rgb(14 14 14 / .88));
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid rgb(217 184 92 / .55);
  box-shadow: 0 8px 30px -12px rgb(0 0 0 / .45);
}

/* ---------- Controls ---------- */
button {
  border-radius: 10px;
  border-color: var(--glass-edge);
  background: rgb(255 255 255 / .72);
  color: var(--red-600);
  transition: background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
button:hover { background: rgb(255 248 228 / .95); border-color: var(--glass-edge-strong); }
button.primary {
  background: linear-gradient(180deg, var(--red-500) 0%, var(--red-600) 60%, var(--red-700) 100%);
  border-color: var(--red-700);
  color: #fff;                                  /* 5.9:1 at the lightest stop */
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .28), 0 6px 16px -6px rgb(169 30 45 / .6);
}
button.primary:hover { background: linear-gradient(180deg, var(--red-600), var(--red-700)); transform: translateY(-1px); }
button.danger { color: var(--red-700); }
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.photo-upload:focus-within {
  outline: 3px solid rgb(217 184 92 / .75);
  outline-offset: 2px;
}

input, select, textarea {
  border-radius: 10px;
  border-color: rgb(194 154 62 / .35);
  background: rgb(255 255 255 / .85);
  box-shadow: inset 0 1px 2px rgb(60 40 5 / .06);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input:focus, select:focus, textarea:focus { border-color: var(--gold-500); box-shadow: 0 0 0 4px rgb(217 184 92 / .22); }

.tabs button { border-radius: 999px; }
.tabs .active {
  background: linear-gradient(135deg, #fff1c8, #ebcf86);
  border-color: var(--glass-edge-strong);
  color: var(--ink);
}

/* ---------- Tables ---------- */
th {
  background: linear-gradient(180deg, rgb(255 246 218 / .96), rgb(247 230 180 / .92));
  color: var(--gold-700);
  border-bottom: 1px solid var(--line);
}
td { border-bottom-color: rgb(194 154 62 / .14); }
tbody tr { transition: background .15s var(--ease); }
tbody tr:hover { background: rgb(255 248 228 / .6); }

/* ---------- Badges, notices, dialogs ---------- */
.badge {
  background: linear-gradient(135deg, #fff4d2, #f1d993);
  color: #5d4510;                               /* 7.4:1 */
  border: 1px solid rgb(194 154 62 / .35);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .7);
}
.notice {
  background: linear-gradient(135deg, rgb(255 251 238 / .9), rgb(250 236 196 / .75));
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-sm);
  color: #5d4510;
}
dialog {
  background: linear-gradient(180deg, rgb(255 255 255 / .94), rgb(255 251 240 / .92));
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  border-radius: 22px;
  box-shadow: var(--glass-highlight), 0 30px 90px -20px rgb(40 26 4 / .45);
}
dialog::backdrop { background: rgb(20 16 8 / .45); backdrop-filter: blur(6px); }

/* ---------- Profile and portal touches ---------- */
.employee-photo { border-color: var(--gold-400); box-shadow: 0 6px 18px -6px rgb(120 84 16 / .45); }
.photo-upload { background: rgb(255 255 255 / .8); border-color: var(--glass-edge); border-radius: 999px; }
.profile-group-icon { color: var(--gold-700); }

.login-story {
  background:
    radial-gradient(520px 340px at 10% 0%, rgb(217 184 92 / .22), transparent 70%),
    linear-gradient(180deg, #161616, #0b0b0b);
}
.login-art { background: linear-gradient(135deg, rgb(64 30 34 / .85), rgb(40 22 14 / .85)); border-color: rgb(217 184 92 / .55); color: #fff; }

/* ---------- Accessibility & fallbacks ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .profile-box, .employee-nav-cards button, .live-counts button, .employee-welcome, .clock-panel { background: linear-gradient(135deg, #fff8e4, #f3dfa5); }
  .panel, .profile-group, .profile-header, dialog { background: #fffdf7; }
  .topbar { background: #fffcf4; }
}
@media (prefers-reduced-transparency: reduce) {
  .card, .profile-box, .employee-nav-cards button, .live-counts button, .employee-welcome, .clock-panel { background: linear-gradient(135deg, #fff8e4, #f3dfa5); backdrop-filter: none; }
  .panel, .profile-group, .profile-header, .topbar, dialog, .notice { background: #fffdf7; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .card:hover, .profile-box:hover, .employee-nav-cards button:hover, .live-counts button:hover, button.primary:hover { transform: none; }
}
@media (max-width: 760px) {
  :root { --blur: blur(12px) saturate(150%); --radius: 16px; }
  body, .employee-shell { background-attachment: scroll; }
}
@media print {
  body, .employee-shell, .panel, .card, .profile-box { background: #fff !important; box-shadow: none !important; backdrop-filter: none !important; }
  .panel::after, .card::before, .profile-box::before { display: none; }
}


/* ---------- Installed app (home-screen) ---------- */
.install-banner {
  position: fixed; z-index: 60;
  left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--glass-gold-strong);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge-strong); border-radius: var(--radius);
  box-shadow: var(--glass-highlight), 0 18px 44px -12px rgb(60 40 5 / .45);
  color: var(--ink);
}
.install-banner img { border-radius: 12px; flex-shrink: 0; box-shadow: 0 2px 8px rgb(60 40 5 / .2); }
.install-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; font-size: 13px; line-height: 1.4; }
.install-copy span { color: var(--ink-soft); }
.install-banner button { flex-shrink: 0; }
.install-close { background: transparent; border-color: transparent; color: var(--ink-soft); }

@media (display-mode: standalone) {
  .topbar { padding-top: env(safe-area-inset-top); height: calc(76px + env(safe-area-inset-top)); }
  .employee-top { padding-top: max(20px, env(safe-area-inset-top)); }
  .sidebar { padding-top: max(32px, env(safe-area-inset-top)); }
  body { padding-bottom: env(safe-area-inset-bottom); }
}

.offline-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.offline-card { max-width: 420px; text-align: center; padding: 32px 28px; }
.offline-card img { border-radius: 18px; }
.offline-card h1 { margin: 16px 0 8px; font: 700 26px/1.2 Georgia, "Times New Roman", serif; }
.offline-card p { color: var(--ink-soft); line-height: 1.6; }
.offline-retry {
  display: inline-block; margin-top: 12px; padding: 12px 22px; border-radius: 10px;
  background: linear-gradient(180deg, var(--red-500), var(--red-700)); color: #fff; font-weight: 700; text-decoration: none;
}

/* ---------- Employee portal: four menu cards, merged Attendance tab ---------- */
.employee-main > .employee-nav-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .employee-main > .employee-nav-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.attendance-jump {
  position: sticky; top: 8px; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 8px;
  background: rgb(255 252 244 / .78);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--glass-highlight), var(--glass-shadow);
}
.attendance-jump button { border-radius: 999px; }
.attendance-section { scroll-margin-top: 76px; }
.clock-actions button[data-file-unpaid]{margin-top:10px}

/* ---------- Leave proof (medical certificates etc.) ---------- */
.field-hint { color: var(--ink-soft); font-size: 11.5px; line-height: 1.4; }
.proof-status { display: inline-block; font-weight: 600; font-size: 12px; }
.proof-required, .proof-rejected { color: var(--red-700); }
.proof-submitted { color: var(--gold-700); }
.proof-verified { color: #2f6b3a; }                 /* 5.9:1 on ivory */
.proof-note { display: block; color: var(--ink-soft); white-space: normal; max-width: 260px; margin-top: 2px; }
.proof-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.proof-form input[type="file"] { max-width: 210px; font-size: 11px; padding: 6px; }
.proof-reminder button { margin-left: 8px; }
.proof-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* ---------- Downloads (Excel / PDF) ---------- */
.download-links { display: inline-flex; gap: 6px; margin-left: auto; flex-shrink: 0; }
.download-link {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--glass-edge); background: rgb(255 255 255 / .75); color: var(--red-600);
  font-size: 11.5px; font-weight: 700; text-decoration: none; transition: background .2s var(--ease), border-color .2s var(--ease);
}
.download-link::before { content: "⇩"; font-weight: 400; }
.download-link:hover { background: rgb(255 248 228 / .95); border-color: var(--glass-edge-strong); }
.panel-head .download-links + * { margin-left: 12px; }
.report-list { list-style: none; margin: 0; padding: 8px 16px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.report-list li {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--glass-gold); border: 1px solid var(--glass-edge); box-shadow: var(--glass-highlight); font-weight: 600;
}
.export-link + .export-link { margin-left: 8px; }
.profile-payroll-actions{display:flex;justify-content:flex-end;margin:0 0 12px}

/* ---------- Sign-in welcome: headline, mascot handshake, culture summary ---------- */
.welcome-login {
  display: grid; min-height: 100vh; position: relative;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "head form" "body form";
}
.welcome-login::before {               /* warm espresso stage behind the headline and scene */
  content: ""; grid-column: 1; grid-row: 1 / 3; z-index: 0;
  background:
    radial-gradient(720px 420px at 30% 55%, rgb(217 184 92 / .24), transparent 65%),
    radial-gradient(620px 420px at 85% 95%, rgb(196 40 58 / .26), transparent 70%),
    linear-gradient(160deg, #22160e 0%, #120c08 100%);
  border-right: 1px solid rgb(217 184 92 / .3);
}
.welcome-head, .welcome-body { position: relative; z-index: 1; color: #fff; }
.welcome-head { grid-area: head; padding: 40px clamp(24px, 4vw, 64px) 8px; }
.welcome-head .brand { display: flex; align-items: center; gap: 18px; font-weight: 700; letter-spacing: .04em; margin-bottom: 32px; }
.welcome-head .brand-logo { width: 126px; height: auto; background: #fff; border-radius: 10px; padding: 6px; box-shadow: 0 8px 24px -10px rgb(0 0 0 / .6); }
.welcome-head .eyebrow { color: var(--gold-300); font-size: 12px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; }
.welcome-head h1 { margin: 10px 0 12px; max-width: 18ch; font: 700 clamp(30px, 3.6vw, 50px)/1.08 Georgia, "Times New Roman", serif; letter-spacing: -.01em; }
.welcome-head p { margin: 0; max-width: 46ch; color: rgb(255 255 255 / .78); font-size: 15px; line-height: 1.6; }
.welcome-login .login-form { grid-area: form; position: relative; z-index: 1; }
.welcome-body {
  grid-area: body; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center;
  gap: clamp(16px, 2.5vw, 36px); padding: 12px clamp(24px, 4vw, 64px) 40px;
}
.welcome-scene { margin: 0; }
.welcome-scene img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgb(0 0 0 / .4)); }
.welcome-motto { margin: 0 0 14px; color: var(--gold-300); font: italic 600 clamp(17px, 1.5vw, 21px)/1.3 Georgia, "Times New Roman", serif; }
.welcome-culture ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.welcome-culture li {
  display: grid; gap: 2px; padding: 10px 14px; border-radius: 12px;
  background: rgb(255 255 255 / .06); border: 1px solid rgb(217 184 92 / .25);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.welcome-culture strong { color: var(--gold-200); font-size: 14px; }
.welcome-culture span { color: rgb(255 255 255 / .74); font-size: 12.5px; line-height: 1.45; }

/* Handshake artwork: rises into view, a gentle two-pump handshake bob, a slight welcoming nod, then a quiet idle float. */
@media (prefers-reduced-motion: no-preference) {
  .welcome-handshake { transform-origin: 50% 100%; animation: welcome-arrive .6s ease-out both; /* a single soft fade-in, then perfectly still */ }
}
@keyframes welcome-arrive { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

@media (max-width: 1180px) {
  .welcome-body { grid-template-columns: 1fr; }
  .welcome-scene { max-width: 520px; }
  .welcome-culture ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {   /* phones and tablets: headline, then sign-in, then the welcome scene and culture */
  .welcome-login { display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto auto; grid-template-areas: "head" "form" "body"; }
  .welcome-login::before { display: none; }
  .welcome-head, .welcome-body { background: radial-gradient(520px 300px at 30% 40%, rgb(217 184 92 / .2), transparent 70%), linear-gradient(160deg, #22160e, #120c08); }
  .welcome-head { padding: 24px 20px 26px; }
  .welcome-head .brand { margin-bottom: 18px; }
  .welcome-head .brand-logo { width: 96px; }
  .welcome-head h1 { font-size: clamp(26px, 7vw, 34px); }
  .welcome-body { padding: 26px 20px 34px; }
  .welcome-scene { max-width: 420px; margin: 0 auto; }
}
@media (max-width: 520px) { .welcome-culture ul { grid-template-columns: 1fr; } }
/* Welcome refinements: brand on one line, compact culture rows that fit a laptop screen. */
.welcome-head .brand { flex-direction: row; justify-content: flex-start; text-align: left; }
.welcome-head h1 { font-size: clamp(28px, 3.1vw, 44px); }
.welcome-body { align-items: center; }
.welcome-culture li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 8px 12px; }
.welcome-culture strong { font-size: 13.5px; }
.welcome-culture span { font-size: 12.5px; }

/* Sign-in greeting in Dancing Script (SIL OFL 1.1, self-hosted: see fonts/OFL.txt). */
@font-face {
  font-family: "Dancing Script";
  src: url("/fonts/dancing-script-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
.welcome-login .login-form h2 {
  font-family: "Dancing Script", "Brush Script MT", cursive;
  font-weight: 700; font-size: clamp(40px, 4vw, 54px); line-height: 1.05; letter-spacing: 0;
  color: var(--red-600); margin: 6px 0 10px;
}

/* ======================================================================
   Sign-in: red and gold liquid glass. Every box floats on a slow-moving
   field of molten gold light over deep GDS red.
   ====================================================================== */
.welcome-login {
  isolation: isolate; overflow: hidden;
  background:
    radial-gradient(900px 600px at 12% 8%, rgb(255 214 120 / .30), transparent 60%),
    radial-gradient(800px 700px at 95% 100%, rgb(255 190 90 / .22), transparent 60%),
    linear-gradient(140deg, #3d070d 0%, #7d111d 32%, #a51b2a 55%, #6a0e18 78%, #2c0509 100%);
}
/* Liquid light: two blurred gold/red pools drifting behind the glass. */
.welcome-login::before, .welcome-login::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none; border-radius: 50%;
  grid-column: auto; grid-row: auto; border: 0; filter: blur(60px);
}
.welcome-login::before {
  width: 62vmax; height: 62vmax; left: -14vmax; top: 18vh;
  background: radial-gradient(circle at 40% 40%, rgb(255 210 110 / .55), rgb(217 160 60 / .22) 45%, transparent 70%);
}
.welcome-login::after {
  width: 54vmax; height: 54vmax; right: -12vmax; top: -16vh;
  background: radial-gradient(circle at 55% 55%, rgb(255 120 110 / .40), rgb(200 40 60 / .18) 45%, transparent 70%);
}
.welcome-head, .welcome-body, .welcome-login .login-form { background: none !important; }
.welcome-head h1 { color: #fff; text-shadow: 0 2px 18px rgb(60 0 8 / .45); }
.welcome-head p { color: rgb(255 244 228 / .88); }
.welcome-head .eyebrow, .welcome-motto { color: #f7d985; }

/* Shared glass recipe: frosted, gold-edged, lit from above, casting a soft shadow below. */
.welcome-head .brand,
.welcome-culture li,
.welcome-login .login-form form {
  position: relative;
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid rgb(247 217 133 / .55);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .55),          /* top highlight */
    inset 0 -1px 0 rgb(247 217 133 / .25),         /* gold rim */
    0 24px 50px -18px rgb(30 0 4 / .65),           /* floating shadow */
    0 0 0 1px rgb(255 255 255 / .06);
}
.welcome-head .brand::before,
.welcome-culture li::before,
.welcome-login .login-form form::before {     /* liquid sheen across the top */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgb(255 255 255 / .38) 0%, rgb(255 255 255 / .08) 30%, transparent 48%);
}

/* Brand chip */
.welcome-head .brand {
  display: inline-flex; padding: 10px 18px 10px 10px; border-radius: 18px;
  background: linear-gradient(135deg, rgb(255 255 255 / .20), rgb(255 220 150 / .10));
  color: #fff;
}
.welcome-head .brand-logo { box-shadow: 0 6px 16px -6px rgb(0 0 0 / .45); }

/* Culture tiles: translucent red-gold glass */
.welcome-culture li {
  border-radius: 16px; padding: 12px 14px;
  background: linear-gradient(135deg, rgb(255 236 190 / .22) 0%, rgb(255 200 120 / .10) 45%, rgb(160 20 35 / .18) 100%);
}
.welcome-culture strong { color: #ffe7a6; }
.welcome-culture span { color: rgb(255 246 232 / .9); }

/* Sign-in card: light gold glass so the form stays easy to read */
.welcome-login .login-form { padding: 32px clamp(18px, 3vw, 48px); }
.welcome-login .login-form form {
  width: min(440px, 100%); padding: 34px 32px 28px; border-radius: 28px;
  background: linear-gradient(145deg, rgb(255 252 244 / .86) 0%, rgb(255 238 200 / .72) 55%, rgb(255 228 190 / .66) 100%);
  color: var(--ink);
}
.welcome-login .login-form input {
  background: rgb(255 255 255 / .78); border-color: rgb(194 154 62 / .45);
  box-shadow: inset 0 1px 2px rgb(60 30 5 / .08), 0 1px 0 rgb(255 255 255 / .6);
}
.welcome-login .login-form .auth-brand { color: var(--gold-700); }

/* Steady by request: no drifting light, floating boxes or looping motion on the sign-in screen.
   The glass, gold edges and shadows give the floating look without movement. */

@media (prefers-reduced-transparency: reduce) {
  .welcome-culture li { background: #7d111d; }
  .welcome-login .login-form form { background: #fff8ea; }
  .welcome-head .brand { background: #6a0e18; }
}
@media (max-width: 900px) {
  .welcome-login .login-form { padding: 6px 16px 22px; }
  .welcome-login .login-form form { padding: 26px 20px 22px; border-radius: 22px; }
  .welcome-login::before { display: block; top: 40vh; }   /* the earlier phone rule hid the old split panel */
}

/* ---------- Employee timecard ---------- */
.timecard-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.timecard-totals { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; justify-content: space-between; padding: 12px 16px; margin-bottom: 14px;
  border-radius: var(--radius-sm); background: rgb(255 248 228 / .7); border: 1px solid var(--line); font-size: 13px; }
.timecard-table td small { display: block; color: var(--ink-soft); font-size: 11px; }
.timecard-flag { color: var(--red-700) !important; white-space: normal; max-width: 220px; }
.pay-plus { display: block; color: #2f6b3a; font-weight: 700; }
.pay-minus { display: block; color: var(--red-700); font-weight: 700; }
.profile-actions-inline { display: inline-flex; gap: 6px; }
@media (max-width: 900px) { .timecard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Payroll computation screen ---------- */
.computation-tools { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: rgb(255 248 228 / .7); border: 1px solid var(--line); }
.computation-tools h3 { margin: 14px 0 8px; }
.computation-slip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.computation-slip .button { text-decoration: none; }

/* ---------- Our Company Culture: clickable value cards that expand to show the meaning ---------- */
.welcome-culture .culture-title { margin: 0 0 4px; color: #fff; font: 700 clamp(22px, 2.2vw, 30px)/1.15 Georgia, "Times New Roman", serif; }
.welcome-culture .culture-hint { margin: 0 0 12px; color: rgb(255 244 228 / .78); font-size: 12.5px; }
.culture-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.culture-card {
  position: relative; border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, rgb(255 236 190 / .22) 0%, rgb(255 200 120 / .10) 45%, rgb(160 20 35 / .18) 100%);
  border: 1px solid rgb(247 217 133 / .55);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 18px 40px -20px rgb(30 0 4 / .65);
  transition: border-color .2s ease, background-color .2s ease;
}
.culture-card summary {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none;
  color: #ffe7a6; font-weight: 700; font-size: 14px; line-height: 1.25;
}
.culture-card summary::-webkit-details-marker { display: none; }
.culture-card summary:hover { background: rgb(255 255 255 / .06); }
.culture-card summary:focus-visible { outline: 2px solid #f7d985; outline-offset: -3px; border-radius: 16px; }
.culture-icon { flex: none; width: 30px; height: 30px; padding: 5px; border-radius: 10px; color: #3d070d; background: linear-gradient(145deg, #ffe7a6, #d9a441); box-shadow: inset 0 1px 0 rgb(255 255 255 / .6); }
.culture-name { flex: 1; }
.culture-chevron { flex: none; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
.culture-card[open] { border-color: #f7d985; background-color: rgb(255 255 255 / .06); }
.culture-card[open] .culture-chevron { transform: rotate(-135deg) translate(-2px, 0); }
.culture-card p { margin: 0; padding: 0 14px 14px 54px; color: rgb(255 246 232 / .92); font-size: 13px; line-height: 1.55; }
.welcome-culture .culture-close { margin: 14px 0 0; color: rgb(255 244 228 / .8); font: italic 13px/1.5 Georgia, "Times New Roman", serif; }
@media (max-width: 520px) { .culture-cards { grid-template-columns: 1fr; } }
@media (prefers-reduced-transparency: reduce) { .culture-card { background: #7d111d; } }
@media (prefers-reduced-motion: reduce) { .culture-card, .culture-chevron { transition: none; } }

/* ---------- Attendance upload from Excel ---------- */
.import-counts { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 14px; }
.import-count { display: grid; gap: 2px; min-width: 120px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; }
.import-count strong { font-size: 20px; }
.import-count span { font-size: 11px; color: var(--muted); }
.import-count.warn { border-color: #e7a5ab; background: #fff3f3; }
.import-count.warn strong { color: #a31927; }
.import-assign { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 10px; }
#ai-root .form-grid { margin-bottom: 18px; }

/* ---------- Government contribution basis editor ---------- */
.contribution-agency { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 16px; margin: 0; }
.contribution-agency legend { font-weight: 700; padding: 0 6px; }
.computation-contrib { margin: 10px 0; }

/* Wide 菲龍集團 GDS Capital logo: give it room so the name stays legible. */
.sidebar .brand-logo { width: 184px; max-width: 100%; padding: 6px 8px; border-radius: 10px; }
.welcome-head .brand-logo { width: 220px; padding: 8px 10px; }
@media (max-width: 900px) { .welcome-head .brand-logo { width: 170px; } }

/* Sign-in brand chip: the logo fills the box evenly (no caption). */
.welcome-head .brand { padding: 8px; gap: 0; }
.welcome-head .brand-logo { width: 300px; max-width: 70vw; padding: 8px 12px; border-radius: 12px; }
@media (max-width: 760px) { .welcome-head .brand-logo { width: 220px; } }

/* ---------- Sign-in on white (by request): dark headline, solid red culture cards, white sign-in card ---------- */
.welcome-login { background: #fff; }
.welcome-login::before, .welcome-login::after { display: none; }
.welcome-head h1 { color: var(--red-700, #8f1420); text-shadow: none; }
.welcome-head p { color: #4a3b33; }
.welcome-head .eyebrow, .welcome-motto { color: #a87b16; }
.welcome-scene img { filter: drop-shadow(0 14px 22px rgb(60 20 10 / .18)); }
.welcome-culture .culture-title { color: #2a1a12; }
.welcome-culture .culture-hint, .welcome-culture .culture-close { color: #6b5a50; }
.culture-card { background: linear-gradient(135deg, #c8202f 0%, #a51b2a 55%, #7d111d 100%); border-color: #e9c46a; box-shadow: 0 10px 24px -14px rgb(120 10 20 / .55); }
.welcome-login .login-form form { background: #fff; border-color: #ead9b0; box-shadow: 0 24px 50px -24px rgb(60 20 10 / .35), 0 0 0 1px rgb(234 217 176 / .6); }
.welcome-login .login-form form::before { display: none; }
.welcome-login .login-form input { background: #fff; border-color: #dcc9a0; }
@media (max-width: 900px) { .welcome-head, .welcome-body { background: #fff !important; } }
