/* INNO-HR — ธีมจากโลโก้ Innovation Beauty + INNO Aesthetics (แก้สีได้ที่ :root) */
[hidden] { display: none !important; }
:root {
  /* INNO Aesthetics */
  --navy: #00215f;
  --navy-2: #0b3a8f;
  --charcoal: #444444;
  /* Innovation Beauty */
  --ib-green: #43ae5b; --ib-lime: #a9c94f; --ib-yellow: #fecd08; --ib-orange: #f28c2d;
  --ib-red: #ea4032; --ib-magenta: #c1245e; --ib-purple: #8a288b; --ib-blue: #2184c1; --ib-teal: #56a1ac;
  --ib-gray: #939597;
  --rainbow: linear-gradient(90deg, #43ae5b, #a9c94f, #fecd08, #f28c2d, #ea4032, #c1245e, #8a288b, #2184c1, #56a1ac);

  --brand: var(--navy);
  --brand-2: var(--navy-2);
  --brand-soft: #e8eef9;
  --accent: var(--ib-orange);
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #22252b;
  --muted: #6b717c;
  --line: #e2e6ee;
  --danger: #d0352a;
  --danger-soft: #fdeceb;
  --success-soft: #e7f5ea;
  --warn-soft: #fff5e0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 33, 95, .04), 0 4px 14px rgba(0, 33, 95, .05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "IBM Plex Sans Thai", "Sarabun", "Noto Sans Thai", Tahoma, sans-serif;
  font-size: 15px; line-height: 1.55;
}
a { color: var(--navy-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 .2rem; line-height: 1.3; color: var(--navy); letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .9rem; color: var(--charcoal); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-line; }
.rainbow-line { height: 3px; background: var(--rainbow); }

/* ---------- top bar ---------- */
.topbar-wrap { position: sticky; top: 0; z-index: 20; background: #fff; box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(0,33,95,.05); }
.topbar { display: flex; align-items: center; gap: 1.5rem; padding: 0 1.25rem; height: 64px; max-width: 1400px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--navy); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-marks { display: flex; align-items: center; gap: 5px; }
.brand-marks img { width: 34px; height: 34px; object-fit: contain; }
.brand-marks img { width: 30px; height: 30px; }
.brand-divider { width: 1px; height: 30px; background: var(--line); }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name b { font-size: 1.12rem; font-weight: 700; letter-spacing: .04em; color: var(--navy); }
.brand-name b span { background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-name small { font-size: .7rem; color: var(--muted); letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: .15rem; flex: 1; }
.nav a { color: var(--charcoal); padding: .5rem .85rem; border-radius: 10px; font-weight: 500; font-size: .95rem; position: relative; }
.nav a:hover { background: #f1f4f9; text-decoration: none; color: var(--navy); }
.nav a.active { color: var(--navy); background: var(--brand-soft); }
.nav a.active::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: -12px; height: 3px; border-radius: 3px; background: var(--rainbow); }
.nav-spacer { flex: 1; }
.nav-user { font-size: .88rem; text-align: right; line-height: 1.2; }
.nav-logout { font-size: .88rem; color: var(--muted) !important; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--navy); font-size: 1.5rem; cursor: pointer; }

/* ---------- layout ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head p { margin: 0; }
.back { display: inline-block; margin-bottom: .6rem; font-size: .9rem; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + .card, .grid-2 + section { margin-top: 1.25rem; }
.footer { display: flex; flex-direction: column; align-items: center; gap: .6rem; color: var(--muted); font-size: .78rem; padding: .5rem 0 2rem; }
.footer-logos { display: flex; align-items: center; gap: 1.4rem; opacity: .75; filter: grayscale(.15); }
.footer-logos img { height: 30px; width: auto; }
.footer-logos span { width: 1px; height: 22px; background: #cfd5df; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .55rem 1rem; border-radius: 9px; border: 1px solid var(--line); background: #fff;
  color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: #c9c6bd; text-decoration: none; background: #fafaf8; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #9a2d26; }
.btn-danger-ghost { color: var(--danger); }
.btn-sm { padding: .3rem .65rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; }
form.inline { display: inline; }

/* ---------- forms ---------- */
.form label, .filters label, .upload-row label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; color: var(--muted); font-weight: 500; }
input, select, textarea {
  font: inherit; color: var(--text); padding: .55rem .7rem; border: 1px solid #d6d3cb; border-radius: 8px;
  background: #fff; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand-2); }
textarea { resize: vertical; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem 1.1rem; }
.span-all { grid-column: 1 / -1; }
.form.narrow { max-width: 460px; display: grid; gap: 1rem; }
.actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }
.check { flex-direction: row !important; align-items: center; gap: .4rem !important; margin-top: .5rem; }
.check input { width: auto; }
.date-hint { color: var(--brand-2); font-size: .8rem; margin-top: -.1rem; min-height: 1em; }
.sticky-actions {
  position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 35%);
  padding: 1.2rem 0 1rem; margin-top: 0;
}

.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding: .9rem; }
.filters select { width: auto; }
.grow { flex: 1 1 260px; }

