/* ═══════════════════════════════════════════
LIQUID GLASS DESIGN SYSTEM
Based on Apple WWDC 2025 aesthetic
═══════════════════════════════════════════ */
:root {
  --ui-scale: 1;
  --icon-scale: 1;
  --line-height: 1.55;

  --font-family: 'Heebo', sans-serif;
  --radius: 22px;
  --radius-sm: 14px;
  --radius-xs: 8px;
  --radius-pill: 9999px;
  --sw: 13.5rem;
  --tr: 0.3s;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Brand */
  --hue: 357;
  --red: #e01a24;
  --red2: #c0121b;
  --red-soft: rgba(224, 26, 36, .1);

  --accent: #4b8df8;
  --accent2: #8B5CF6;
  --accent3: #10b981;
  --accent4: #f59e0b;
  --danger: #f43f5e;
}

/* ── Light mode ── */
[data-theme="light"],
:root {
  --bg: #dce6f5;
  --bg2: #c8d8ef;
  --sur: rgba(255, 255, 255, 0.72);
  /* more opaque → better text contrast */
  --sur-solid: #ffffff;
  --sur2: rgba(255, 255, 255, 0.55);
  /* raised from 0.35 */
  --brd: rgba(255, 255, 255, 0.75);
  --brd2: rgba(0, 0, 40, 0.1);
  --txt: #0f172a;
  /* slightly deeper */
  --muted: #374151;
  /* was #6b7280 — WCAG AA on glass */
  --muted2: #6b7280;
  /* softer secondary muted */
  --ibg: rgba(255, 255, 255, 0.8);

  /* Shadow layers */
  --shadow-sm: 0 2px 8px rgba(100, 120, 180, .12), 0 0 0 1px rgba(255, 255, 255, .55) inset;
  --shadow-md: 0 8px 32px rgba(80, 100, 160, .18), 0 0 0 1px rgba(255, 255, 255, .65) inset;
  --shadow-lg: 0 20px 60px rgba(60, 80, 140, .22), 0 0 0 1px rgba(255, 255, 255, .7) inset;
  --shadow-glow: 0 0 24px rgba(224, 26, 36, .2);

  --glass-spec: linear-gradient(135deg,
      rgba(255, 255, 255, 0.75) 0%,
      rgba(255, 255, 255, 0.15) 40%,
      rgba(255, 255, 255, 0.03) 100%);
  --glass-border: 1px solid rgba(255, 255, 255, 0.7);
  --glass-blur: blur(20px) saturate(1.6) brightness(1.03);
}

/* ── Dark mode ── */
[data-theme="dark"] {
  --bg: #0d1117;
  --bg2: #161b22;
  --sur: rgba(25, 30, 48, 0.78);
  /* more opaque for dark glass */
  --sur-solid: #1c2030;
  --sur2: rgba(255, 255, 255, 0.09);
  /* just visible contrast */
  --brd: rgba(255, 255, 255, 0.14);
  --brd2: rgba(0, 0, 0, 0.45);
  --txt: #f0f4ff;
  /* brighter text */
  --muted: #a8b3cc;
  /* was #8b91a8 — better on dark glass */
  --muted2: #8b91a8;
  --ibg: rgba(255, 255, 255, 0.1);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  --shadow-md: 0 8px 32px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .08) inset;
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .1) inset;
  --shadow-glow: 0 0 28px rgba(224, 26, 36, .3);

  --glass-spec: linear-gradient(135deg,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(255, 255, 255, 0.04) 50%,
      transparent 100%);
  --glass-border: 1px solid rgba(255, 255, 255, 0.12);
  --glass-blur: blur(24px) saturate(1.6) brightness(0.95);
}

/* ══ NOISE GRAIN TEXTURE ══ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(140, 180, 255, .55) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 85% 85%, rgba(190, 140, 255, .45) 0%, transparent 55%),
    radial-gradient(ellipse 70% 55% at 55% 50%, rgba(100, 200, 240, .3) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(255, 160, 120, .3) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--txt);
  direction: rtl;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: var(--line-height);
  transition: background-color var(--tr), color var(--tr);
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .15);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, .25);
}

/* ══ GLASS MIXIN ══ */
.glass {
  background: var(--sur);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--glass-spec);
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}

.glass>* {
  position: relative;
  z-index: 1;
}

/* ══ LOGIN ══ */
#login-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(140, 180, 255, .55) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 85% 85%, rgba(190, 140, 255, .45) 0%, transparent 55%);
  background-attachment: fixed;
}

.lbox {
  background: var(--sur);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 40px 46px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.lbox::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 45%;
  background: var(--glass-spec);
  pointer-events: none;
  border-radius: var(--radius) var(--radius) 60% 60%;
}

.l-logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
  position: relative;
}

.l-logo-svg {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.l-brand {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--txt);
  line-height: 1.25;
}

.l-brand span {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--red);
  margin-top: 2px;
}

.lsub {
  color: var(--muted);
  font-size: .78rem;
  margin-bottom: 22px;
  border-top: 1px solid var(--brd2);
  padding-top: 12px;
  position: relative;
}

.lbox label {
  display: block;
  font-size: .65rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 4px;
}

.lbox input {
  width: 100%;
  background: var(--ibg);
  backdrop-filter: blur(8px);
  border: var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--txt);
  font-family: var(--font-family);
  font-size: .9rem;
  margin-bottom: 13px;
  transition: all .2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06) inset;
}

.lbox input:focus {
  outline: none;
  border-color: rgba(224, 26, 36, .5);
  box-shadow: 0 0 0 3px rgba(224, 26, 36, .15), 0 1px 4px rgba(0, 0, 0, .06) inset;
}

.lbtn {
  width: 100%;
  background: var(--red);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  color: #fff;
  font-family: var(--font-family);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s var(--spring);
  box-shadow: 0 4px 18px rgba(224, 26, 36, .35), 0 0 0 1px rgba(255, 255, 255, .15) inset;
  position: relative;
  overflow: hidden;
}

.lbtn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .2), transparent);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  pointer-events: none;
}

.lbtn:hover {
  background: var(--red2);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(224, 26, 36, .45), 0 0 0 1px rgba(255, 255, 255, .2) inset;
}

.lbtn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(224, 26, 36, .3);
}

.lerr {
  color: var(--red);
  font-size: .76rem;
  text-align: center;
  margin-top: 8px;
  min-height: 16px;
}

.lhint {
  margin-top: 12px;
  font-size: .66rem;
  color: var(--muted);
  text-align: center;
}

