/* =====================================================================
   Digitex Prints - admin theme
   Colours come from the logo: deep teal "d", magenta "Digital / P",
   gold rules, and the coloured print dots (green, purple, orange, sky).
   Headings: Rajdhani (the logo's squared letterforms). Text: Plus Jakarta Sans.
   ===================================================================== */

:root {
    --teal-950: #062f33;
    --teal-900: #08474d;
    --teal: #0b5f66;
    --teal-600: #0e7480;
    --teal-400: #3f9aa2;
    --teal-100: #d4ecec;
    --teal-50: #ebf6f6;
    --magenta: #d81b60;
    --magenta-600: #b8124f;
    --magenta-50: #fde8f0;
    --red: #e53950;
    --gold: #f2b33d;
    --gold-50: #fef5e2;
    --green: #6fae2b;
    --green-50: #edf7e2;
    --purple: #7e6bc4;
    --orange: #f28c28;
    --sky: #4fb3dd;

    --bg: #f2f6f6;
    --card: #ffffff;
    --text: #1b2a2b;
    --muted: #5d7071;
    --line: #dbe6e6;
    --line-soft: #ecf2f2;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(6, 47, 51, .06), 0 6px 20px rgba(6, 47, 51, .06);
    --shadow-lg: 0 18px 50px rgba(6, 47, 51, .18);
    --font: "Plus Jakarta Sans", "Noto Sans Gujarati", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-head: "Rajdhani", "Noto Sans Gujarati", "Noto Sans Devanagari", "Plus Jakarta Sans", sans-serif;
    --side-w: 268px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font-family: var(--font); font-size: 14.5px; line-height: 1.55;
    top: 0 !important;                       /* Google Translate pushes the page down; keep it still */
}
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--magenta); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; letter-spacing: .2px; margin: 0; color: var(--teal-950); }
p { text-align: justify; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .2px; }
.hide { display: none !important; }

/* ---------- Google Translate chrome hidden; our own language picker drives it ---------- */
.goog-te-banner-frame, .skiptranslate > iframe, iframe.skiptranslate, #goog-gt-tt, .goog-te-balloon-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf, .VIpgJd-yAWNEb-L7lbkb { display: none !important; }
#google_translate_element { display: none; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
font { background: transparent !important; box-shadow: none !important; }

/* =====================================================================
   App shell
   ===================================================================== */
.app { min-height: 100vh; }