/* ---------- flash ---------- */
.flashes { display: grid; gap: .5rem; margin-bottom: 1rem; }
.flash { padding: .7rem 1rem; border-radius: 9px; border: 1px solid; transition: opacity .4s; }
.flash-success { background: var(--success-soft); border-color: #bfe0c8; color: #1d5b31; }
.flash-error { background: var(--danger-soft); border-color: #efc4c0; color: #8a2a24; }
.flash-warning { background: var(--warn-soft); border-color: #efd8a8; color: #7a5313; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; position: relative; overflow: hidden; background: #f6f8fc; }
.login-wrap::before, .login-wrap::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; pointer-events: none; }
.login-wrap::before { width: 520px; height: 520px; left: -160px; top: -160px; background: conic-gradient(from 20deg, #43ae5b, #fecd08, #f28c2d, #ea4032, #c1245e, #8a288b, #2184c1, #43ae5b); }
.login-wrap::after { width: 460px; height: 460px; right: -150px; bottom: -170px; background: radial-gradient(circle, #0b3a8f, #00215f 70%); opacity: .22; }
.login-card { position: relative; z-index: 1; width: 100%; max-width: 440px; background: #fff; border-radius: 20px; padding: 2.2rem 2rem 2rem;
  box-shadow: 0 20px 50px rgba(0,33,95,.12); border: 1px solid var(--line); overflow: hidden; }
.login-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--rainbow); }
.login-card .form { display: grid; gap: 1rem; }
.login-logos { display: flex; align-items: center; justify-content: center; gap: 1.1rem; margin-bottom: 1.4rem; }
.login-logos img { height: 46px; width: auto; max-width: 44%; object-fit: contain; }
.login-logos span { width: 1px; height: 38px; background: var(--line); }
.login-brand { text-align: center; margin-bottom: 1.4rem; }
.login-brand h1 { margin: 0; font-size: 1.9rem; letter-spacing: .05em; }
.login-brand h1 span { background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-brand p { color: var(--muted); margin: .1rem 0 0; }
.login-foot { text-align: center; color: var(--muted); font-size: .75rem; margin-top: 1.2rem; }
.login-wrap .flashes { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); width: min(420px, calc(100% - 2rem)); z-index: 5; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; display: flex; flex-direction: column; color: var(--text); box-shadow: var(--shadow); }
a.stat:hover { border-color: var(--brand-2); text-decoration: none; }
.stat-num { font-size: 2rem; font-weight: 700; color: var(--brand); line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .88rem; }

/* ---------- avatars & people lists ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; background: var(--brand-soft); color: var(--brand); font-weight: 600; flex-shrink: 0; }
.avatar-sm { width: 36px; height: 36px; font-size: .9rem; }
.avatar-md { width: 48px; height: 48px; }
.avatar-xl { width: 128px; height: 128px; font-size: 2.6rem; border-radius: 18px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; max-height: 320px; overflow: auto; }
.people a { display: flex; align-items: center; gap: .7rem; padding: .45rem .5rem; border-radius: 9px; color: var(--text); }
.people a:hover { background: var(--bg); text-decoration: none; }
.people b { font-weight: 500; }
.people small { display: block; color: var(--muted); font-size: .82rem; }
.empty { color: var(--muted); margin: 0; }
.empty-state { text-align: center; padding: 3rem 1rem; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.card.table-wrap { padding: .3rem .3rem; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 500; font-size: .82rem; color: var(--muted); padding: .65rem .75rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .6rem .75rem; border-bottom: 1px solid #f0eee9; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
tr.row-link { cursor: pointer; }
tr.row-link:hover td { background: #faf9f6; }
.badge { display: inline-block; font-size: .78rem; padding: .1rem .55rem; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-weight: 500; white-space: nowrap; }
.badge-green { background: var(--success-soft); color: #1d6b39; }
.badge-gray { background: #eceae5; color: #5c625f; }

/* ---------- profile ---------- */
.profile { display: flex; gap: 1.5rem; align-items: center; }
.profile-code { font-weight: 600; color: var(--brand-2); display: flex; gap: .5rem; align-items: center; margin-bottom: .2rem; }
.profile h1 { font-size: 1.6rem; }
.profile-role { color: var(--muted); margin: 0 0 .9rem; }
.info { display: grid; grid-template-columns: 140px 1fr; gap: .55rem 1rem; margin: 0; }
.info dt { color: var(--muted); font-size: .9rem; }
.info dd { margin: 0; }

/* ---------- photo edit ---------- */
.photo-edit { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.photo-preview { width: 130px; height: 130px; border-radius: 16px; background: var(--brand-soft); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: .85rem; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-edit p { margin: .5rem 0 0; }

/* ---------- upload ---------- */
.upload-box { background: #faf9f6; border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin-bottom: 1rem; }
.upload-row { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-end; }
.upload-row select { min-width: 200px; }
.dropzone {
  margin-top: .8rem; display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center;
  border: 2px dashed #cfccc3; border-radius: 10px; padding: 1.4rem 1rem; cursor: pointer; background: #fff; transition: .15s;
}
.dropzone input { display: none; }
.dropzone.drag, .dropzone:hover { border-color: var(--brand-2); background: var(--brand-soft); }
.dropzone.has-files { border-style: solid; border-color: var(--brand-2); }
.upload-box .actions { margin-top: .8rem; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); display: grid; gap: .8rem; max-height: 360px; overflow: auto; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -1.38rem; top: .45rem; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-2); border: 2px solid #fff; }
.t-time { color: var(--muted); font-size: .82rem; margin-right: .3rem; }

.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 500; }
.danger-zone[open] { border-color: #efc4c0; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 58px; left: 0; right: 0; background: var(--brand); flex-direction: column; align-items: stretch; padding: .5rem 1rem 1rem; }
  body.nav-open .nav { display: flex; }
  .nav-spacer { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .container { padding: 1rem 1rem 3rem; }
  .card { padding: 1rem; }
  .profile { flex-direction: column; text-align: center; }
  .profile-code, .profile .btn-row { justify-content: center; }
  .info { grid-template-columns: 1fr; gap: .1rem; }
  .info dd { margin-bottom: .6rem; }
  .table-emp th:nth-child(4), .table-emp td:nth-child(4),
  .table-emp th:nth-child(5), .table-emp td:nth-child(5),
  .table-emp th:nth-child(6), .table-emp td:nth-child(6),
  .table-emp th:nth-child(8), .table-emp td:nth-child(8) { display: none; }
  .page-head .btn-row { width: 100%; }
  .page-head .btn-row .btn { flex: 1; }
}

/* ================= v1.1 ================= */
.nav-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: .25rem;
  border-radius: 99px; background: #f1c27d; color: #3d2a06; font-size: .75rem; font-weight: 700; }
.nav-badge[hidden] { display: none; }
.nav-bell { background: rgba(255,255,255,.12); border: 0; color: #fff; border-radius: 8px; padding: .35rem .55rem; cursor: pointer; font-size: 1rem; animation: bellpulse 2s infinite; }
@keyframes bellpulse { 50% { background: rgba(241,194,125,.45); } }
.nav-user small { display: block; font-size: .72rem; opacity: .7; line-height: 1.1; }
.stat-alert { border-color: #e9c27f; background: var(--warn-soft); }
.stat-alert .stat-num { color: #9a6410; }
.card-alert { border-color: #efd8a8; background: #fffaf0; }
.push-right { margin-left: auto; }
.badge-amber { background: var(--warn-soft); color: #8a5a0f; }
.badge-red { background: var(--danger-soft); color: #9a2d26; }
.flash-credential { background: #eef4ff; border-color: #bcd0f5; color: #1c3d7a; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92rem; word-break: break-word; }
a.block-link { display: block; margin-bottom: 1rem; color: #7a5313; }
a.block-link:hover { text-decoration: none; filter: brightness(.98); }
.error-code { font-size: 3rem; font-weight: 700; color: var(--brand); }
.select-sm { width: auto; padding: .25rem .5rem; font-size: .85rem; }
.account-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.role-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .5rem 1.2rem; font-size: .85rem; color: var(--muted); padding: .9rem 1.1rem; }
.role-legend b { color: var(--text); display: block; }
.inline-details { display: inline-block; position: relative; }
.inline-details summary { list-style: none; display: inline-flex; }
.inline-details summary::-webkit-details-marker { display: none; }
.del-pop { position: absolute; right: 0; top: 110%; z-index: 5; background: #fff; border: 1px solid #efc4c0; border-radius: 10px;
  padding: .7rem; width: 250px; display: grid; gap: .45rem; box-shadow: 0 6px 20px rgba(0,0,0,.1); white-space: normal; }
.profile.compact { padding: 1rem 1.25rem; }
.profile.compact h1 { font-size: 1.25rem; }
.profile.compact .profile-role { margin: 0; font-size: .88rem; }
.note-card { background: #faf9f6; padding: .9rem 1.1rem; }
.diff td.old { color: var(--muted); }
.diff td.new { color: #1d6b39; font-weight: 500; }
.diff td:first-child input { width: 18px; height: 18px; }
.warn { color: #9a6410; }
.photo-compare { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.photo-compare img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }
.photo-compare figure { margin: 0; text-align: center; }
.photo-compare figure img, .photo-compare figure .avatar { width: 128px; height: 128px; }
.photo-compare figcaption { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.photo-compare .arrow { font-size: 1.6rem; color: var(--muted); }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.doc-list li { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.doc-list input { width: 18px; height: 18px; }
.form-label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; color: var(--muted); font-weight: 500; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.team-card { display: flex; gap: .9rem; align-items: flex-start; margin: 0; }
.backup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.backup-card { display: flex; flex-direction: column; gap: .2rem; color: var(--text); margin: 0; transition: .15s; }
.backup-card:hover { border-color: var(--brand-2); text-decoration: none; transform: translateY(-1px); }
.backup-card small { color: var(--muted); }
.bk-icon { font-size: 1.6rem; }
.tip-card { background: var(--brand-soft); border-color: #c4e2dd; font-size: .9rem; }
.restore-form .fields { margin-top: .6rem; }
code { background: rgba(0,0,0,.05); padding: .05rem .35rem; border-radius: 5px; font-size: .88em; }
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; display: grid; gap: .5rem; width: min(340px, calc(100% - 2rem)); }
.toast { display: block; background: #1e2523; color: #fff; padding: .8rem 1rem; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2);
  font-size: .9rem; transition: opacity .4s; animation: toastin .25s ease-out; }
a.toast:hover { text-decoration: none; background: #2b3431; }
.toast.hide { opacity: 0; }
@keyframes toastin { from { transform: translateY(10px); opacity: 0; } }
@media (max-width: 860px) {
  .backup-grid { grid-template-columns: 1fr; }
  .nav-bell { align-self: flex-start; }
}
@media (max-width: 600px) {
  .del-pop { right: auto; left: -150px; }
  .photo-compare figure img, .photo-compare figure .avatar { width: 96px; height: 96px; }
}


/* ================= v1.2 brand theme ================= */
.btn { border-radius: 10px; }
.btn-primary { background: var(--navy); border-color: var(--navy); box-shadow: 0 2px 6px rgba(0,33,95,.18); }
.btn-primary:hover { background: var(--navy-2); border-color: var(--navy-2); }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(11,58,143,.12); border-color: var(--navy-2); }
.nav-badge { background: var(--ib-red); color: #fff; }
.nav-bell { background: var(--warn-soft); color: var(--charcoal); animation: none; border: 1px solid #f6dca5; }
.nav-bell:hover { background: #ffeec7; }
.nav-user small { opacity: 1; color: var(--muted); }

/* page title with rainbow tick */
.page-head h1 { position: relative; padding-left: .85rem; }
.page-head h1::before { content: ""; position: absolute; left: 0; top: .28em; bottom: .28em; width: 4px; border-radius: 4px; background: linear-gradient(180deg, #43ae5b, #fecd08, #f28c2d, #ea4032, #c1245e, #8a288b, #2184c1); }

/* stat cards — each takes one colour from the Innovation Beauty mark */
.stat { position: relative; overflow: hidden; padding: 1.1rem 1.2rem 1rem 1.35rem; border-radius: var(--radius); }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c, var(--navy)); }
.stat::after { content: ""; position: absolute; right: -24px; top: -24px; width: 84px; height: 84px; border-radius: 50%; background: var(--c, var(--navy)); opacity: .08; }
.stat-num { color: var(--navy); font-size: 2.1rem; }
.stats > :nth-child(1) { --c: var(--ib-green); }
.stats > :nth-child(2) { --c: var(--ib-gray); }
.stats > :nth-child(3) { --c: var(--ib-orange); }
.stats > :nth-child(4) { --c: var(--ib-blue); }
.stat-alert { background: #fff8ec; border-color: #f7d9a6; }
.stat-alert .stat-num { color: #c25f05; }
.card-alert { background: #fffaf2; border-color: #f7dfb4; box-shadow: inset 4px 0 0 var(--ib-orange), var(--shadow); }

/* avatars */
.avatar { background: var(--brand-soft); color: var(--navy); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
.avatar-empty { background: linear-gradient(135deg, #e8eef9, #f3e9f5); }
.avatar-xl { box-shadow: 0 0 0 4px #fff, 0 6px 18px rgba(0,33,95,.12); }

/* profile header with soft brand band */
.profile { position: relative; overflow: hidden; }
.profile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--rainbow); }
.profile-code { color: var(--navy-2); }

/* badges */
.badge { background: var(--brand-soft); color: var(--navy); }
.badge-green { background: #e5f4e8; color: #23773a; }
.badge-amber { background: #fff1d6; color: #9a5800; }
.badge-red { background: #fde7e6; color: #b42a20; }
.badge-gray { background: #eceef2; color: #5b6170; }

/* tables */
.table th { background: #f8fafd; }
.table thead tr th:first-child { border-top-left-radius: 10px; }
.table thead tr th:last-child { border-top-right-radius: 10px; }
tr.row-link:hover td { background: #f6f9fe; }

/* misc */
.dropzone.drag, .dropzone:hover { border-color: var(--navy-2); background: var(--brand-soft); }
.dropzone.has-files { border-color: var(--ib-green); }
.timeline li::before { background: var(--navy-2); }
.tip-card { background: #eef6f0; border-color: #cfe7d5; }
.flash-success { background: #e9f6ec; border-color: #c4e5cc; color: #1f6a34; }
.backup-card .bk-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; background: var(--brand-soft); margin-bottom: .3rem; }
.backup-grid > :nth-child(1) .bk-icon { background: #e8eef9; }
.backup-grid > :nth-child(2) .bk-icon { background: #e7f5ea; }
.backup-grid > :nth-child(3) .bk-icon { background: #fff1e3; }
.toast { background: var(--navy); }
a.toast:hover { background: var(--navy-2); }
.error-code { background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 4rem; }

@media (max-width: 1100px) {
  .brand-name small { display: none; }
  .nav a { padding: .5rem .6rem; font-size: .9rem; }
}
@media (max-width: 860px) {
  .topbar { gap: .8rem; }
  .nav { top: 67px; background: #fff; box-shadow: 0 10px 24px rgba(0,33,95,.12); border-top: 1px solid var(--line); }
  .nav a.active::after { display: none; }
  .nav-user { text-align: left; }
  .brand-name small { display: block; }
}
@media (max-width: 420px) {
  .brand-divider, .brand-name small { display: none; }
  .login-logos img { height: 36px; }
  .login-card { padding: 2rem 1.25rem 1.5rem; }
}