/* ══ LAYOUT ══ */
#app {
  display: none;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--sw);
  height: 100vh;
  background: var(--sur);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-left: var(--glass-border);
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  transition: background var(--tr);
}

.sb-brand {
  padding: 1.1rem 1rem 0.85rem;
  border-bottom: 1px solid var(--brd2);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.sb-logo {
  width: 2.4rem;
  height: 2.4rem;
  flex-shrink: 0;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.sb-name {
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--txt);
}

.sb-name span {
  display: block;
  font-size: .64rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 1px;
}

.sb-user {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--brd2);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.uav {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .78rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(224, 26, 36, .35);
}

.uname {
  font-size: .8rem;
  font-weight: 700;
}

.urole {
  font-size: .64rem;
  color: var(--muted);
}

.nav-sec {
  padding: 10px 14px 4px;
  font-size: .59rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
}

.ni {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.6rem;
  margin: 2px 5px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .81rem;
  font-weight: 600;
  color: var(--txt);
  transition: all 0.2s var(--spring);
}

.ni:hover {
  color: var(--txt);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  transform: translateX(-2px);
}

.ni.active {
  color: var(--red);
  background: rgba(224, 26, 36, .12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(224, 26, 36, .25);
  box-shadow: 0 2px 10px rgba(224, 26, 36, .12), 0 0 0 1px rgba(255, 255, 255, .5) inset;
  font-weight: 800;
}

.ni .ic {
  width: 17px;
  text-align: center;
  font-size: .88rem;
}

.nbadge {
  margin-right: auto;
  background: var(--danger);
  color: #fff;
  font-size: .6rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.sb-bot {
  margin-top: auto;
  border-top: 1px solid var(--brd2);
}

.theme-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: .79rem;
  color: var(--muted);
  transition: color .2s;
}

.theme-row:hover {
  color: var(--txt);
}

.tswitch {
  width: 2.1rem;
  height: 1.2rem;
  background: var(--brd2);
  border-radius: var(--radius-pill);
  position: relative;
  flex-shrink: 0;
  transition: background .2s;
  border: 1px solid var(--brd);
}

.tswitch.on {
  background: var(--accent2);
}

.tswitch::after {
  content: '';
  position: absolute;
  top: .15rem;
  right: .15rem;
  width: .9rem;
  height: .9rem;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s var(--spring);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

.tswitch.on::after {
  transform: translateX(-.9rem);
}

.logout-r {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: .79rem;
  color: var(--danger);
  transition: opacity .2s;
}

.logout-r:hover {
  opacity: .7;
}

.main {
  margin-right: var(--sw);
  padding: 1rem;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--brd2);
}

.ptitle {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--txt);
  line-height: 1.1;
  letter-spacing: -.02em;
  text-shadow: 0 1px 2px rgba(255, 255, 255, .5);
}

.ptitle span {
  color: var(--muted);
  font-weight: 500;
  font-size: 1.05rem;
  margin-right: 8px;
}

/* ══ BUTTONS ══ */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: .84rem;
  cursor: pointer;
  transition: all 0.2s var(--spring);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .18), transparent);
  pointer-events: none;
  border-radius: var(--radius-sm) var(--radius-sm) 60% 60%;
}

.btn:active {
  transform: scale(0.96);
}

.btn-r {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 16px rgba(224, 26, 36, .35), 0 0 0 1px rgba(255, 255, 255, .15) inset;
}

.btn-r:hover {
  background: var(--red2);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(224, 26, 36, .45);
}

.btn-p {
  background: var(--accent2);
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 92, 246, .35), 0 0 0 1px rgba(255, 255, 255, .15) inset;
}

.btn-p:hover {
  opacity: .9;
  transform: translateY(-1px);
}

.btn-g {
  background: var(--sur);
  color: var(--muted);
  backdrop-filter: blur(12px);
  border: var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.btn-g:hover {
  background: rgba(255, 255, 255, .7);
  color: var(--txt);
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: .74rem;
}

/* ══ TABS ══ */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ── Tab enter animation ── */
@keyframes tabFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-pane.tab-entering {
  animation: tabFadeUp .32s cubic-bezier(.22, 1, .36, 1) forwards;
}

.tab-pane.tab-entering>.anim-item {
  opacity: 0;
  animation: tabFadeUp .32s cubic-bezier(.22, 1, .36, 1) forwards;
}

.tab-pane.tab-entering>.anim-item:nth-child(1) {
  animation-delay: .00s;
}

.tab-pane.tab-entering>.anim-item:nth-child(2) {
  animation-delay: .05s;
}

.tab-pane.tab-entering>.anim-item:nth-child(3) {
  animation-delay: .10s;
}

.tab-pane.tab-entering>.anim-item:nth-child(4) {
  animation-delay: .15s;
}

.tab-pane.tab-entering>.anim-item:nth-child(5) {
  animation-delay: .19s;
}

.tab-pane.tab-entering>.anim-item:nth-child(6) {
  animation-delay: .22s;
}

.tab-pane.tab-entering>.anim-item:nth-child(n+7) {
  animation-delay: .24s;
}

/* ══ CALENDAR MODAL ══ */
#cal-event-modal input,
#cal-event-modal select,
#cal-event-modal textarea,
#cal-event-modal button,
#cal-event-modal label,
#cal-event-modal summary {
  font-family: var(--font-family);
}

/* ══ CARDS (LIQUID GLASS) ══ */
.card {
  background: var(--sur);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius);
  transition: box-shadow var(--tr), transform var(--tr);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--glass-spec);
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}

.card>* {
  position: relative;
  z-index: 1;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.sc {
  padding: 20px;
}

.slabel {
  font-size: .72rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 6px;
}

.sval {
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
}

.ssub {
  font-size: .67rem;
  color: var(--muted);
  margin-top: 4px;
}

.cR {
  color: var(--red);
}

.cA {
  color: var(--accent4);
}

.cG {
  color: var(--accent3);
}

.cD {
  color: var(--danger);
}

.cg3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.ccp {
  padding: 18px;
}

.ctitle {
  font-size: .68rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}

.chwrap {
  position: relative;
  height: 175px;
}

.prow {
  margin-bottom: 9px;
}

.plabel {
  display: flex;
  justify-content: space-between;
  font-size: .69rem;
  color: var(--muted);
  margin-bottom: 3px;
}

.ptrack {
  flex: 1;
  height: 5px;
  background: rgba(0, 0, 0, .08);
  border-radius: 9999px;
  overflow: hidden;
}

.pfill {
  height: 100%;
  background: var(--red);
  border-radius: 9999px;
  transition: width 0.6s cubic-bezier(.22, 1, .36, 1);
}

.g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mt14 {
  margin-top: 14px;
}

.p14 {
  padding: 14px 18px;
}

/* ══ TABLE ══ */
.tc {
  overflow: hidden;
}

.tw {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

thead th {
  background: var(--sur2);
  backdrop-filter: blur(8px);
  padding: 8px 8px;
  font-size: .7rem;
  font-weight: 800;
  color: var(--txt);
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--brd);
  transition: all 0.2s;
}
.task-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 9px;
  padding: 10px 13px;
  background: var(--sur2);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--brd);
  font-size: .7rem;
  font-weight: 800;
  color: var(--txt);
  text-transform: uppercase;
}

