/* assets/css/styles.css */

/* ---------- Tokens ---------- */

:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --brand:#004aad;
  --text:#222222;
  --muted:#6b7280;
  --border:#e5e7eb;
  --success:#16a34a;
  --danger:#ef4444;
  --orange:#f97316;
}

/* ---------- Base ---------- */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
  background:var(--bg); color:var(--text);
}
a{color:inherit; text-decoration:none}              /* no purple links */
a:focus-visible,button:focus-visible{outline:2px solid #93c5fd; outline-offset:2px}

.container{max-width:1100px;margin:20px auto;padding:0 16px}

/* ---------- Header ---------- */
.site-header{
  position:sticky; top:0; z-index:50;
  background:var(--brand); color:#fff;
  padding:12px 16px; display:flex; align-items:center; justify-content:space-between;
}
.brand{font-weight:700}
.header-actions{display:flex;gap:8px;align-items:center}
.user-pill{padding:6px 10px;background:#ffffff22;border:1px solid #ffffff33;border-radius:999px}
.icon-btn{background:transparent;border:0;color:inherit;cursor:pointer;font-size:18px;position:relative}
.badge{position:absolute;top:-6px;right:-8px;background:#e11d48;color:#fff;font-size:12px;padding:0 6px;border-radius:999px}

/* ---------- Layout helpers ---------- */
.grid-3{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.grid-4{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.grid-5{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}

/* ---------- Cards / Lists ---------- */
.card{
  background:var(--card); border:1px solid var(--border); border-radius:16px;
  padding:16px; box-shadow:0 1px 2px rgba(0,0,0,.04);
}
.card-header{display:flex;align-items:center;gap:12px}
.list{list-style:none;padding:0;margin:0}
.list li{padding:8px 0;border-bottom:1px dashed var(--border)}
.muted{color:var(--muted)}

/* ---------- Tables ---------- */
.table-wrapper{overflow:auto}
.table{width:100%;border-collapse:collapse}
.table th,.table td{border-bottom:1px solid var(--border);padding:10px;text-align:left}
.table a{color:var(--brand)}

/* ---------- Status pills ---------- */
.pill{display:inline-block;padding:.25rem .5rem;border-radius:999px;background:#eee}
.pill.accepted{background:#dcfce7;color:#166534}
.pill.pending{background:#eef2ff;color:#3730a3}
.pill.queried{background:#fee2e2;color:#991b1b}
.pill.responded{background:#fef9c3;color:#854d0e}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 14px;border-radius:10px;border:1px solid var(--border);
  cursor:pointer;background:#fff; transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.btn:hover{transform:translateY(-1px); box-shadow:0 6px 16px rgba(0,0,0,.08)}
.btn.primary{background:var(--brand);color:#fff;border-color:var(--brand)}
.btn.success{background:var(--success);color:#fff;border-color:var(--success)}
.btn.danger{background:var(--danger);color:#fff;border-color:var(--danger)}
.btn.outline{background:#fff;color:var(--brand);border-color:var(--brand)}
.btn.small{padding:6px 10px;font-size:14px}
.btn-row{display:flex;gap:8px;flex-wrap:wrap}

/* ---------- Tiles ---------- */
.tile-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.tile{
  background:var(--card);border:1px solid var(--border);border-radius:16px;padding:16px;
  text-decoration:none;color:inherit;box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:transform .18s ease, box-shadow .18s ease;
}
.tile:hover{transform:translateY(-2px); box-shadow:0 10px 22px rgba(0,0,0,.08)}
.tile-num{font-size:28px;font-weight:700}
.tile-title{font-weight:600}
.tile-sub{color:var(--muted)}

/* ---------- Auth ---------- */
.auth-body{display:grid;place-items:center;min-height:100vh;background:linear-gradient(135deg,#f3f7ff,#f6f7fb)}
.auth-card{background:#fff;border:1px solid var(--border);border-radius:16px;padding:24px;min-width:320px;max-width:420px;box-shadow:0 5px 18px rgba(0,0,0,.06)}
.alert{padding:10px 12px;border-radius:10px;margin-bottom:10px}
.alert.error{background:#fee2e2;color:#991b1b}
.alert.success{background:#dcfce7;color:#166534}
input,select,textarea{width:100%;padding:10px;border:1px solid var(--border);border-radius:10px;background:#fff}
label{display:block;font-weight:600;margin:8px 0 4px 0}

/* ---------- Modal ---------- */
.modal{
  position:fixed; left:0; right:0; top:0; bottom:0;  /* explicit for broad support */
  display:none; align-items:center; justify-content:center;
  background:rgba(0,0,0,.3); padding:16px; z-index:100;
}
.modal.open{display:flex}
.modal-content{
  background:#fff;border-radius:16px;max-width:680px;width:100%;
  border:1px solid var(--border);box-shadow:0 20px 40px rgba(0,0,0,.2);padding:16px
}
.modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.notif-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.notif-title{font-weight:700}
.notif-time{font-size:12px;color:var(--muted)}

/* ---------- Client Subnav (modern pill buttons) ---------- */
.subnav{
  position:sticky; top:56px; z-index:40;
  background:#fff; border-bottom:1px solid var(--border);
}
.subnav-inner{display:flex;gap:10px; padding:10px 0; overflow:auto}
.pill-btn{
  appearance:none;
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 14px; border-radius:999px;
  border:1px solid var(--border); background:#fff;
  font-weight:600; box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
  color:var(--text);
}
.pill-btn:hover{background:#f8faff;border-color:#c7d2fe;transform:translateY(-1px)}
.pill-btn.is-active{background:#1d4ed8;border-color:#1d4ed8;color:#fff}
.pill-btn i{font-style:normal;font-size:18px;line-height:1}

/* Backward compatibility if you still use <a class="active"> inside .subnav */
.subnav a{padding:10px 14px;border-radius:999px;border:1px solid transparent}
.subnav a.active,.subnav a:hover{background:#eef2ff;color:#1e40af;border-color:#dbe3ff}

/* ---------- Quick Actions (button cards) ---------- */
.quick-actions{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:14px; margin-top:10px;
}
.qa-card{
  display:grid; grid-template-columns:auto 1fr auto; align-items:center;
  gap:14px; padding:16px 18px;
  border-radius:16px; border:1px solid var(--border);
  background:linear-gradient(180deg,#ffffff,#f8fafc);
  text-decoration:none; color:inherit;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.qa-card:hover{transform:translateY(-2px); box-shadow:0 10px 22px rgba(0,0,0,.08); border-color:#bfdbfe; background:linear-gradient(180deg,#ffffff,#f3f6ff)}
.qa-icon{
  display:grid; place-items:center; width:44px; height:44px;
  border-radius:12px; background:#eef2ff; color:#1e40af; font-size:20px;
}
.qa-title{font-weight:700}
.qa-sub{color:var(--muted); margin-top:2px}
.qa-arrow{font-weight:700; opacity:.5; transition:transform .18s ease, opacity .18s ease}
.qa-card:hover .qa-arrow{transform:translateX(4px); opacity:.8}


/* CSS FOR NAVBAR */
/* --- NAV PILL BUTTONS (force link reset + modern pills) --- */

/* kill purple/underline for all link states */
a, a:link, a:visited, a:hover, a:active { color: inherit; text-decoration: none; }

/* subnav container */
.subnav{
  position: sticky; top: 56px; z-index: 40;
  background: #fff; border-bottom: 1px solid var(--border);
}
.subnav-inner{ display: flex; gap: 10px; padding: 10px 0; overflow: auto; }

/* pill buttons */
.pill-btn{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: background .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s;
}
.pill-btn:hover{
  transform: translateY(-1px);
  background: #f8faff;
  border-color: #c7d2fe;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}
.pill-btn.is-active{
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

/* icon in the pill (prevents any underline on emoji) */
.pill-btn i{
  font-style: normal; font-size: 18px; line-height: 1;
  text-decoration: none; display: inline-grid; place-items: center;
}


/* center the subnav buttons */
.subnav-inner{
  display:flex;
  gap:10px;
  padding:10px 0;
  justify-content:center;   /* <-- center them */
  flex-wrap:wrap;           /* wrap if they don't fit */
  overflow:visible;         /* no scrollbar when centered */
}

/* on small screens, go back to left + scrollable */
@media (max-width: 768px){
  .subnav-inner{
    justify-content:flex-start;
    overflow:auto;
  }
}

/* center the first page heading inside the page container */
.container > h2:first-of-type{
  text-align:center;
  margin:18px 0 8px;
}

/* inner report tabs */
.seg-tabs{display:flex;gap:8px;justify-content:center;margin:8px 0 16px}
.seg-tab{
  padding:10px 14px;border-radius:999px;border:1px solid var(--border);
  background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.04); font-weight:600;
}
.seg-tab:hover{background:#f8faff;border-color:#c7d2fe}
.seg-tab.is-active{background:#1d4ed8;border-color:#1d4ed8;color:#fff}

/* pager */
.pager{display:flex;gap:6px;justify-content:center;margin-top:12px}
.pager-link{padding:6px 10px;border:1px solid var(--border);border-radius:8px;background:#fff}
.pager-link.active{background:#1d4ed8;color:#fff;border-color:#1d4ed8}

input.locked{background:#f8fafc;color:#6b7280;border-style:dashed}

/* NavBar for Accountant */
.backbar{display:flex;justify-content:center;margin:8px 0}
.back-btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 12px;border-radius:999px;border:1px solid var(--border);
  background:#fff;font-weight:600;text-decoration:none;
  box-shadow:0 1px 2px rgba(0,0,0,.04);transition:.18s ease;
}
.back-btn:hover{background:#f8faff;border-color:#c7d2fe;transform:translateY(-1px)}

/* Accountant Table ADDED CSS */
/* Accountant submissions table */
.table.submissions{border-spacing:0;width:100%}
.table.submissions thead th{
  position:sticky; top:0; background:#fff; z-index:1;
  border-bottom:1px solid var(--border);
  font-weight:700; padding:12px; text-align:left;
}
.table.submissions tbody td{padding:12px;border-bottom:1px solid var(--border);vertical-align:middle}
.table.submissions tbody tr:hover{background:#fbfdff}
.cell-actions{white-space:nowrap}
.cell-actions .btn{min-width:86px}

/* extra buttons */
.btn.warn{background:#f97316;color:#fff;border-color:#f97316}   /* orange for Query */
.btn.reject{background:#991b1b;color:#fff;border-color:#991b1b} /* dark red for Reject */
.btn.reject:hover{filter:brightness(1.05)}

/* Make checkbox “pills” look clickable but simple */
.pill input[type="checkbox"]{ margin-right:6px; vertical-align:middle }

/* Accountant's Progress Report */
/* Filters layout tidy-up */
.filters-card{padding:16px}
.filters-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}
.status-group{display:flex;flex-wrap:wrap;gap:10px}
.status-chip{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--border);border-radius:999px;background:#f8fafc}
.status-chip input{margin:0}

/* Hover & table improvement */
.table.submissions thead th{position:sticky;top:0;background:#fff;z-index:1}
.table.submissions tbody tr:hover{background:#fbfdff}

/* css for accountant profile */
/* Accountant profile card */
.profile-card .profile-row{display:flex;align-items:center;gap:14px}
.avatar{
  width:64px;height:64px;border-radius:999px;
  display:flex;align-items:center;justify-content:center;
  background:#e8f1ff;color:#1e3a8a;border:1px solid var(--border);
  font-weight:700;font-size:22px;
}
.profile-meta .muted{margin-top:2px}




/* v3 Collapsible notifications header */
.notif-card{ width:min(900px,100%); margin:16px auto }
.notif-header{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 0 2px 0 }
.notif-toggle{
  display:flex; align-items:center; gap:10px; background:transparent; border:0; cursor:pointer;
  font-weight:700; font-size:16px; color:var(--text); padding:6px 8px; border-radius:10px;
}
.notif-toggle:hover{ background:#f3f4f6 }
.notif-toggle .chev{ font-size:14px; opacity:.8 }
.unread-pill{
  display:inline-flex; align-items:center; justify-content:center; min-width:22px;
  height:22px; padding:0 8px; border-radius:999px; background:#1d4ed8; color:#fff; font-size:12px;
}
.unread-pill.hidden{ display:none }
.markall-form{ margin:0 }

/* List styling (from v2) */
.notif-list-v2{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px }
.notif-row{
  width:100%; text-align:left; background:#fff; border:1px solid var(--border);
  border-radius:12px; padding:12px 14px; display:flex; gap:12px; align-items:flex-start;
  cursor:pointer; transition:box-shadow .2s, transform .02s;
}
.notif-row:hover{ box-shadow:0 6px 16px rgba(2,6,23,.08) }
.notif-row:active{ transform:translateY(1px) }
.notif-row .dot{ width:10px; height:10px; border-radius:999px; background:#2563eb;
  box-shadow:0 0 0 2px #e5efff; margin-top:6px; flex:0 0 auto }
.notif-row .content{ flex:1 1 auto }
.notif-row .title{ font-weight:600; line-height:1.2; display:flex; gap:8px; align-items:center }
.notif-row .preview{ color:var(--muted); margin-top:2px }
.notif-row .time{ color:var(--muted); font-size:12px; margin-top:6px }
.badge{ padding:2px 8px; border-radius:999px; font-size:12px; border:1px solid transparent }
.badge.unread{ background:#eff6ff; color:#1d4ed8; border-color:#bfdbfe }
.badge.read{ background:#f3f4f6; color:#374151; border-color:#e5e7eb }
.notif-row.read{ background:#fafafa }
.notif-row.read .dot{ display:none }


.notif-card.is-collapsed .notif-body { display: none; }
.notif-card.is-collapsed .markall-form { display: none; }

/* Optional: subtle compact look when collapsed */
.notif-card.is-collapsed .notif-toggle { background: #f8fafc; border-radius: 10px; }

/* ---------------------Notifications ----------------------------*/
/* Notifications */
.notif-card { padding:0; overflow:hidden; }
.notif-header { display:flex; align-items:center; gap:8px; padding:12px 14px; border-bottom:1px solid #eee; }
.notif-toggle { display:flex; align-items:center; gap:8px; background:none; border:0; cursor:pointer; font-weight:600; }
.notif-toggle .chev { font-size:14px; }
.unread-pill { background:#e11d48; color:#fff; border-radius:999px; padding:2px 8px; font-size:12px; }
.unread-pill.hidden { display:none; }
.notif-body { padding:10px 14px; }
.notif-card.is-collapsed .notif-body { display:none; }

.notif-list-v2 { list-style:none; margin:0; padding:0; }
.notif-row { width:100%; text-align:left; background:#fff; border:1px solid #eee; border-radius:10px; padding:10px 12px; display:flex; gap:10px; margin-bottom:8px; cursor:pointer; }
.notif-row.read { opacity:0.7; }
.notif-row .dot { width:10px; height:10px; background:#2563eb; border-radius:50%; margin-top:8px; flex:0 0 auto; }
.notif-row .content .title { font-weight:600; display:flex; align-items:center; gap:8px; }
.status-pill { font-size:11px; padding:2px 7px; border-radius:999px; }
.status-pill.unread { background:#dbeafe; color:#1d4ed8; }
.status-pill.read   { background:#e5e7eb; color:#374151; }

/* --- Tips card polish + mobile responsiveness --- */
.tips-card h3 { margin-bottom: 8px; }
.tip-slider { position:relative; overflow:hidden; }
.tip-slides { display:flex; transition:transform .28s ease; will-change:transform; touch-action:pan-y; }
.tip-slide  { min-width:100%; display:flex; flex-direction:column; gap:8px; }
.tip-head   { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.tip-title  { font-weight:700; font-size:18px; line-height:1.2; }
.tip-date   { color:#6b7280; font-size:12px; }
.tip-actions{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tip-body   { white-space:pre-wrap; line-height:1.5; }
.tip-foot   { display:flex; align-items:center; justify-content:center; gap:10px; margin-top:6px; }
.badge.unread { background:#fdecec; color:#8a1212; }
.badge.read   { background:#e6f7e6; color:#176f17; }
@media (max-width:640px){
  .tip-title{ font-size:16px; }
  .tip-body { font-size:14px; }
  .tip-actions .btn.small { padding:6px 10px; font-size:12px; }
}
/* optional: clamp huge bodies on very small phones, allow scroll */
@media (max-width:420px){
  .tip-body { max-height: 12.5em; overflow:auto; }
}