.side {
    position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 40;
    background: radial-gradient(120% 60% at 0% 0%, rgba(216, 27, 96, .16), transparent 60%),
                linear-gradient(185deg, var(--teal-900) 0%, var(--teal) 55%, #0a545a 100%);
    color: #e9f4f4; display: flex; flex-direction: column;
    transition: transform .28s ease;
}
.side-brand {
    margin: 16px 16px 6px; padding: 12px 14px; background: #fff; border-radius: 16px;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}
.side-brand img { height: 74px; width: auto; display: block; }
.side-dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 8px; }
.side-dots i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.side-nav { flex: 1; overflow-y: auto; padding: 4px 12px 20px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.side-group {
    font-family: var(--font-head); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.6px;
    color: var(--gold); margin: 16px 10px 6px; display: flex; align-items: center; gap: 8px;
}
.side-group::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(242,179,61,.5), transparent); }
.side-link {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 2px 0;
    border-radius: 11px; color: #dceeee; font-weight: 500; transition: background .18s, color .18s, transform .18s;
}
.side-link i { font-size: 17px; width: 22px; text-align: center; opacity: .9; }
.side-link:hover { background: rgba(255, 255, 255, .09); color: #fff; transform: translateX(2px); }
.side-link.active { background: rgba(255, 255, 255, .15); color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.side-link.active::before {
    content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0;
    background: linear-gradient(var(--magenta), var(--gold));
}
.side-foot { padding: 12px 18px 16px; font-size: 11.5px; color: rgba(233, 244, 244, .6); border-top: 1px solid rgba(255,255,255,.08); }

.main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.top {
    position: sticky; top: 0; z-index: 30; height: 64px; background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 14px; padding: 0 24px;
}
.top-title { font-family: var(--font-head); font-size: 22px; font-weight: 700; color: var(--teal-950); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-spacer { flex: 1; }
.burger { display: none; border: 0; background: var(--teal-50); color: var(--teal); width: 40px; height: 40px; border-radius: 10px; font-size: 20px; cursor: pointer; }

.lang {
    display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; background: #fff;
}
.lang i { color: var(--teal); }
.lang select { border: 0; background: transparent; font: 600 13px var(--font); color: var(--text); padding: 4px 4px; outline: none; cursor: pointer; }

.user { position: relative; }
.user-btn {
    display: flex; align-items: center; gap: 10px; border: 0; background: transparent; cursor: pointer; padding: 4px 6px; border-radius: 12px; font: inherit; color: inherit;
}
.user-btn:hover { background: var(--teal-50); }
.avatar {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700;
    background: conic-gradient(from 210deg, var(--magenta), var(--gold), var(--teal-600), var(--magenta)); font-family: var(--font-head); font-size: 17px;
}
.user-name { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.2; text-align: left; }
.user-role { display: block; font-size: 11.5px; color: var(--muted); }
.menu-pop {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: #fff; border: 1px solid var(--line);
    border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: none;
}
.menu-pop.open { display: block; animation: pop .16s ease; }
.menu-pop a, .menu-pop button {
    display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 12px; border-radius: 8px; color: var(--text);
    background: none; border: 0; font: inherit; cursor: pointer; text-align: left;
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--teal-50); color: var(--teal); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.content { padding: 24px; flex: 1; width: 100%; max-width: 1500px; }
.foot { padding: 14px 24px; font-size: 12px; color: var(--muted); }

.scrim { display: none; }

/* =====================================================================
   Page head, cards
   ===================================================================== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 28px; line-height: 1.1; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: 13.5px; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--magenta); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line-soft); }
.card-head h2 { font-size: 19px; display: flex; align-items: center; gap: 10px; }
.card-head h2 .num {
    width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 15px; color: #fff;
    background: linear-gradient(135deg, var(--teal-600), var(--teal));
}
.card + .card { margin-top: 18px; }
.stack > * + * { margin-top: 18px; }

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
    --b: var(--teal); --c: #fff;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
    border-radius: 11px; border: 1px solid var(--b); background: var(--b); color: var(--c);
    font: 600 14px var(--font); cursor: pointer; white-space: nowrap; user-select: none;
    transition: transform .12s, box-shadow .18s, background .18s, filter .18s;
}
.btn:hover { color: var(--c); filter: brightness(1.07); box-shadow: 0 8px 18px -8px var(--b); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid rgba(216, 27, 96, .35); outline-offset: 2px; }
.btn i { font-size: 16px; }
.btn-accent { --b: var(--magenta); }
.btn-gold { --b: var(--gold); --c: #3b2a05; }
.btn-danger { --b: var(--red); }
.btn-light { --b: #fff; --c: var(--teal); border-color: var(--line); }
.btn-light:hover { background: var(--teal-50); box-shadow: none; }
.btn-ghost { --b: transparent; --c: var(--teal); border-color: transparent; }
.btn-ghost:hover { background: var(--teal-50); box-shadow: none; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-busy { pointer-events: none; opacity: .75; filter: grayscale(.2); }
.btn .spin {
    width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
    animation: rot .7s linear infinite; display: inline-block;
}
@keyframes rot { to { transform: rotate(360deg); } }

.icon-btn {
    width: 34px; height: 34px; border-radius: 9px; display: inline-grid; place-items: center; border: 1px solid transparent;
    background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; transition: all .15s;
}
.icon-btn:hover { background: var(--teal-50); color: var(--teal); border-color: var(--teal-100); }
.icon-btn.view:hover { color: var(--sky); background: #e9f6fc; border-color: #cbe9f6; }
.icon-btn.edit:hover { color: var(--teal); }
.icon-btn.del:hover { color: var(--red); background: #fdecee; border-color: #f8cdd3; }
.icon-btn.key:hover { color: var(--purple); background: #f0edfa; border-color: #ddd6f3; }

/* =====================================================================
   Form fields - clear focus: teal border, soft glow, label turns teal
   ===================================================================== */
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px 18px; }
.col-12 { grid-column: span 12; } .col-8 { grid-column: span 8; } .col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; }

.fld { position: relative; display: flex; flex-direction: column; gap: 6px; }
.fld > label, .lbl { font-size: 13px; font-weight: 600; color: #34494a; transition: color .15s; }
.fld > label.req::after, .lbl.req::after { content: " *"; color: var(--magenta); }
.fld:focus-within > label { color: var(--teal); }
.fld .hint { font-size: 12px; color: var(--muted); }

.inp, select.inp, textarea.inp {
    width: 100%; height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    background: #fbfdfd; color: var(--text); font: 500 14.5px var(--font); outline: none;
    transition: border-color .15s, box-shadow .2s, background .15s;
}
textarea.inp { height: auto; min-height: 90px; padding: 11px 14px; resize: vertical; }
select.inp { appearance: none; padding-right: 38px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230b5f66' d='M6 8 0 1.4 1.4 0 6 4.9 10.6 0 12 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; }
.inp::placeholder { color: #9aabab; font-weight: 400; }
.inp:hover { border-color: #b9d0d0; }
.inp:focus {
    border-color: var(--teal); background: #fff;
    box-shadow: 0 0 0 4px rgba(11, 95, 102, .13), 0 6px 16px -10px rgba(11, 95, 102, .6);
}
.inp[readonly], .inp:disabled { background: var(--line-soft); color: var(--muted); }
.fld.has-err .inp, .inp.input-validation-error { border-color: var(--red); background: #fff8f9; }
.fld.has-err .inp:focus, .inp.input-validation-error:focus { box-shadow: 0 0 0 4px rgba(229, 57, 80, .14); }
.err, .field-validation-error { color: var(--red); font-size: 12.5px; font-weight: 500; min-height: 0; }
.field-validation-valid { display: none; }
.inp-icon { position: relative; }
.inp-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--teal-400); pointer-events: none; font-size: 16px; }
.inp-icon > .inp { padding-left: 42px; }
.inp-icon > .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.inp-icon:focus-within > i { color: var(--teal); }

.alert {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 11px; font-size: 13.5px; margin-bottom: 16px;
    background: #fdecee; color: #9b1c2e; border: 1px solid #f8cdd3;
}
.alert ul { margin: 0; padding-left: 18px; }
.alert.info { background: var(--teal-50); color: var(--teal-900); border-color: var(--teal-100); }
.alert.warn { background: var(--gold-50); color: #7a5300; border-color: #f7dfa5; }
.validation-summary-valid { display: none; }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 13.5px; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 44px; height: 24px; border-radius: 99px; background: #c9d6d6; position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .track { background: var(--teal); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px rgba(11, 95, 102, .18); }

/* radio chips + department chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line);
    background: #fbfdfd; cursor: pointer; font-weight: 600; font-size: 13.5px; transition: all .15s;
}
.chip span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 2px solid #b5c7c7; transition: all .15s; }
.chip:hover span { border-color: var(--teal-400); }
.chip input:checked + span { border-color: var(--teal); background: var(--teal-50); color: var(--teal-900); }
.chip input:checked + span::before { background: var(--magenta); border-color: var(--magenta); }
.chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(11, 95, 102, .15); }

/* file upload */
.file {
    display: flex; align-items: center; gap: 12px; border: 1.5px dashed #b9cfcf; border-radius: var(--radius-sm); padding: 10px 12px;
    background: #fbfdfd; cursor: pointer; transition: all .15s; min-height: 58px;
}
.file:hover, .file:focus-within { border-color: var(--teal); background: var(--teal-50); }
.file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file .ico { width: 36px; height: 36px; border-radius: 9px; background: var(--teal-50); color: var(--teal); display: grid; place-items: center; font-size: 18px; flex: none; }
.file .txt { font-size: 13px; line-height: 1.3; min-width: 0; }
.file .txt b { display: block; color: var(--text); }
.file .txt small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.file.has-file { border-style: solid; border-color: var(--green); background: var(--green-50); }
.file.has-file .ico { background: #d9efc2; color: #3d7310; }
.doc-link { font-size: 12.5px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }

.form-foot {
    position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px 22px;
    background: rgba(255, 255, 255, .95); backdrop-filter: blur(6px); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius);
}

/* section nav (long forms) */
.sec-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; position: sticky; top: 72px; z-index: 6; }
.sec-nav a {
    padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--muted);
    display: inline-flex; align-items: center; gap: 7px; box-shadow: var(--shadow);
}
.sec-nav a:hover { color: var(--teal); border-color: var(--teal-100); }
.sec-nav a.bad { color: var(--red); border-color: #f8cdd3; }

/* =====================================================================
   Grid (list screens)
   ===================================================================== */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.toolbar .search { flex: 1 1 260px; min-width: 200px; }
.toolbar .inp { height: 40px; }
.toolbar select.inp { width: auto; min-width: 130px; }
.exports { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.exp {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line);
    background: #fff; color: var(--text); font: 600 12.5px var(--font); cursor: pointer; transition: all .15s;
}
.exp i { font-size: 15px; }
.exp:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: var(--text); }
.exp.copy i { color: var(--purple); } .exp.copy:hover { border-color: #ddd6f3; background: #f6f3fd; }
.exp.xlsx i { color: #1f8a46; } .exp.xlsx:hover { border-color: #c5e6d1; background: #f0faf4; }
.exp.csv i { color: var(--orange); } .exp.csv:hover { border-color: #f8d9b9; background: #fff6ec; }
.exp.pdf i { color: var(--red); } .exp.pdf:hover { border-color: #f8cdd3; background: #fdf0f2; }
.exp.print i { color: var(--teal); } .exp.print:hover { border-color: var(--teal-100); background: var(--teal-50); }

.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.8px; }
.grid thead th {
    position: sticky; top: 0; z-index: 1; text-align: left; font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .7px;
    color: var(--teal-900); background: var(--teal-50); padding: 12px 14px; border-bottom: 2px solid var(--teal-100); white-space: nowrap;
}
.grid tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; transition: background .15s; }
.grid tbody tr { position: relative; transition: transform .15s, box-shadow .15s; }
.grid tbody tr:nth-child(even) td { background: #fafcfc; }
.grid tbody tr:hover td { background: #e6f4f3; }
.grid tbody tr:hover td:first-child { box-shadow: inset 4px 0 0 var(--magenta); }
.grid tbody tr:hover { box-shadow: 0 6px 16px -10px rgba(6, 47, 51, .35); }
.grid td.actions-cell { white-space: nowrap; text-align: right; width: 1%; }
.grid .who { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.grid .who b { display: block; font-weight: 600; line-height: 1.25; }
.grid .who small { color: var(--muted); }
.thumb { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; background: var(--teal-50); flex: none; display: grid; place-items: center; color: var(--teal); font-weight: 700; font-family: var(--font-head); font-size: 16px; }
.code { font: 700 12.5px var(--font); color: var(--teal); background: var(--teal-50); padding: 3px 8px; border-radius: 7px; white-space: nowrap; }
.empty { text-align: center; padding: 50px 20px !important; color: var(--muted); }
.empty i { font-size: 38px; color: var(--teal-100); display: block; margin-bottom: 8px; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px; font-size: 13px; color: var(--muted); }
.pager .nav { display: flex; gap: 8px; }
.pager .size { display: flex; gap: 8px; align-items: center; }
.pager .size select { height: 34px; min-width: 76px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-ok { background: var(--green-50); color: #3d7310; }
.b-off { background: #eef1f1; color: #6a7b7c; }
.b-warn { background: var(--gold-50); color: #8a5d00; }
.b-bad { background: #fdecee; color: #b4243a; }
.tag { display: inline-block; padding: 2px 8px; margin: 1px 2px 1px 0; border-radius: 6px; font-size: 12px; font-weight: 600; background: #f0edfa; color: #5a4aa0; }

/* =====================================================================
   Dashboard
   ===================================================================== */
.hello {
    position: relative; overflow: hidden; border-radius: 18px; padding: 26px 28px; color: #fff; margin-bottom: 20px;
    background: linear-gradient(120deg, var(--teal-900), var(--teal) 55%, var(--teal-600));
}
.hello h1 { color: #fff; font-size: 30px; }
.hello p { margin: 6px 0 0; color: #cfe7e7; text-align: left; }
.hello .dots { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); width: 170px; height: 120px; opacity: .95; }
.hello .dots i { position: absolute; border-radius: 50%; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.tile {
    display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); color: var(--text); transition: transform .18s, box-shadow .18s;
}
a.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--text); }
.tile .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; color: #fff; flex: none; }
.tile .val { display: block; font-family: var(--font-head); font-size: 30px; font-weight: 700; line-height: 1; }
.tile .lbl { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 4px; }

.bday { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.bday:last-child { border-bottom: 0; }
.bday .when { margin-left: auto; text-align: right; font-size: 12.5px; }

/* =====================================================================
   Rights matrix
   ===================================================================== */
.rights td, .rights th { text-align: center; }
.rights td:first-child, .rights th:first-child { text-align: left; }
.rights .grp td { background: var(--teal-50) !important; font: 700 12px var(--font); text-transform: uppercase; letter-spacing: 1px; color: var(--teal); padding: 8px 14px; }
.rights tr.custom td:first-child { box-shadow: inset 4px 0 0 var(--gold); }
.rights .custom-tag { display: none; margin-left: 8px; font-size: 11px; font-weight: 700; color: #8a5d00; background: var(--gold-50); padding: 2px 7px; border-radius: 6px; }
.rights tr.custom .custom-tag { display: inline-block; }
.ck { position: relative; display: inline-block; width: 22px; height: 22px; cursor: pointer; }
.ck input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ck span { position: absolute; inset: 0; border: 2px solid #b5c7c7; border-radius: 7px; background: #fff; transition: all .15s; }
.ck input:checked + span { background: var(--teal); border-color: var(--teal); }
.ck input:checked + span::after {
    content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.ck input:focus-visible + span { box-shadow: 0 0 0 4px rgba(11, 95, 102, .18); }
.ck input:disabled + span { background: var(--line-soft); border-color: var(--line); cursor: not-allowed; }
.ck input:disabled { cursor: not-allowed; }
.na { color: #b5c7c7; }

/* detail view */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 22px; }
.dl div > span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.dl div > b { font-weight: 600; word-break: break-word; }
.profile { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile .pic { width: 92px; height: 92px; border-radius: 22px; object-fit: cover; border: 3px solid #fff; box-shadow: var(--shadow-lg); background: var(--teal-50); display: grid; place-items: center; font: 700 34px var(--font-head); color: var(--teal); }
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.doc { border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; background: #fbfdfd; }
.doc .pv { height: 110px; border-radius: 8px; background: var(--teal-50); display: grid; place-items: center; overflow: hidden; margin-bottom: 8px; color: var(--teal); font-size: 34px; }
.doc .pv img { width: 100%; height: 100%; object-fit: cover; }
.doc b { font-size: 12.5px; display: block; }

/* =====================================================================
   Loader, toasts, confirm dialog
   ===================================================================== */
.loader {
    position: fixed; inset: 0; z-index: 1000; display: none; place-items: center;
    background: rgba(242, 246, 246, .55); backdrop-filter: blur(3px);
}
.loader.show { display: grid; animation: fade .15s ease; }
.loader-box { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 34px; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); }
.orbit { position: relative; width: 64px; height: 64px; }
.orbit::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; border: 9px solid var(--teal); border-right-color: transparent; animation: rot 1s linear infinite; }
.orbit i { position: absolute; width: 10px; height: 10px; border-radius: 50%; top: 50%; left: 50%; margin: -5px; animation: orbit 1.4s linear infinite; }
.orbit i:nth-child(1) { background: var(--magenta); }
.orbit i:nth-child(2) { background: var(--gold); animation-delay: -.35s; }
.orbit i:nth-child(3) { background: var(--green); animation-delay: -.7s; }
.orbit i:nth-child(4) { background: var(--purple); animation-delay: -1.05s; }
@keyframes orbit { from { transform: rotate(0) translateX(34px) rotate(0); } to { transform: rotate(360deg) translateX(34px) rotate(-360deg); } }
.loader-box b { font-family: var(--font-head); font-size: 17px; color: var(--teal-900); letter-spacing: .4px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.toasts { position: fixed; top: 76px; right: 18px; z-index: 1100; display: flex; flex-direction: column; gap: 10px; max-width: min(400px, calc(100vw - 36px)); }
.toast {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 13px; background: #fff; box-shadow: var(--shadow-lg);
    border-left: 5px solid var(--teal); font-size: 13.8px; animation: slide .25s ease;
}
.toast i { font-size: 19px; color: var(--teal); }
.toast.success { border-color: var(--green); } .toast.success i { color: var(--green); }
.toast.error { border-color: var(--red); } .toast.error i { color: var(--red); }
.toast.info { border-color: var(--sky); } .toast.info i { color: var(--sky); }
.toast .x { margin-left: auto; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 16px; }
@keyframes slide { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

.modal { position: fixed; inset: 0; z-index: 1050; display: none; place-items: center; background: rgba(6, 47, 51, .45); padding: 16px; }
.modal.show { display: grid; animation: fade .15s; }
.modal-box { width: min(440px, 100%); background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 24px; text-align: center; animation: pop .18s; }
.modal-box .big { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: #fdecee; color: var(--red); }
.modal-box h3 { font-size: 22px; margin-bottom: 6px; }
.modal-box p { color: var(--muted); text-align: center; margin: 0 0 20px; }
.modal-box .actions { justify-content: center; }

/* =====================================================================
   Sign-in pages
   ===================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.auth-art {
    position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
    background: radial-gradient(70% 50% at 85% 10%, rgba(216, 27, 96, .35), transparent 70%),
                radial-gradient(60% 50% at 10% 95%, rgba(242, 179, 61, .25), transparent 70%),
                linear-gradient(160deg, var(--teal-950), var(--teal) 70%);
}
.auth-art h2 { color: #fff; font-size: 42px; line-height: 1.05; max-width: 460px; }
.auth-art h2 em { font-style: normal; color: var(--gold); }
.auth-art p { color: #cfe7e7; max-width: 440px; text-align: left; }
.auth-art .bubbles i { position: absolute; border-radius: 50%; opacity: .9; animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px); } }
.auth-art .pill { align-self: flex-start; display: inline-flex; gap: 8px; align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); padding: 6px 14px; border-radius: 99px; font-size: 13px; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: min(430px, 100%); }
.auth-card .logo { display: block; width: 230px; margin: 0 auto 22px; }
.auth-card .card { padding: 30px; }
.auth-card h1 { font-size: 30px; }
.auth-card .sub { color: var(--muted); margin: 4px 0 22px; font-size: 14px; }
.auth-card .lang { width: max-content; margin: 18px auto 0; }
.link-row { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 18px; font-size: 13px; }
.otp { letter-spacing: 12px; font-size: 24px !important; text-align: center; font-weight: 700 !important; height: 56px !important; }

.error-page { text-align: center; padding: 60px 20px; }
.error-page .code-big { font-family: var(--font-head); font-size: 96px; font-weight: 700; line-height: 1; background: linear-gradient(90deg, var(--teal), var(--magenta)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1100px) {
    .col-3 { grid-column: span 6; } .col-4 { grid-column: span 6; } .col-8 { grid-column: span 12; }
}
@media (max-width: 991px) {
    .side { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    body.nav-open .side { transform: none; }
    body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(6, 47, 51, .45); }
    .main { margin-left: 0; }
    .burger { display: grid; place-items: center; }
    .top { padding: 0 14px; }
    .content { padding: 18px 16px; }
    .user-name, .user-role { display: none; }
    .auth { grid-template-columns: 1fr; }
    .auth-art { display: none; }
}
@media (max-width: 720px) {
    .col-3, .col-4, .col-6 { grid-column: span 12; }
    .page-head h1 { font-size: 24px; }
    .top-title { font-size: 19px; }
    .lang { padding-left: 8px; } .lang i { display: none; }
    .exports { margin-left: 0; width: 100%; }
    .exp span { display: none; }
    .exp { flex: 1; justify-content: center; }
    .toolbar select.inp { flex: 1 1 120px; }
    .card-pad { padding: 16px; }
    .card-head { padding: 14px 16px; }
    .form-foot { padding: 12px 16px; }
    .form-foot .btn { flex: 1; }
    .hello .dots { display: none; }

    /* Grid rows become cards on phones */
    table.grid.stack-sm thead { display: none; }
    table.grid.stack-sm, table.grid.stack-sm tbody, table.grid.stack-sm tr, table.grid.stack-sm td { display: block; width: 100%; }
    table.grid.stack-sm tr { border-bottom: 8px solid var(--bg); padding: 6px 0; }
    table.grid.stack-sm tbody tr:hover td:first-child { box-shadow: none; }
    table.grid.stack-sm td { display: flex; justify-content: space-between; gap: 14px; border: 0; padding: 7px 14px; text-align: right; background: transparent !important; }
    table.grid.stack-sm td::before { content: attr(data-label); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); text-align: left; flex: none; }
    table.grid.stack-sm td.actions-cell { width: 100%; justify-content: flex-end; border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 10px; }
    table.grid.stack-sm td.actions-cell::before { content: none; }
    table.grid.stack-sm td.empty { display: block; text-align: center; }
    table.grid.stack-sm td.empty::before { content: none; }
    table.grid.stack-sm .who { min-width: 0; justify-content: flex-end; text-align: right; }
    .rights td, .rights th { padding: 10px 6px !important; }
}

@media print {
    .side, .top, .toolbar, .pager, .form-foot, .actions, .foot { display: none !important; }
    .main { margin: 0; }
}