tbody tr {
  transition: background 0.15s;
}

tbody tr:hover {
  background: rgba(255, 255, 255, .4);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody td {
  padding: 8px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, .07);
  vertical-align: middle;
  color: var(--txt);
}

.cid {
  font-weight: 800;
  font-size: .84rem;
  color: var(--red);
  cursor: pointer;
  transition: color .12s;
}

.cid:hover {
  text-decoration: underline;
  color: var(--red2);
}

.iec {
  background: var(--ibg);
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--txt);
  font-family: var(--font-family);
  font-size: .8rem;
  width: 100%;
  transition: all .15s;
}

.iec:hover {
  border-color: rgba(0, 0, 0, .2);
  background: rgba(255, 255, 255, .9);
}

.iec:focus {
  outline: none;
  border-color: rgba(224, 26, 36, .4);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(224, 26, 36, .1);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.64rem;
  font-weight: 700;
}

.bw {
  background: rgba(245, 158, 11, .18);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, .3);
}

.ba {
  background: rgba(74, 143, 248, .18);
  color: #1e40af;
  border: 1px solid rgba(74, 143, 248, .3);
}

.bd {
  background: rgba(16, 185, 129, .18);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, .3);
}

.bf {
  background: rgba(245, 158, 11, .15);
  color: #78350f;
  border: 1px solid rgba(245, 158, 11, .25);
}

.br {
  background: rgba(244, 63, 94, .18);
  color: #9f1239;
  border: 1px solid rgba(244, 63, 94, .3);
}

.bR {
  background: rgba(224, 26, 36, .12);
  color: #991b1b;
  border: 1px solid rgba(224, 26, 36, .25);
}

.abtns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.abtn {
  width: 26px;
  height: 26px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--brd);
  background: var(--sur2);
  cursor: pointer;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0;
  color: var(--txt);
  position: relative;
}

/* tooltip */
.abtn[title]::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  right: 50%;
  transform: translateX(50%);
  background: hsl(230 30% 14% / 0.92);
  color: #fff;
  font-size: .65rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 9999;
  font-family: var(--font-family);
}

.abtn[title]:hover::after {
  opacity: 1;
}

/* unified hover — icon turns red */
.abtn:hover {
  background: var(--red-soft);
  border-color: hsl(357 80% 50% / 0.35);
  color: var(--red);
}

/* specific overrides */
.abtn.del:hover {
  background: rgba(244, 63, 94, .1);
  border-color: var(--danger);
  color: var(--danger);
}

.abtn.ok:hover {
  background: rgba(52, 211, 153, .1);
  border-color: var(--accent3);
  color: var(--accent3);
}

.abtn.frz {
  color: var(--accent2);
  border-color: var(--accent2);
}

.abtn.adv-fwd {
  color: var(--accent3);
  border-color: hsl(160 64% 52% / 0.4);
}

.abtn.adv-fwd:hover {
  background: rgba(52, 211, 153, .12);
  border-color: var(--accent3);
  color: var(--accent3);
}

.abtn.adv-back {
  color: var(--danger);
  border-color: hsl(350 80% 56% / 0.4);
}

.abtn.adv-back:hover {
  background: rgba(244, 63, 94, .12);
  border-color: var(--danger);
  color: var(--danger);
}

.rf {
  opacity: .4;
}

.no-data {
  text-align: center;
  color: var(--muted);
  padding: 26px;
  font-size: .79rem;
}

/* ══ SLIDE PANEL (LIQUID GLASS) ══ */
#slide-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 520px;
  height: 100vh;
  background: var(--sur);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: var(--glass-border);
  z-index: 300;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

#slide-panel.open {
  transform: translateX(0);
}

.sp-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--brd2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sp-title {
  font-size: .96rem;
  font-weight: 800;
  letter-spacing: -.01em;
}

.sp-close {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  border: var(--glass-border);
  background: var(--sur2);
  cursor: pointer;
  color: var(--muted);
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
}

.sp-tabs {
  display: flex;
  gap: 3px;
  margin-bottom: 18px;
  background: rgba(0, 0, 0, .06);
  padding: 3px;
  border-radius: 14px;
}

.sp-tab {
  flex: 1;
  padding: 7px;
  border: none;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: .74rem;
  font-weight: 600;
  color: var(--muted);
  transition: all .2s var(--spring);
}

.sp-tab.active {
  background: var(--sur);
  backdrop-filter: blur(8px);
  color: var(--txt);
  box-shadow: var(--shadow-sm);
}

.sp-section {
  display: none;
}

.sp-section.active {
  display: block;
}

.sp-body {
  padding: 20px;
}

/* ══ FORMS ══ */
.fg {
  margin-bottom: 13px;
}

.fg label {
  display: block;
  font-size: .65rem;
  font-weight: 800;
  color: var(--txt);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 5px;
  opacity: .7;
}

.fg input,
.fg select,
.fg textarea {
  width: 100%;
  background: var(--ibg);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  color: var(--txt);
  font-family: var(--font-family);
  font-size: .86rem;
  transition: all .2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06) inset;
}

.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  outline: none;
  border-color: rgba(224, 26, 36, .5);
  box-shadow: 0 0 0 3px rgba(224, 26, 36, .12), 0 1px 3px rgba(0, 0, 0, .06) inset;
  background: rgba(255, 255, 255, .95);
}

.fg input::placeholder,
.fg textarea::placeholder {
  color: var(--muted);
  opacity: .7;
}

.fg textarea {
  resize: vertical;
  min-height: 62px;
}

.frow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.frow3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 9px;
}

.frow4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 9px;
}

.types-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  background: var(--sur2);
  padding: 11px;
  border-radius: 9px;
  border: 1px solid var(--brd);
}

