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

/* Brand palette derived from taxpathindia.com — deep maroon primary with a
   warm orange accent and cream surfaces, set in Poppins. */
:root {
  --bg: #fdf6f1;          /* warm cream page background */
  --surface: #ffffff;
  --ink: #271c20;         /* warm near-black text */
  --muted: #7a6e72;       /* warm gray */
  --line: #f0e3e6;        /* warm light border */
  --primary: #90253c;     /* TaxPath maroon */
  --primary-dark: #6f1c2e;
  --primary-soft: #f8e7ea;/* light maroon tint */
  --accent: #0f9d58;      /* success green (status) */
  --warm: #ff8044;        /* TaxPath warm orange accent */
  --warm-soft: #fdf1ec;   /* peach section tint */
  --danger: #d23f3f;
  --warn: #b7791f;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(144, 37, 60, 0.10);
  --shadow-sm: 0 2px 10px rgba(144, 37, 60, 0.07);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); }

/* ---------- top bar ---------- */
.topbar {
  background: linear-gradient(100deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.05rem; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: rgba(255,255,255,0.16);
  display: grid; place-items: center; font-size: 1.1rem;
}
/* Company logo image in the top bar — white chip so the transparent maroon
   badge stays legible against the maroon header. The badge fills the chip
   (minimal padding) so its wordmark is readable. */
.brand .logo-img {
  width: 50px; height: 50px; border-radius: 11px;
  background: #fff; padding: 2px; object-fit: contain;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.brand-sub { font-weight: 400; opacity: 0.82; font-size: 0.95rem; }
.topbar-right { display: flex; align-items: center; gap: 14px; font-size: 0.9rem; }
.topbar-right .who { opacity: 0.92; }

/* ---------- layout ---------- */
.page { max-width: 1080px; margin: 0 auto; padding: 28px 24px 60px; }
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
  background:
    radial-gradient(1100px 480px at 50% -8%, var(--warm-soft) 0%, rgba(253,241,236,0) 60%),
    linear-gradient(160deg, #fdf6f1 0%, #f8e7ea 100%);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}
.card + .card { margin-top: 22px; }
.card h2 { margin: 0 0 4px; font-size: 1.15rem; }
.card .sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 18px; }

.auth-card { width: 100%; max-width: 440px; }
.auth-head { text-align: center; margin-bottom: 18px; }
.auth-head .logo-lg {
  width: 60px; height: 60px; border-radius: 16px; margin: 0 auto 14px;
  background: linear-gradient(150deg, var(--primary), var(--warm));
  color: #fff; box-shadow: 0 8px 18px rgba(144, 37, 60, 0.28);
  display: grid; place-items: center; font-size: 1.7rem;
}
/* Company logo image on auth cards — transparent PNG sits directly on the
   cream card, no background box needed. */
.auth-head .brand-logo {
  display: block; width: 112px; height: 112px; object-fit: contain;
  margin: 0 auto 12px;
  filter: drop-shadow(0 6px 14px rgba(144, 37, 60, 0.22));
}
.auth-head .eyebrow {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--primary); background: var(--primary-soft);
  padding: 4px 12px; border-radius: 20px; margin-bottom: 10px;
}
.auth-head h1 { font-size: 1.35rem; margin: 0 0 4px; }
.auth-head p { color: var(--muted); margin: 0; font-size: 0.92rem; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; background: var(--bg); padding: 5px; border-radius: 10px; margin-bottom: 22px; }
.tab {
  flex: 1; text-align: center; padding: 9px; border-radius: 7px; cursor: pointer;
  font-weight: 600; font-size: 0.92rem; color: var(--muted); border: none; background: transparent;
}
.tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ---------- forms ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: #36404f; }
.field .hint { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
input, select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 0.95rem; font-family: inherit; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > .field { flex: 1; min-width: 160px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 9px; border: 1px solid transparent;
  font-size: 0.93rem; font-weight: 600; cursor: pointer; font-family: inherit;
  background: var(--primary); color: #fff; transition: background .15s, opacity .15s;
}
.btn:hover { background: var(--primary-dark); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.secondary { background: #fff; color: var(--primary); border-color: var(--line); }
.btn.secondary:hover { background: var(--primary-soft); }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn.ghost:hover { background: rgba(255,255,255,0.12); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #b02f2f; }
.btn.sm { padding: 7px 12px; font-size: 0.83rem; }
.btn.icon { padding: 7px 10px; }

/* ---------- alerts ---------- */
.alert { padding: 11px 14px; border-radius: 9px; font-size: 0.88rem; margin-bottom: 14px; display: none; }
.alert.show { display: block; }
.alert.error { background: #fdeaea; color: #98302f; border: 1px solid #f5c9c9; }
.alert.success { background: #e7f6ee; color: #1b7a45; border: 1px solid #bfe6cf; }
.alert.info { background: var(--primary-soft); color: var(--primary-dark); border: 1px solid #cfe0f6; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 0.92rem; }

/* ---------- misc ---------- */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 0.74rem;
  font-weight: 600; background: var(--primary-soft); color: var(--primary-dark);
}
.badge.gray { background: #eef1f6; color: var(--muted); }
.badge.green { background: #e7f6ee; color: #1b7a45; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }

.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .spacer { flex: 1; }
.section-title { font-size: 1.4rem; margin: 0 0 4px; }
.section-sub { color: var(--muted); margin: 0 0 22px; }

.fy-select { display: flex; align-items: center; gap: 10px; }
.fy-select select { width: auto; min-width: 150px; font-weight: 600; }

.muted-link { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.85rem; text-decoration: underline; }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat .n { font-size: 2rem; font-weight: 700; color: var(--primary); line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }

/* admin nav */
.adminnav { display: flex; gap: 6px; margin-bottom: 22px; background: var(--surface); padding: 6px; border-radius: 11px; box-shadow: var(--shadow-sm); width: fit-content; }
.adminnav button { border: none; background: transparent; padding: 9px 16px; border-radius: 8px; font-weight: 600; color: var(--muted); cursor: pointer; font-size: 0.9rem; }
.adminnav button.active { background: var(--primary); color: #fff; }

/* modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20,30,50,0.5); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 50; }
.modal-backdrop.show { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 760px; padding: 26px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.modal-head h2 { margin: 0; }
.x-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); line-height: 1; }

.fy-group { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; overflow: hidden; }
.fy-group > header { background: var(--bg); padding: 10px 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px; }
.checklist li { font-size: 0.85rem; color: var(--muted); padding: 5px 0; }
.checklist li::before { content: "\2713"; color: var(--accent); font-weight: 700; margin-right: 8px; }

.loading { color: var(--muted); padding: 20px; text-align: center; }

/* password chip (admin: shows the password an employee set to open a file) */
code.pw {
  display: inline-block; font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  background: var(--primary-soft); color: var(--primary-dark);
  padding: 2px 8px; border-radius: 6px; font-size: 0.82rem; user-select: all;
  word-break: break-all;
}

/* toast */
#toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast { background: #222d3d; color: #fff; padding: 12px 18px; border-radius: 9px; box-shadow: var(--shadow); font-size: 0.9rem; animation: slidein .2s ease; max-width: 340px; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--accent); }
@keyframes slidein { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.footer-note { text-align: center; color: var(--muted); font-size: 0.82rem; margin-top: 18px; }

/* ---------- site footer (brand + real contact details) ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  color: var(--muted);
}
.site-footer .sf-inner {
  max-width: 1080px; margin: 0 auto; padding: 26px 24px;
  display: flex; flex-wrap: wrap; gap: 18px 40px;
  align-items: flex-start; justify-content: space-between;
}
.site-footer .sf-brand { display: flex; align-items: center; gap: 12px; }
.site-footer .sf-brand img { width: 54px; height: 54px; object-fit: contain; }
.site-footer .sf-brand .sf-name { font-weight: 700; color: var(--primary); font-size: 1.05rem; line-height: 1.2; }
.site-footer .sf-brand .sf-tag { font-size: 0.82rem; color: var(--muted); }
.site-footer .sf-contact { font-size: 0.86rem; line-height: 1.7; }
.site-footer .sf-contact a { color: var(--primary); text-decoration: none; }
.site-footer .sf-contact a:hover { text-decoration: underline; }
.site-footer .sf-bar {
  border-top: 1px solid var(--line); text-align: center;
  padding: 12px 16px; font-size: 0.78rem; color: var(--muted);
}
@media (max-width: 560px) {
  .site-footer .sf-inner { padding: 20px 16px; gap: 14px; }
}

@media (max-width: 560px) {
  .topbar { padding: 0 14px; }
  .page { padding: 18px 14px 50px; }
  .card { padding: 18px; }
}


/* Upload progress bar (employee dashboard) */
.upload-progress { margin-top: 14px; }
.upbar-row { display: flex; align-items: center; gap: 10px; }
.upbar-track { flex: 1; height: 10px; background: #eee; border-radius: 999px; overflow: hidden; }
.upbar-fill { height: 100%; width: 0%; background: linear-gradient(90deg,#7a1530,#a51d44); border-radius: 999px; transition: width .15s ease; }
.upbar-pct { font-weight: 600; font-size: .85rem; min-width: 42px; text-align: right; }
.upbar-label { margin-top: 6px; font-size: .8rem; color: var(--muted); }
