/* DataIQ Labs - sign in, student account, invoices, admin additions */
:root { --ac-card: #FFFFFF; --ac-bg: #F3F6F9; --ac-text: #0F1821; --ac-muted: #64748B; --ac-line: #E2E8F0; --ac-soft: #EDF2F6; --ac-red: #FF0042; --ac-teal: #003554; --ac-ease: cubic-bezier(.22,1,.36,1); }
:root[data-theme="dark"] { --ac-card: #172533; --ac-bg: #0F1821; --ac-text: #FFFFFF; --ac-muted: #A7B4C2; --ac-line: #26384A; --ac-soft: #1E3044; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --ac-card: #172533; --ac-bg: #0F1821; --ac-text: #FFFFFF; --ac-muted: #A7B4C2; --ac-line: #26384A; --ac-soft: #1E3044; } }

/* page shell */
.acct-page { background: var(--ac-bg); color: var(--ac-text); min-height: 70vh; padding: calc(var(--header-h, 76px) + 40px) 16px 80px; }
.acct-page--center { display: flex; align-items: flex-start; justify-content: center; }
.acct-wrap { max-width: 920px; margin: 0 auto; }
@media (max-width: 767px) { .acct-page { padding: 12px 16px 96px; } }

/* sign in card */
.acct-auth { width: 100%; max-width: 440px; background: var(--ac-card); border: 1px solid var(--ac-line); border-radius: 22px; padding: 32px; box-shadow: 0 18px 44px rgba(15,24,33,.10); }
.acct-auth__head { text-align: center; margin-bottom: 18px; }
.acct-auth__head h1 { font: 600 24px/1.2 Poppins, Inter, sans-serif; margin: 12px 0 6px; color: var(--ac-text); }
.acct-auth__head p { margin: 0; color: var(--ac-muted); font-size: 14px; }
.acct-auth__mark { display: inline-flex; width: 48px; height: 48px; border-radius: 14px; align-items: center; justify-content: center; background: var(--ac-teal); color: #fff; }
.acct-auth__help { margin: 18px 0 0; font-size: 13px; color: var(--ac-muted); text-align: center; }
.acct-auth__help a { color: var(--ac-red); font-weight: 600; }
@media (max-width: 767px) { .acct-auth { padding: 24px 20px; border-radius: 20px; } }

/* forms */
.acct-form { display: flex; flex-direction: column; gap: 14px; }
.acct-form--narrow { max-width: 460px; }
.acct-form--inline { margin-top: 12px; }
.acct-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .acct-grid2 { grid-template-columns: 1fr; } }
.acct-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ac-text); }
.acct-input { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--ac-line); background: var(--ac-card); color: var(--ac-text); font: 500 15px Inter, sans-serif; transition: border-color .2s var(--ac-ease), box-shadow .2s var(--ac-ease); }
.acct-input:focus { outline: none; border-color: var(--ac-red); box-shadow: 0 0 0 3px rgba(255,0,66,.16); }
.acct-input:disabled { opacity: .6; }
.acct-pw { position: relative; display: block; }
.acct-pw .acct-input { padding-right: 48px; }
.acct-pw__t { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: transparent; color: var(--ac-muted); border-radius: 10px; cursor: pointer; transition: color .2s, background .2s; }
.acct-pw__t:hover, .acct-pw__t[aria-pressed="true"] { color: var(--ac-red); background: rgba(255,0,66,.08); }
.acct-submit.is-loading { pointer-events: none; opacity: .75; }
.acct-submit.is-loading::after { content: ""; width: 14px; height: 14px; margin-left: 10px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; vertical-align: -2px; animation: acSpin .7s linear infinite; }
@keyframes acSpin { to { transform: rotate(360deg); } }