.tchip {
  background: var(--sur);
  border: 1px solid var(--brd);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: .71rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  transition: all .15s;
  user-select: none;
}

.tchip.on {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--txt);
}

.tdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 2px solid var(--brd);
  flex-shrink: 0;
  transition: all .15s;
}

.tchip.on .tdot {
  background: var(--red);
  border-color: var(--red);
}

/* ══ ALERTS ══ */
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 9px;
  margin-bottom: 7px;
  border: 1px solid;
  font-size: .78rem;
}

.alert-item.warn {
  background: rgba(245, 158, 11, .07);
  border-color: rgba(245, 158, 11, .25);
}

.alert-item.danger {
  background: rgba(244, 63, 94, .07);
  border-color: rgba(244, 63, 94, .25);
}

.alert-item.info {
  background: rgba(79, 142, 247, .07);
  border-color: rgba(79, 142, 247, .25);
}

.alert-item.custom {
  background: var(--red-soft);
  border-color: hsl(357 80% 50% / 0.25);
}

.ai-msg strong {
  display: block;
  font-weight: 700;
  margin-bottom: 1px;
}

.ai-msg span {
  color: var(--muted);
}

/* ══ CALENDAR ══ */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-top: 8px;
}

.cal-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 3px;
}

.cal-hd {
  text-align: center;
  font-size: .63rem;
  font-weight: 700;
  color: var(--muted);
  padding: 3px;
}

.cal-day {
  min-height: 62px;
  background: var(--sur2);
  border: 1px solid var(--brd);
  border-radius: 7px;
  padding: 4px;
  cursor: pointer;
  transition: background .15s;
}

.cal-day:hover {
  background: var(--red-soft);
}

.cal-day.today {
  border-color: var(--red);
}

.cal-day.other-month {
  opacity: .35;
}

.cal-dn {
  font-size: .68rem;
  font-weight: 700;
  color: var(--muted);
}

.cal-ev {
  font-size: .6rem;
  border-radius: 4px;
  padding: 2px 5px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-ev.field {
  background: rgba(245, 158, 11, .15);
  color: var(--accent4);
}

.cal-ev.task {
  background: rgba(52, 211, 153, .15);
  color: var(--accent3);
}

.cal-nav button {
  background: var(--sur2);
  border: 1px solid var(--brd);
  border-radius: 7px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  color: var(--txt);
}

/* ══ NOTES ══ */
.note-item {
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--sur2);
  border: 1px solid var(--brd);
  margin-bottom: 7px;
}

.note-meta {
  font-size: .66rem;
  color: var(--muted);
  margin-bottom: 3px;
}

.note-text {
  font-size: .79rem;
}

/* ══ LOG ══ */
.log-item {
  display: flex;
  gap: 9px;
  margin-bottom: 9px;
}

.log-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  margin-top: 4px;
}

.log-text {
  font-size: .76rem;
}

.log-text strong {
  font-weight: 700;
}

.log-time {
  font-size: .65rem;
  color: var(--muted);
  display: block;
  margin-top: 1px;
}

/* ══ MODAL (LIQUID GLASS) ══ */
.moverlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.45);
  backdrop-filter: blur(8px) saturate(1.4);
  -webkit-backdrop-filter: blur(8px) saturate(1.4);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mbox {
  background: var(--sur);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 28px;
  min-width: 400px;
  max-width: 95vw;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s var(--spring);
  position: relative;
  overflow: hidden;
}

.mbox::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 35%;
  background: var(--glass-spec);
  pointer-events: none;
  border-radius: var(--radius) var(--radius) 60% 60%;
}

.mbox.wide {
  max-width: 680px;
  max-height: 88vh;
  overflow-y: auto;
}

.mtitle {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 4px;
}

.msub {
  color: var(--muted);
  font-size: .78rem;
  margin-bottom: 16px;
}

.macts {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

.stagebar {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.sstep {
  padding: 5px 11px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  border: 1px solid var(--brd);
  color: var(--muted);
  background: var(--sur2);
  white-space: nowrap;
}

.sstep.cur {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
}

.sstep.done {
  background: rgba(52, 211, 153, .09);
  border-color: rgba(52, 211, 153, .3);
  color: var(--accent3);
}

.sarrow {
  color: var(--brd);
  flex-shrink: 0;
}

.flink {
  color: var(--accent4);
  cursor: pointer;
  transition: transform .15s;
  display: inline-block;
}

.flink:hover {
  transform: scale(1.18);
}

.divider {
  height: 1px;
  background: var(--brd);
  margin: 14px 0;
}

.sl {
  font-size: .66rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 7px;
}

/* ══ CLOCK ══ */
.clock-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .8rem;
  color: var(--muted);
}

.clock-time {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--txt);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.clock-date {
  font-size: .72rem;
  color: var(--muted);
}

/* ══ QUOTE BUILDER ══ */
.qb-stage-indicator {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.qb-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .73rem;
  font-weight: 700;
  border: 1px solid var(--brd);
  color: var(--muted);
  background: var(--sur2);
}

.qb-step.active {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
}

.qb-step.done {
  background: rgba(52, 211, 153, .09);
  border-color: rgba(52, 211, 153, .3);
  color: var(--accent3);
}

.qb-step-arrow {
  color: var(--brd);
  font-size: .8rem;
}

.price-table-wrap {
  border: 1px solid var(--brd);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
}

.price-table th {
  background: var(--sur2);
  backdrop-filter: blur(8px);
  padding: 8px 12px;
  font-size: .7rem;
  font-weight: 800;
  color: var(--txt);
  text-transform: uppercase;
  text-align: right;
  border-bottom: 1px solid var(--brd);
}

.price-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(79, 82, 115, .1);
  font-size: .8rem;
  vertical-align: middle;
}

.price-table tr:last-child td {
  border-bottom: none;
}

.price-table input {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 3px 7px;
  color: var(--txt);
  font-family: var(--font-family);
  font-size: .8rem;
  width: 100%;
  transition: all .15s;
}

.price-table input:hover {
  border-color: var(--brd);
  background: var(--ibg);
}

.price-table input:focus {
  outline: none;
  border-color: var(--red);
  background: var(--ibg);
}

.price-total-row td {
  background: var(--sur2);
  font-weight: 800;
  border-top: 2px solid var(--brd) !important;
}

.quote-preview {
  background: var(--sur);
  color: #111;
  font-family: var(--font-family);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px hsl(230 30% 14% / 0.15);
}

.qp-header {
  background: linear-gradient(135deg, var(--red), var(--red2));
  padding: 20px 26px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  color: var(--sur);
}

.qp-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.qp-company {
  flex: 1;
}

.qp-name {
  font-size: 1.05rem;
  font-weight: 900;
}

.qp-sub {
  font-size: .7rem;
  opacity: .8;
  margin-top: 2px;
}

.qp-meta {
  text-align: left;
  font-size: .72rem;
  opacity: .8;
  line-height: 1.6;
}

.qp-body {
  padding: 20px 26px;
  direction: rtl;
}

.qp-sec {
  font-size: .68rem;
  font-weight: 800;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: .07em;
  border-bottom: 2px solid var(--red);
  padding-bottom: 3px;
  margin: 16px 0 10px;
}

.qp-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: .79rem;
}

.qp-row .k {
  color: #555;
}

.qp-row .v {
  font-weight: 700;
}

.qp-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}

.qp-items-table th {
  background: var(--sur2);
  backdrop-filter: blur(8px);
  padding: 8px 10px;
  font-size: .7rem;
  font-weight: 800;
  color: var(--txt);
  text-align: right;
  border-bottom: 1px solid var(--brd);
}

.qp-items-table td {
  padding: 5px 10px;
  font-size: .77rem;
  border-bottom: 1px solid #f0f0f0;
}

.qp-items-table .total-row td {
  background: #fee2e2;
  font-weight: 800;
  border-top: 2px solid var(--red);
}

.qp-terms {
  background: #fafafa;
  border-right: 3px solid var(--red);
  padding: 8px 12px;
  border-radius: 0 7px 7px 0;
  font-size: .74rem;
  color: #555;
  margin-bottom: 8px;
  line-height: 1.5;
}

.qp-legal {
  font-size: .68rem;
  color: #888;
  line-height: 1.6;
  margin-top: 10px;
}

.qp-sig-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.qp-sig-box {
  border-top: 1px solid #ccc;
  padding-top: 6px;
  text-align: center;
  font-size: .72rem;
  color: #888;
}

.qp-footer {
  background: #f8f0f0;
  padding: 10px 26px;
  display: flex;
  justify-content: space-between;
  font-size: .67rem;
  color: #888;
}

/* status badge on quote */
.quote-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .67rem;
  font-weight: 700;
}

.qs-draft {
  background: rgba(245, 158, 11, .12);
  color: var(--accent4);
}

.qs-sent {
  background: rgba(79, 142, 247, .12);
  color: var(--accent);
}

.qs-approved {
  background: rgba(52, 211, 153, .12);
  color: var(--accent3);
}

.qs-rejected {
  background: rgba(244, 63, 94, .12);
  color: var(--danger);
}

/* ══ USER EDIT MODAL ══ */
.perm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.perm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 8px;
  background: var(--sur2);
  border: 1px solid var(--brd);
  font-size: .79rem;
  cursor: pointer;
  transition: all .15s;
}

.perm-item input[type=checkbox] {
  width: 15px;
  height: 15px;
  accent-color: var(--red);
}

.perm-item.active {
  background: var(--red-soft);
  border-color: hsl(357 80% 50% / 0.3);
}

/* ══ PRE-FILLED QUOTE INPUTS ══ */
.q-prefilled {
  background: rgba(79, 142, 247, .07) !important;
  border-color: rgba(79, 142, 247, .35) !important;
}

.q-prefilled:focus {
  background: var(--sur) !important;
  border-color: var(--red) !important;
}

.q-prefill-note {
  font-size: .64rem;
  color: var(--accent);
  margin-top: 2px;
}

/* ══ GANTT ══ */
.gantt-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
}

.gantt-table {
  border-collapse: collapse;
  min-width: 700px;
  width: 100%;
}

.gantt-table th {
  background: var(--sur2);
  backdrop-filter: blur(8px);
  padding: 8px 10px;
  font-size: .7rem;
  font-weight: 800;
  color: var(--txt);
  text-align: right;
  border-bottom: 1px solid var(--brd);
  white-space: nowrap;
}

.gantt-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(79, 82, 115, .09);
  font-size: .77rem;
  vertical-align: middle;
}

.gantt-bar-cell {
  min-width: 320px;
}

.gantt-bar-wrap {
  position: relative;
  height: 28px;
  background: var(--sur2);
  border-radius: 6px;
  overflow: visible;
}

.gantt-bar {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: .67rem;
  font-weight: 700;
  color: var(--sur);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: width .4s;
}

.gantt-prep {
  background: linear-gradient(90deg, var(--accent2), #9f7aea);
}

.gantt-field {
  background: linear-gradient(90deg, var(--accent4), #f97316);
}

.gantt-done {
  background: linear-gradient(90deg, var(--accent3), #059669);
  opacity: .75;
}

.gantt-pending {
  background: var(--brd);
}

.gantt-add-btn {
  background: var(--red-soft);
  border: 1px dashed var(--red);
  border-radius: 7px;
  padding: 5px 12px;
  font-size: .74rem;
  color: var(--red);
  cursor: pointer;
  font-family: var(--font-family);
  font-weight: 700;
  transition: background .15s;
}

.gantt-add-btn:hover {
  background: hsl(357 80% 50% / 0.15);
}

.phase-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: .65rem;
  font-weight: 700;
}

.ps-prep {
  background: rgba(124, 92, 252, .12);
  color: var(--accent2);
}

.ps-field {
  background: rgba(245, 158, 11, .12);
  color: var(--accent4);
}

.ps-done {
  background: rgba(52, 211, 153, .12);
  color: var(--accent3);
}

.ps-pend {
  background: var(--sur2);
  color: var(--muted);
}

/* ══ CADASTRE GANTT ══ */
.cad-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--brd);
  margin-bottom: 6px;
  background: var(--sur2);
}

.cad-step.done-step {
  background: rgba(52, 211, 153, .06);
  border-color: rgba(52, 211, 153, .25);
}

.cad-step.active-step {
  background: var(--red-soft);
  border-color: hsl(357 80% 50% / 0.25);
}

.cad-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .67rem;
  font-weight: 800;
  color: var(--muted);
  flex-shrink: 0;
}

.cad-num.done {
  background: var(--accent3);
  color: var(--sur);
}

.cad-num.active {
  background: var(--red);
  color: var(--sur);
}

.cad-label {
  font-size: .8rem;
  flex: 1;
}

.cad-date {
  font-size: .68rem;
  color: var(--muted);
}