/* notes */
.acct-note { padding: 12px 14px; border-radius: 12px; font-size: 13.5px; margin-bottom: 14px; border: 1px solid transparent; }
.acct-note a { color: inherit; font-weight: 600; text-decoration: underline; }
.acct-note--err { background: rgba(185,28,28,.10); color: #B91C1C; border-color: rgba(185,28,28,.25); }
.acct-note--ok { background: rgba(21,128,61,.10); color: #15803D; border-color: rgba(21,128,61,.25); }
.acct-note--warn { background: rgba(255,0,66,.08); color: var(--ac-text); border-color: rgba(255,0,66,.25); }
:root[data-theme="dark"] .acct-note--err { color: #FCA5A5; } :root[data-theme="dark"] .acct-note--ok { color: #86EFAC; }
.acct-muted { color: var(--ac-muted); font-size: 12.5px; }

/* account hero + tabs */
.acct-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--ac-card); border: 1px solid var(--ac-line); border-radius: 20px; padding: 18px 20px; }
.acct-hero__av { width: 52px; height: 52px; border-radius: 16px; background: var(--ac-teal); color: #fff; display: grid; place-items: center; font: 600 20px Poppins, sans-serif; flex: none; }
.acct-hero__t { flex: 1 1 200px; min-width: 0; }
.acct-hero__t h1 { margin: 0; font: 600 20px/1.2 Poppins, sans-serif; color: var(--ac-text); }
.acct-hero__t p { margin: 3px 0 0; font-size: 13px; color: var(--ac-muted); overflow-wrap: anywhere; }
.acct-tabs { display: flex; gap: 6px; margin: 18px 0; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.acct-tabs::-webkit-scrollbar { display: none; }
.acct-tabs__t { position: relative; flex: none; min-height: 42px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; border: 1px solid var(--ac-line); background: var(--ac-card); color: var(--ac-muted); font: 600 13.5px Inter, sans-serif; text-decoration: none; transition: background .2s var(--ac-ease), color .2s var(--ac-ease), border-color .2s var(--ac-ease); }
.acct-tabs__t:hover { color: var(--ac-text); border-color: var(--ac-red); }
.acct-tabs__t.is-on { background: var(--ac-red); border-color: var(--ac-red); color: #fff; }
.acct-tabs__t i { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: rgba(255,255,255,.25); font-size: 11.5px; display: grid; place-items: center; }
.acct-tabs__t:not(.is-on) i { background: var(--ac-red); color: #fff; }

/* cards, stats */
.acct-card { background: var(--ac-card); border: 1px solid var(--ac-line); border-radius: 20px; padding: 22px; }
.acct-card h2 { margin: 0 0 14px; font: 600 17px Poppins, sans-serif; color: var(--ac-text); }
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 700px) { .acct-stats { grid-template-columns: 1fr; } }
.acct-stat { background: var(--ac-card); border: 1px solid var(--ac-line); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; transition: transform .25s var(--ac-ease), box-shadow .25s var(--ac-ease); }
.acct-stat:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,24,33,.10); }
.acct-stat small { color: var(--ac-muted); font: 500 11.5px "JetBrains Mono", monospace; letter-spacing: .05em; text-transform: uppercase; }
.acct-stat strong { font: 600 19px/1.25 Poppins, sans-serif; color: var(--ac-text); }
.acct-stat span { color: var(--ac-muted); font-size: 12.5px; }

/* invoices */
.acct-inv-list { display: flex; flex-direction: column; gap: 12px; }
.acct-inv { background: var(--ac-card); border: 1px solid var(--ac-line); border-radius: 18px; padding: 16px 18px; }
.acct-inv__top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.acct-inv__top strong { display: block; font: 600 15px Poppins, sans-serif; color: var(--ac-text); }
.acct-inv__top small { color: var(--ac-muted); font-size: 12.5px; }
.acct-inv__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.acct-inv__meta small { display: block; color: var(--ac-muted); font-size: 11.5px; }
.acct-inv__meta b { font: 600 14px Inter, sans-serif; color: var(--ac-text); }
.acct-inv__act { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-inv__act .btn { min-height: 42px; }
.acct-inv__hint { margin: 12px 0 0; font-size: 13px; color: var(--ac-muted); }
.acct-inv__hint a { color: var(--ac-red); font-weight: 600; }
@media (max-width: 520px) { .acct-inv__meta { grid-template-columns: 1fr 1fr; } }
.acct-chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font: 600 11.5px Inter, sans-serif; white-space: nowrap; background: var(--ac-soft); color: var(--ac-muted); }
.acct-chip--pending { background: rgba(255,0,66,.10); color: #D1003A; }
.acct-chip--submitted { background: rgba(217,119,6,.14); color: #B45309; }
.acct-chip--paid { background: rgba(21,128,61,.14); color: #15803D; }
.acct-chip--cancelled { background: var(--ac-soft); color: var(--ac-muted); }
:root[data-theme="dark"] .acct-chip--pending { color: #FF6B8F; } :root[data-theme="dark"] .acct-chip--submitted { color: #FBBF24; } :root[data-theme="dark"] .acct-chip--paid { color: #86EFAC; }

/* smooth accordion (UPI panel) */
.acct-acc { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ac-ease); }
.acct-acc.is-open { grid-template-rows: 1fr; }
.acct-acc__in { overflow: hidden; min-height: 0; }
.acct-acc__body { margin-top: 14px; padding: 16px; border-radius: 14px; background: var(--ac-soft); border-left: 3px solid var(--ac-red); font-size: 14px; color: var(--ac-text); }
.acct-acc__body p { margin: 0 0 10px; }
.acct-copy { cursor: copy; border-bottom: 1px dashed var(--ac-muted); }
.acct-copy.is-copied { color: #15803D; border-color: #15803D; }
.acct-upi-open { margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) { .acct-acc, .acct-stat, .acct-tabs__t { transition: none; } }

/* header: login button, account menu, phone profile icon */
.header-login { gap: 8px; display: inline-flex; align-items: center; }
.acct-menu { position: relative; }
.acct-menu__btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px 0 4px; border-radius: 999px; border: 1.5px solid var(--ac-line); background: var(--ac-card); color: var(--ac-text); cursor: pointer; transition: border-color .2s var(--ac-ease), box-shadow .2s var(--ac-ease); }
.acct-menu__btn:hover, .acct-menu__btn[aria-expanded="true"] { border-color: var(--ac-red); box-shadow: 0 4px 14px rgba(255,0,66,.14); }
.acct-menu__btn svg { transition: transform .25s var(--ac-ease); }
.acct-menu__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.acct-menu__av { width: 30px; height: 30px; border-radius: 50%; background: var(--ac-red); color: #fff; display: grid; place-items: center; font: 600 13px Poppins, sans-serif; }
.acct-menu__panel { position: absolute; right: 0; top: calc(100% + 10px); min-width: 236px; padding: 8px; border-radius: 16px; background: var(--ac-card); border: 1px solid var(--ac-line); box-shadow: 0 18px 40px rgba(15,24,33,.16); opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none; transition: opacity .22s var(--ac-ease), transform .22s var(--ac-ease); z-index: 60; }
.acct-menu__panel:not([hidden]) { display: block; }
.acct-menu__panel[hidden] { display: block; visibility: hidden; }
.acct-menu.is-open .acct-menu__panel { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
.acct-menu__who { padding: 10px 12px 12px; border-bottom: 1px solid var(--ac-line); margin-bottom: 6px; }
.acct-menu__who strong { display: block; font: 600 14px Poppins, sans-serif; color: var(--ac-text); }
.acct-menu__who small { color: var(--ac-muted); font-size: 12px; overflow-wrap: anywhere; }
.acct-menu__panel a { display: block; padding: 11px 12px; border-radius: 10px; color: var(--ac-text); font: 500 14px Inter, sans-serif; text-decoration: none; transition: background .15s, color .15s; }
.acct-menu__panel a:hover, .acct-menu__panel a:focus-visible { background: rgba(255,0,66,.08); color: var(--ac-red); outline: none; }
.acct-menu__panel a.is-out { color: #B91C1C; }
@media (max-width: 767px) { .header-login, .acct-menu { display: none; } }
@media (prefers-reduced-motion: reduce) { .acct-menu__panel, .acct-menu__btn svg { transition: none; } }
.app-ib--user.is-in b { width: 26px; height: 26px; border-radius: 50%; background: #FF0042; color: #fff; display: grid; place-items: center; font: 600 12px Poppins, sans-serif; }

/* admin additions */
.admin-nav__badge { margin-left: auto; background: #FF0042; color: #fff; padding: 2px 8px; border-radius: 12px; font-size: .6875rem; }
.admin-user { flex-wrap: wrap; } .admin-user__role { display: block; color: var(--ac-muted, #64748B); font-size: 11px; line-height: 1.2; }
.acct-link { background: none; border: 0; padding: 0; margin: 0 0 0 10px; font: inherit; color: var(--ac-teal); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
:root[data-theme="dark"] .acct-link { color: #7CC4E8; } .acct-link:hover { color: var(--ac-red); }
.admin-table__actions form { margin: 0; }
.acct-cred { background: var(--ac-card); border: 1.5px solid var(--ac-red); border-radius: 16px; padding: 16px 18px; margin-bottom: 18px; color: var(--ac-text); }
.acct-cred p { margin: 6px 0; } .acct-cred small { color: var(--ac-muted); }
.acct-kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .acct-kv { grid-template-columns: 1fr 1fr; } } @media (max-width: 520px) { .acct-kv { grid-template-columns: 1fr; } }
.acct-kv small { display: block; color: var(--ac-muted); font: 500 11px "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .05em; }
.acct-kv b { display: block; font: 600 16px Poppins, sans-serif; margin: 3px 0; } .acct-kv span { color: var(--ac-muted); font-size: 12.5px; }
.acct-inline-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; } .acct-inline-form .form-field { min-width: 200px; }
.acct-settings { display: flex; flex-direction: column; gap: 4px; }

/* toggle switch (permissions, payment settings) */
.acct-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 44px; }
.acct-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.acct-switch__t { position: relative; width: 44px; height: 26px; border-radius: 999px; background: #CBD5E1; flex: none; box-shadow: inset 0 1px 3px rgba(15,24,33,.2); transition: background .25s var(--ac-ease); }
.acct-switch__t::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(15,24,33,.3); transition: transform .28s var(--ac-ease); }
.acct-switch input:checked + .acct-switch__t { background: var(--ac-red); }
.acct-switch input:checked + .acct-switch__t::after { transform: translateX(18px); }
.acct-switch input:focus-visible + .acct-switch__t { outline: 2px solid var(--ac-teal); outline-offset: 2px; }
.acct-switch__l { font-size: 14px; color: var(--ac-text); }
:root[data-theme="dark"] .acct-switch__t { background: #3A4D61; }
@media (prefers-reduced-motion: reduce) { .acct-switch__t, .acct-switch__t::after { transition: none; } }

/* roles and permissions */
.acct-roles { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; } .acct-roles legend { font-weight: 600; font-size: 13px; margin-bottom: 8px; padding: 0; }
.acct-role { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--ac-line); border-radius: 14px; cursor: pointer; background: var(--ac-card); transition: border-color .2s, background .2s; }
.acct-role:hover { border-color: var(--ac-red); } .acct-role:has(input:checked) { border-color: var(--ac-red); background: rgba(255,0,66,.06); }
.acct-role input { position: absolute; opacity: 0; } .acct-role strong { display: block; font-size: 14px; } .acct-role small { color: var(--ac-muted); font-size: 12.5px; }
.acct-role__box { width: 20px; height: 20px; flex: none; border-radius: 6px; border: 2px solid var(--ac-line); margin-top: 1px; display: grid; place-items: center; transition: all .2s var(--ac-ease); }
.acct-role input:checked ~ .acct-role__box { background: var(--ac-red); border-color: var(--ac-red); }
.acct-role input:checked ~ .acct-role__box::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.acct-role input:focus-visible ~ .acct-role__box { outline: 2px solid var(--ac-teal); outline-offset: 2px; }
.acct-perms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; } @media (max-width: 800px) { .acct-perms { grid-template-columns: 1fr; } }
.acct-perm-group { border: 1px solid var(--ac-line); border-radius: 16px; padding: 10px 16px 8px; background: var(--ac-card); margin: 0; }
.acct-perm-group legend { font: 600 12px "JetBrains Mono", monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--ac-teal); padding: 0 8px; }
:root[data-theme="dark"] .acct-perm-group legend { color: #7CC4E8; }
.acct-switch--row { display: flex; width: 100%; justify-content: space-between; flex-direction: row-reverse; border-bottom: 1px solid var(--ac-line); } .acct-perm-group .acct-switch--row:last-child { border-bottom: 0; }

/* no access */
.acct-denied { background: var(--ac-bg); min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.acct-denied__box { max-width: 460px; background: var(--ac-card); border: 1px solid var(--ac-line); border-radius: 20px; padding: 32px; text-align: center; color: var(--ac-text); }
.acct-denied__box h1 { font: 600 20px Poppins, sans-serif; margin: 0 0 10px; } .acct-denied__box p { color: var(--ac-muted); margin: 0 0 20px; }

@media (max-width: 767px) { .acct-page { background: transparent; } }