.cad-check {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
}

/* ══ WORKER VIEW ══ */
.worker-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--sur2);
  border-bottom: 1px solid var(--brd);
  border-radius: var(--radius) var(--radius) 0 0;
}

.worker-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--sur);
}

.worker-name {
  font-size: 1rem;
  font-weight: 800;
}

.worker-role-badge {
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  background: var(--red-soft);
  color: var(--red);
}

.role-section {
  margin-bottom: 16px;
}

.role-section-title {
  font-size: .72rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 8px 0 4px;
  border-bottom: 1px solid var(--brd);
  margin-bottom: 8px;
}

.worker-proj-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--sur2);
  border: 1px solid var(--brd);
  margin-bottom: 6px;
  transition: background .15s;
}

.worker-proj-card:hover {
  background: var(--red-soft);
  border-color: hsl(357 80% 50% / 0.2);
}

.wpc-id {
  font-weight: 800;
  font-size: .82rem;
  color: var(--red);
  min-width: 52px;
}

.wpc-desc {
  font-size: .79rem;
  flex: 1;
}

.wpc-stage {
  font-size: .68rem;
  color: var(--muted);
}

/* ══ DASHBOARD WIDGETS ══ */
.dash-grid-full {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.dash-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.week-day {
  background: var(--sur2);
  border: 1px solid var(--brd);
  border-radius: 8px;
  padding: 6px;
  min-height: 80px;
}

.week-day.today {
  border-color: var(--red);
  background: var(--red-soft);
}

.week-day-name {
  font-size: .63rem;
  font-weight: 800;
  color: var(--muted);
  text-align: center;
  margin-bottom: 3px;
}

.week-day-num {
  font-size: .82rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 4px;
}

.week-ev {
  font-size: .59rem;
  border-radius: 3px;
  padding: 2px 4px;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-ev.field {
  background: rgba(245, 158, 11, .15);
  color: var(--accent4);
}

.week-ev.task {
  background: rgba(52, 211, 153, .15);
  color: var(--accent3);
}

.week-ev.alert {
  background: var(--red-soft);
  color: var(--red);
}

/* Filter Pills */
.fpill {
  font-size: 0.72rem;
  padding: 4px 12px;
  background: var(--sur);
  border: 1px solid var(--brd);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--muted);
  white-space: nowrap;
  user-select: none;
}
.fpill:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(220, 38, 38, 0.05);
}
.fpill.active {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.sort-icon {
  font-size: 0.65rem;
  opacity: 0.7;
  margin-right: 4px;
  vertical-align: middle;
}

table.sortable thead th:hover {
  background: var(--sur2);
  color: var(--red);
}


.mini-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 0.625rem;
  border-radius: var(--radius);
  margin-bottom: 6px;
  border: 1px solid;
  font-size: 0.77rem;
}

.mini-alert.w {
  background: hsl(38 95% 64% / 0.07);
  border-color: hsl(38 95% 64% / 0.25);
}

.mini-alert.d {
  background: hsl(350 80% 56% / 0.07);
  border-color: hsl(350 80% 56% / 0.25);
}

.mini-task-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--brd);
  margin-bottom: 5px;
  font-size: .77rem;
  background: var(--sur2);
}

.mini-task-row.overdue {
  border-color: rgba(244, 63, 94, .3);
  background: rgba(244, 63, 94, .04);
}

.kpi-mini {
  text-align: center;
  padding: 14px 10px;
}

.kpi-mini .val {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
}

.kpi-mini .lbl {
  font-size: .64rem;
  color: var(--muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ══ FOLDER PICKER ══ */
.folder-picker-wrap {
  display: flex;
  gap: 6px;
  align-items: center;
}

.folder-picker-wrap input {
  flex: 1;
}

.folder-pick-btn {
  background: var(--sur2);
  border: 1px solid var(--brd);
  border-radius: 9px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: .8rem;
  color: var(--muted);
  white-space: nowrap;
  transition: all .15s;
  font-family: var(--font-family);
}

.folder-pick-btn:hover {
  background: var(--red-soft);
  color: var(--red);
  border-color: hsl(357 80% 50% / 0.3);
}

/* ══ QUOTE CUSTOM ITEMS ══ */
.q-custom-item {
  display: grid;
  grid-template-columns: 1fr 80px 110px 100px 28px;
  gap: 6px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid rgba(79, 82, 115, .08);
}

.q-custom-item input {
  background: var(--ibg);
  border: 1px solid var(--brd);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--txt);
  font-family: var(--font-family);
  font-size: .78rem;
}

.q-custom-item input:focus {
  outline: none;
  border-color: var(--red);
}

.del-row-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(244, 63, 94, .3);
  background: rgba(244, 63, 94, .07);
  cursor: pointer;
  color: var(--danger);
  font-size: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.del-row-btn:hover {
  background: rgba(244, 63, 94, .15);
}

.report-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.rcard {
  padding: 22px;
  cursor: pointer;
  transition: all .18s;
  position: relative;
  overflow: hidden;
}

.rcard::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--red);
}

.rcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px hsl(230 30% 14% / 0.18);
}

.rcard-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.rcard-title {
  font-size: .9rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.rcard-sub {
  font-size: .74rem;
  color: var(--muted);
}

.rcard-badges {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}

/* Report Preview */
.report-preview {
  background: var(--sur);
  color: #111;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px hsl(230 30% 14% / 0.15);
}

.rp-header {
  background: linear-gradient(135deg, var(--red) 0%, var(--red2) 100%);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.rp-logo {
  width: 52px;
  height: 52px;
}

.rp-company {
  color: var(--sur);
}

.rp-company-name {
  font-size: 1.1rem;
  font-weight: 900;
}

.rp-company-sub {
  font-size: .74rem;
  opacity: .85;
  margin-top: 2px;
}

.rp-report-title {
  margin-right: auto;
  color: var(--sur);
  text-align: left;
}

.rp-report-name {
  font-size: .8rem;
  font-weight: 700;
  opacity: .85;
}

.rp-report-date {
  font-size: .72rem;
  opacity: .65;
}

.rp-body {
  padding: 22px 28px;
  font-family: var(--font-family);
  direction: rtl;
}

.rp-section-title {
  font-size: .72rem;
  font-weight: 800;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: .07em;
  border-bottom: 2px solid var(--red);
  padding-bottom: 4px;
  margin-bottom: 12px;
  margin-top: 18px;
}

.rp-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: .8rem;
}

.rp-row .key {
  color: #555;
}

.rp-row .val {
  font-weight: 700;
}

.rp-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.rp-table th {
  background: var(--sur2);
  backdrop-filter: blur(8px);
  padding: 8px 10px;
  font-size: .7rem;
  font-weight: 800;
  color: var(--txt);
  text-align: right;
  border-bottom: 1px solid var(--brd);
}

.rp-table td {
  padding: 6px 10px;
  font-size: .76rem;
  border-bottom: 1px solid #f0f0f0;
}

.rp-table tr:last-child td {
  border-bottom: none;
}

.rp-footer {
  background: #f8f0f0;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .68rem;
  color: #888;
}

.rp-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: hsl(357 80% 50% / 0.08);
  border: 1px solid hsl(357 80% 50% / 0.2);
  border-radius: 7px;
  padding: 4px 10px;
  font-size: .7rem;
  color: var(--red);
  font-weight: 700;
}

.rp-hist-item {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: .76rem;
}

.rp-hist-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  margin-top: 5px;
}

.rp-note-item {
  background: #fafafa;
  border-right: 3px solid var(--red);
  padding: 7px 10px;
  margin-bottom: 6px;
  border-radius: 0 6px 6px 0;
  font-size: .76rem;
}

/* stage bar in report */
.rp-stages {
  display: flex;
  gap: 2px;
  margin: 10px 0;
}

.rp-stage {
  flex: 1;
  text-align: center;
  padding: 5px 4px;
  font-size: .62rem;
  font-weight: 700;
  border-radius: 5px;
  background: #f0f0f0;
  color: #888;
}

.rp-stage.done {
  background: #dcfce7;
  color: #16a34a;
}

.rp-stage.cur {
  background: #fee2e2;
  color: var(--red);
}

/* Excel Preview */
.xl-preview {
  background: var(--sur);
  color: #111;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px hsl(230 30% 14% / 0.15);
}

.xl-header {
  background: #217346;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sur);
}

.xl-title {
  font-size: .9rem;
  font-weight: 800;
}

.xl-sub {
  font-size: .72rem;
  opacity: .8;
}

.xl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .76rem;
}

.xl-table th {
  background: var(--sur2);
  backdrop-filter: blur(8px);
  padding: 8px 10px;
  font-size: .75rem;
  font-weight: 800;
  color: var(--txt);
  text-align: right;
  border-bottom: 1px solid var(--brd);
}

.xl-table td {
  padding: 5px 9px;
  border: 1px solid #e0e0e0;
}

.xl-table tr:nth-child(even) td {
  background: #f1f8e9;
}

.xl-sum {
  background: #e8f5e9;
  padding: 8px 14px;
  font-size: .75rem;
  font-weight: 700;
  color: #1a5c2d;
  text-align: left;
  direction: ltr;
}

/* ══ REQUIRED FIELD STAR ══ */
label span[style*="color:var(--red)"] {
  font-size: .75rem;
}

/* ══ ROW HIGHLIGHT ══ */
@keyframes rowPulse {
  0% {
    background: hsla(var(--hue), 80%, 50%, 0.13);
  }

  70% {
    background: hsla(var(--hue), 80%, 50%, 0.05);
  }

  100% {
    background: transparent;
  }
}

tr.row-hl td {
  animation: rowPulse 1.5s ease-out forwards;
}

/* ══ KANBAN BOARD (LIQUID GLASS) ══ */
.kb-col {
  width: 230px;
  flex-shrink: 0;
  background: var(--sur);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.kb-col-head {
  padding: 10px 14px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--brd);
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--sur2);
}

.kb-col-title {
  font-weight: 800;
  font-size: .82rem;
}

.kb-col-count {
  background: var(--sur);
  border: 1px solid var(--brd);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: .67rem;
  font-weight: 700;
  color: var(--muted);
}

.kb-cards {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.kb-card {
  background: var(--sur);
  border: 1px solid var(--brd);
  border-radius: 9px;
  padding: 10px 12px;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
  font-size: .78rem;
  border-right: 4px solid var(--accent);
}

.kb-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  transform: translateY(-1px);
}

.kb-card-id {
  font-size: .67rem;
  color: var(--muted);
  margin-bottom: 3px;
}

.kb-card-client {
  font-weight: 700;
  font-size: .8rem;
  margin-bottom: 2px;
}

.kb-card-desc {
  color: var(--muted);
  font-size: .72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kb-card-footer {
  display: flex;
  gap: 5px;
  margin-top: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.kb-tag {
  background: var(--sur2);
  border: 1px solid var(--brd);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: .63rem;
  color: var(--muted);
}

.kb-price {
  font-size: .7rem;
  font-weight: 700;
  color: var(--accent3);
  margin-right: auto;
}


/* ══ GLOBAL SEARCH ══ */
.gsearch-wrap {
  position: relative;
}

#gsearch {
  flex: 1;
  background: var(--sur);
  backdrop-filter: blur(10px);
  border: 1px solid var(--brd);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  font-family: var(--font-family);
  font-size: 0.85rem;
  color: var(--txt);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

#gsearch:focus {
  border-color: var(--red);
  background: var(--sur-solid);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.gs-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .85rem;
  pointer-events: none;
}

#gsearch-drop {
  position: fixed;
  top: 15vh;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  max-width: 92vw;
  background: var(--sur);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 4500;
  max-height: 70vh;
  overflow-y: auto;
  display: none;
  animation: modalIn 0.35s var(--spring);
}

#gsearch-drop.open {
  display: block;
}

.gsd-sec {
  padding: 5px 13px 3px;
  font-size: .6rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--sur2);
  border-bottom: 1px solid var(--brd);
}

.gsd-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  cursor: pointer;
  border-bottom: 1px solid rgba(79, 82, 115, .05);
  transition: background .1s;
}

.gsd-item:hover {
  background: var(--red-soft);
}

.gsd-ic {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  flex-shrink: 0;
}

.gsd-main {
  font-size: .79rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

.gsd-sub {
  font-size: .67rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gsd-tag {
  font-size: .62rem;
  padding: 1px 6px;
  border-radius: 9px;
  font-weight: 700;
  background: var(--sur2);
  color: var(--muted);
  white-space: nowrap;
}

.gsd-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: .79rem;
}

mark {
  background: hsl(357 80% 50% / 0.14);
  color: var(--red);
  border-radius: 2px;
  padding: 0 1px;
  font-style: normal;
}

/* ══ ALERT POPUP (LIQUID GLASS) ══ */
#alert-popups {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 9000;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
  max-width: 340px;
}

.ap {
  background: var(--sur);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border-right: 4px solid var(--red);
  animation: apIn .35s var(--spring);
}

.ap.warn {
  border-right-color: #f59e0b;
}

.ap.info {
  border-right-color: #06b6d4;
}

.ap.ok {
  border-right-color: #34d399;
}

@keyframes apIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(.92) translateY(16px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


.ap-ico {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.ap-body {
  flex: 1;
}

.ap-t {
  font-size: .8rem;
  font-weight: 800;
  margin-bottom: 1px;
}

.ap-m {
  font-size: .71rem;
  color: var(--muted);
  line-height: 1.4;
}

.ap-x {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: .9rem;
  padding: 0;
  line-height: 1;
}

/* ══ STATS BANK ══ */

/* ══ ALERT TRIGGERS ══ */
.atrig {
  background: var(--sur2);
  border: 1px solid var(--brd);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.atrig-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.toggle-sw {
  position: relative;
  display: inline-block;
  width: 33px;
  height: 18px;
}

.toggle-sw input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-sw .sl {
  position: absolute;
  inset: 0;
  background: var(--brd);
  border-radius: 9999px;
  transition: background 0.15s;
  cursor: pointer;
}

.toggle-sw .sl:before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  right: 3px;
  top: 3px;
  background: var(--sur);
  border-radius: 50%;
  transition: .2s;
}

.toggle-sw input:checked+.sl {
  background: var(--red);
}

.toggle-sw input:checked+.sl:before {
  transform: translateX(-16px);
}

.atrig-name {
  font-size: .8rem;
  font-weight: 700;
  flex: 1;
}

.atrig-cfg {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--brd);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.atrig-cfg label {
  font-size: .71rem;
  color: var(--muted);
}

.atrig-cfg input[type=number] {
  width: 55px;
  background: var(--ibg);
  border: 1px solid var(--brd);
  border-radius: 6px;
  padding: 3px 6px;
  color: var(--txt);
  font-family: var(--font-family);
  font-size: .74rem;
}

.sound-tog {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: .65rem;
  font-weight: 700;
  background: var(--sur);
  border: 1px solid var(--brd);
  cursor: pointer;
  transition: all .15s;
}

.sound-tog.on {
  background: rgba(79, 142, 247, .1);
  color: var(--accent);
  border-color: rgba(79, 142, 247, .3);
}

/* ══ RICH STATS GRID ══ */
.rsg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.rsg2 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 9px;
  margin-bottom: 14px;
}

.kpi {
  background: var(--sur);
  border: 1px solid var(--brd);
  border-radius: var(--radius);
  padding: 13px 15px;
  position: relative;
  overflow: hidden;
}

.kpi::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: var(--kpi-accent, var(--red));
}

.kpi .ki {
  font-size: 1.1rem;
  margin-bottom: 2px;
  opacity: .8;
}

.kpi .kv {
  font-size: 2.3rem;
  font-weight: 900;
  line-height: .9;
  letter-spacing: -0.02em;
  color: var(--kpi-accent, var(--txt));
}

.kpi .kl {
  font-size: .75rem;
  font-weight: 800;
  color: var(--txt);
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-top: 6px;
}

.kpi .ks {
  font-size: .73rem;
  color: var(--muted);
  margin-top: 1px;
  font-weight: 500;
}

.kpi.sm .kv {
  font-size: 1.25rem;
}

.kpi.sm {
  padding: 10px 13px;
}

.dash-section-title {
  font-size: .65rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 14px 0 7px;
}

.mini-bar-wrap {
  height: 8px;
  background: var(--sur2);
  border-radius: 3px;
  margin-top: 5px;
  overflow: hidden;
}

.mini-bar {
  height: 100%;
  border-radius: 3px;
  transition: width .4s;
}

@media(max-width:1100px) {
  .rsg2 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media(max-width:800px) {
  .rsg {
    grid-template-columns: repeat(2, 1fr);
  }

  .rsg2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ══ ACCESSIBILITY SCALE ══ */

/* accessibility panel */
#acc-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  background: var(--sur);
  border: 1px solid var(--brd);
  border-radius: 14px 14px 0 0;
  padding: 16px 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
  z-index: 3001;
  width: var(--sw);
  display: none;
  direction: rtl;
}

#acc-panel.open {
  display: block;
}

#acc-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: .78rem;
  color: var(--muted);
  border-top: 1px solid var(--brd);
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  width: 100%;
  text-align: right;
  transition: background .15s, color .15s;
}

#acc-toggle:hover {
  background: var(--sur2);
  color: var(--txt);
}

.acc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.acc-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--txt);
}

.acc-sub {
  font-size: .68rem;
  color: var(--muted);
  margin-top: 1px;
}

.acc-btns {
  display: flex;
  gap: 5px;
}

.acc-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1.5px solid var(--brd);
  background: var(--sur2);
  cursor: pointer;
  font-weight: 800;
  font-size: .8rem;
  color: var(--txt);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}

.acc-btn:hover,
.acc-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.acc-divider {
  border: none;
  border-top: 1px solid var(--brd);
  margin: 10px 0;
}


/* HIGH CONTRAST */
body.high-contrast {
  --txt: #000;
  --muted: #333;
  --brd: #555;
  --sur: #fff;
  --sur2: #f0f0f0;
}

body.high-contrast.dark {
  --txt: #fff;
  --muted: #ccc;
  --brd: #888;
  --sur: #111;
  --sur2: #222;
}

/* REFRESH BUTTON */
.btn-refresh {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: .6;
  transition: all .3s ease;
  padding: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-refresh:hover {
  opacity: 1;
  background: var(--sur2);
  transform: rotate(180deg);
}
.btn-refresh.spinning {
  animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

.reg-link {
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  margin-top: 10px;
  display: inline-block;
  cursor: pointer;
  transition: color 0.2s;
}
.reg-link:hover {
  color: var(--red);
  text-decoration: underline;
}

.abtn.ok {
  background: var(--accent3);
  color: #fff;
}
.abtn.ok:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pw-wrap input {
  padding-left: 45px !important;
  width: 100%;
}
.pw-toggle {
  position: absolute;
  left: 10px;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
  transition: all 0.2s ease;
  user-select: none;
  z-index: 5;
  color: var(--txt);
  border-radius: 50%;
}
.pw-toggle:hover {
  opacity: 1;
  background: var(--red-soft);
  color: var(--red);
}
.pw-toggle svg {
  display: block;
}