:root {
  color-scheme: dark;
  --bg: #0b0811;
  --surface: #14101d;
  --surface-2: #1c1628;
  --surface-3: #251c34;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f8f5ff;
  --muted: #9e96ae;
  --purple: #8b35ff;
  --purple-2: #c05cff;
  --blue: #4ea7ff;
  --green: #32d58b;
  --orange: #ffad42;
  --red: #ff5d72;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 80% -10%, rgba(139, 53, 255, 0.16), transparent 32rem),
    var(--bg);
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
.hidden { display: none !important; }

.brand-mark {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 21px;
  color: #fff;
  font-size: 34px;
  font-weight: 950;
  font-style: italic;
  background: linear-gradient(145deg, #c45cff, #7218e2 62%, #3e0a83);
  box-shadow: 0 16px 42px rgba(139, 53, 255, 0.35), inset 0 1px rgba(255,255,255,.35);
}

.brand-mark--small {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 22px;
}

.brand-logo {
  display: block;
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 215, 107, .24);
  border-radius: 20px;
  object-fit: cover;
  background: #07070d;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .38), 0 0 28px rgba(255, 192, 61, .08);
}

.brand-logo--hero {
  width: 116px;
  height: 116px;
  border-radius: 27px;
}

.brand-logo--small {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  box-shadow: 0 9px 24px rgba(0, 0, 0, .3);
}

.brand-logo--boot {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  animation: logo-breathe 1.8s ease-in-out infinite;
}

@keyframes logo-breathe {
  50% {
    transform: scale(1.035);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .42), 0 0 34px rgba(255, 192, 61, .13);
  }
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, 1.1fr) minmax(420px, .9fr);
}

.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 7vw, 8rem);
  background:
    linear-gradient(145deg, rgba(11, 8, 17, .15), rgba(11, 8, 17, .72)),
    radial-gradient(circle at 60% 30%, #8d2ae9, transparent 23rem),
    linear-gradient(135deg, #32105b, #12091f 72%);
}

.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}
.auth-visual::before { right: -90px; top: -130px; }
.auth-visual::after { left: -170px; bottom: -170px; }
.auth-visual > * { position: relative; z-index: 1; }

.brand-kicker {
  margin-top: 2rem;
  color: rgba(255,255,255,.58);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .24em;
}

.auth-visual h1 {
  max-width: 650px;
  margin: .9rem 0 1rem;
  font-size: clamp(2.6rem, 5.6vw, 5.6rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.auth-visual p {
  max-width: 590px;
  margin: 0;
  color: rgba(255,255,255,.68);
  font-size: 1.08rem;
  line-height: 1.9;
}

.security-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 2rem;
}

.security-pills span {
  padding: .62rem .9rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(18px);
}

.visual-orbit {
  position: absolute;
  z-index: 0;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
}
.visual-orbit--one { width: 480px; height: 480px; right: -120px; bottom: -170px; }
.visual-orbit--two { width: 240px; height: 240px; right: 0; bottom: -45px; }

.auth-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(11, 8, 17, .84);
}

.language-button {
  position: absolute;
  top: 1.5rem;
  inset-inline-end: 1.5rem;
  min-width: 44px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255,255,255,.045);
}

.auth-card {
  width: min(100%, 480px);
  padding: clamp(1.8rem, 4vw, 3.2rem);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(31,24,43,.96), rgba(17,13,24,.96));
  box-shadow: var(--shadow);
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: .75rem;
  margin-bottom: 2.2rem;
  font-weight: 900;
}

.eyebrow {
  display: block;
  color: #bb79ff;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: .5rem 0 .7rem;
  font-size: 2rem;
}

.auth-copy {
  margin: 0 0 1.7rem;
  color: var(--muted);
  line-height: 1.7;
}

.auth-form, .form-stack { display: grid; gap: 1rem; }

label > span {
  display: block;
  margin-bottom: .48rem;
  color: #d8d2e2;
  font-size: .84rem;
  font-weight: 750;
}

label small {
  display: block;
  margin-top: .4rem;
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.5;
}

input, select, textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: rgba(255,255,255,.045);
  transition: border-color .18s, box-shadow .18s, background .18s;
}

input, select { height: 48px; padding: 0 .9rem; }
textarea { min-height: 105px; padding: .85rem; resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: rgba(168, 77, 255, .75);
  background: rgba(255,255,255,.065);
  box-shadow: 0 0 0 4px rgba(139,53,255,.12);
}

.password-field { position: relative; }
.password-field input { padding-inline-end: 3rem; }
.password-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: .6rem;
  width: 35px;
  height: 35px;
  border: 0;
  transform: translateY(-50%);
  color: var(--muted);
  background: transparent;
}

.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  padding: .72rem 1.05rem;
  font-weight: 850;
  transition: transform .14s, filter .14s, opacity .14s;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #a440ff, #6d15d5);
  box-shadow: 0 12px 28px rgba(126, 31, 222, .25);
}

.auth-form .primary-button { width: 100%; margin-top: .35rem; }
.primary-button--compact { min-height: 42px; width: auto; }
.secondary-button { border: 1px solid var(--line); color: #ddd6e9; background: rgba(255,255,255,.055); }
.primary-button:hover, .secondary-button:hover { filter: brightness(1.1); }
.primary-button:active, .secondary-button:active { transform: scale(.97); }
.primary-button:disabled { opacity: .55; cursor: wait; }

.alert {
  display: none;
  margin-bottom: 1rem;
  padding: .8rem 1rem;
  border: 1px solid rgba(255,93,114,.28);
  border-radius: 12px;
  color: #ff8b9a;
  background: rgba(255,93,114,.09);
  font-size: .84rem;
  line-height: 1.55;
}
.alert.show { display: block; }
.alert.success { border-color: rgba(50,213,139,.3); color: #66e8ad; background: rgba(50,213,139,.09); }

.boot-screen {
  position: fixed;
  z-index: 999;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.2rem;
  background: #0b0811;
}

.boot-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255,255,255,.12);
  border-top-color: #b94cff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.panel-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 272px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 1.25rem;
  border-inline-end: 1px solid var(--line);
  background: rgba(15, 11, 22, .96);
  backdrop-filter: blur(26px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .25rem .2rem 1.5rem;
}
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand strong { font-size: 1.05rem; }
.sidebar-brand small { margin-top: .22rem; color: var(--muted); font-size: .58rem; letter-spacing: .16em; }

.side-nav { display: grid; gap: .32rem; }
.nav-label {
  margin: 1.05rem .7rem .45rem;
  color: #6e667a;
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nav-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: .75rem;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 .8rem;
  color: #aaa2b7;
  text-align: start;
  background: transparent;
}
.nav-button:hover { color: #fff; background: rgba(255,255,255,.045); }
.nav-button.active { color: #fff; background: linear-gradient(90deg, rgba(139,53,255,.24), rgba(139,53,255,.06)); box-shadow: inset 3px 0 #a74aff; }
[dir="rtl"] .nav-button.active { box-shadow: inset -3px 0 #a74aff; }
.nav-icon { display: grid; width: 24px; place-items: center; color: #ba72ff; font-size: 1rem; }

.app-nav-card {
  padding: .7rem;
  border: 1px solid rgba(167,74,255,.13);
  border-radius: 16px;
  background: rgba(139,53,255,.045);
}
.app-nav-heading { display: flex; align-items: center; gap: .65rem; padding: .2rem .3rem .7rem; }
.app-nav-heading strong, .app-nav-heading small { display: block; }
.app-nav-heading strong { font-size: .78rem; }
.app-nav-heading small { margin-top: .15rem; color: #756c82; font-size: .64rem; }
.nav-button--sub { min-height: 39px; font-size: .82rem; }

.music-app-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #b942ff, #6320df);
  box-shadow: 0 8px 20px rgba(139,53,255,.2);
}
.music-app-icon--large { width: 54px; height: 54px; border-radius: 17px; font-size: 1.5rem; }

.music-app-logo {
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(188, 78, 255, .24);
  border-radius: 12px;
  object-fit: cover;
  background: #050507;
  box-shadow: 0 8px 22px rgba(123, 25, 222, .24);
}

.music-app-logo--large {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(123, 25, 222, .28);
}

.sidebar-user {
  display: grid;
  grid-template-columns: 38px 1fr 34px;
  align-items: center;
  gap: .65rem;
  margin-top: auto;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.035);
}
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { font-size: .82rem; }
.sidebar-user small { margin-top: .14rem; color: var(--muted); font-size: .67rem; }
.sidebar-user button { width: 32px; height: 32px; border: 0; border-radius: 9px; color: var(--muted); background: rgba(255,255,255,.045); }
.avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; font-weight: 900; background: linear-gradient(145deg,#8d37f4,#4f1e91); }

.workspace { min-width: 0; }
.workspace-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  min-height: 86px;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2.2rem);
  border-bottom: 1px solid var(--line);
  background: rgba(11,8,17,.82);
  backdrop-filter: blur(24px);
}
.workspace-header h1 { margin: .2rem 0 0; font-size: 1.28rem; }
.breadcrumb { color: var(--muted); font-size: .72rem; }
.breadcrumb b { color: #c6bed1; }
.header-actions { display: flex; align-items: center; gap: .8rem; margin-inline-start: auto; }
.language-button--header { position: static; }
.server-status {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .72rem;
  background: rgba(255,255,255,.035);
}
.server-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(50,213,139,.1); }
.menu-button { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.04); }

.workspace-content { width: min(1480px, 100%); margin: auto; padding: clamp(1rem, 3vw, 2.2rem); }

.welcome-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 210px;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(176,92,255,.22);
  border-radius: 25px;
  background:
    radial-gradient(circle at 85% 20%, rgba(220,125,255,.32), transparent 16rem),
    linear-gradient(135deg, #351052, #171022 72%);
}
.welcome-card::after { content: ""; position: absolute; width: 280px; height: 280px; inset-inline-end: -65px; top: -95px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.welcome-card h2 { max-width: 650px; margin: .55rem 0 .7rem; font-size: clamp(1.8rem, 4vw, 3.2rem); letter-spacing: -.04em; }
.welcome-card p { margin: 0; color: #b7adc3; line-height: 1.7; }
.welcome-note { position: relative; z-index: 1; color: rgba(255,255,255,.11); font-size: clamp(2.4rem, 7vw, 6rem); font-weight: 950; line-height: .8; text-align: end; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1rem 0; }
.metric-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: .15rem .9rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(28,22,40,.96), rgba(18,14,25,.96));
}
.metric-card .metric-icon { grid-row: span 2; display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; font-weight: 900; }
.metric-icon.purple { color: #c681ff; background: rgba(139,53,255,.16); }
.metric-icon.blue { color: #77bdff; background: rgba(78,167,255,.14); }
.metric-icon.orange { color: #ffc16e; background: rgba(255,173,66,.14); }
.metric-icon.green { color: #62e5af; background: rgba(50,213,139,.13); }
.metric-card small { color: var(--muted); font-size: .75rem; }
.metric-card strong { font-size: 1.55rem; }

.section-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(20,16,29,.88);
  box-shadow: 0 12px 42px rgba(0,0,0,.14);
}
.section-card__header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem; border-bottom: 1px solid var(--line); }
.section-card h2 { margin: .35rem 0 0; font-size: 1.1rem; }
.application-card {
  display: grid;
  grid-template-columns: 54px minmax(150px, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem;
}
.application-card strong, .application-card small { display: block; }
.application-card small { margin-top: .25rem; color: var(--muted); font-size: .72rem; }
.application-actions { display: flex; gap: .6rem; }

.status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .42rem .65rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 850;
}
.status-badge--on { color: #62e5af; background: rgba(50,213,139,.11); }
.status-badge--off { color: #b2aabb; background: rgba(255,255,255,.06); }
.status-badge--force { color: #ff8594; background: rgba(255,93,114,.11); }
.status-badge--optional { color: #c58cff; background: rgba(139,53,255,.13); }

.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.15rem; }
.page-intro h2 { margin: .4rem 0 .45rem; font-size: clamp(1.5rem, 3vw, 2.25rem); }
.page-intro p { margin: 0; color: var(--muted); line-height: 1.6; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 1rem 1.05rem; border-bottom: 1px solid var(--line); text-align: start; white-space: nowrap; }
th { color: #81798f; font-size: .67rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
td { color: #d5cede; font-size: .8rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.022); }
.table-actions { display: flex; justify-content: flex-end; gap: .4rem; }
.icon-action { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: rgba(255,255,255,.035); }
.icon-action:hover { color: #fff; border-color: rgba(168,77,255,.35); }
.icon-action.danger:hover { color: #ff7183; border-color: rgba(255,93,114,.35); }
.empty-state { display: grid; min-height: 230px; place-content: center; justify-items: center; gap: .65rem; color: var(--muted); }
.empty-state span { font-size: 2rem; color: #8e49d2; }

.ad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ad-card {
  position: relative;
  overflow: hidden;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: linear-gradient(145deg, rgba(29,22,41,.98), rgba(16,12,23,.98));
}
.ad-card::after { content: ""; position: absolute; width: 180px; height: 180px; inset-inline-end: -80px; top: -90px; border-radius: 50%; background: rgba(139,53,255,.09); }
.ad-card__head { position: relative; z-index: 1; display: flex; align-items: center; gap: .85rem; }
.ad-card__head > span:first-child { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; color: #c785ff; background: rgba(139,53,255,.14); font-size: 1.2rem; }
.ad-card__head div { min-width: 0; flex: 1; }
.ad-card h3, .ad-card p { margin: 0; }
.ad-card h3 { font-size: 1rem; }
.ad-card p { margin-top: .3rem; color: var(--muted); font-size: .73rem; line-height: 1.5; }
.ad-details { display: grid; gap: .65rem; margin: 1.2rem 0; }
.ad-detail { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem .8rem; border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.035); font-size: .72rem; }
.ad-detail b { max-width: 60%; overflow: hidden; color: #d7d0df; direction: ltr; text-overflow: ellipsis; white-space: nowrap; }
.ad-card__footer { display: flex; align-items: center; justify-content: space-between; }

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(3,2,6,.76);
  backdrop-filter: blur(10px);
}
.modal-card {
  width: min(100%, 560px);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 22px;
  background: #17111f;
  box-shadow: var(--shadow);
}
.modal-card--wide { width: min(100%, 830px); }
.modal-card header, .modal-card footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.35rem; }
.modal-card header { position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line); background: rgba(23,17,31,.95); backdrop-filter: blur(18px); }
.modal-card footer { position: sticky; bottom: 0; justify-content: flex-end; border-top: 1px solid var(--line); background: rgba(23,17,31,.95); backdrop-filter: blur(18px); }
.modal-card h2 { margin: .35rem 0 0; font-size: 1.15rem; }
.modal-close { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.04); font-size: 1.35rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1.35rem; }
.form-grid__full { grid-column: 1 / -1; }
.form-stack { padding: 1.35rem; }

.switch-row {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}
.switch-row span, .switch-row strong, .switch-row small { display: block; margin: 0; }
.switch-row small { margin-top: .25rem; color: var(--muted); }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i { position: relative; width: 46px; height: 26px; flex: 0 0 auto; border-radius: 999px; background: #3a3343; transition: .2s; }
.switch-row i::after { content: ""; position: absolute; width: 20px; height: 20px; top: 3px; left: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.switch-row input:checked + i { background: #8b35ff; }
.switch-row input:checked + i::after { transform: translateX(20px); }

.toast-stack { position: fixed; z-index: 200; inset-inline-end: 1rem; bottom: 1rem; display: grid; gap: .6rem; }
.toast { min-width: 260px; max-width: 380px; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 13px; color: #ddd6e8; background: #201829; box-shadow: var(--shadow); animation: toast-in .22s ease-out; }
.toast.success { border-color: rgba(50,213,139,.28); }
.toast.error { border-color: rgba(255,93,114,.3); color: #ff9aa7; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

.mobile-overlay { display: none; }

@media (max-width: 980px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .mobile-brand { display: flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-inline-start: 0; width: min(86vw, 290px); transform: translateX(-110%); transition: transform .22s; }
  [dir="rtl"] .sidebar { transform: translateX(110%); }
  .sidebar.open { transform: translateX(0); }
  .mobile-overlay { position: fixed; z-index: 50; inset: 0; background: rgba(0,0,0,.55); }
  .mobile-overlay.show { display: block; }
  .menu-button { display: block; }
}

@media (max-width: 700px) {
  .auth-panel { padding: 1rem; }
  .auth-card { padding: 1.35rem; border-radius: 21px; }
  .workspace-header { min-height: 74px; }
  .breadcrumb, .server-status span { display: none; }
  .welcome-card { min-height: 190px; }
  .welcome-note { display: none; }
  .stats-grid, .ad-grid, .form-grid { grid-template-columns: 1fr; }
  .form-grid__full { grid-column: auto; }
  .application-card { grid-template-columns: 48px 1fr auto; }
  .application-actions { grid-column: 1 / -1; }
  .application-actions .secondary-button { flex: 1; }
  .page-intro { align-items: stretch; flex-direction: column; }
  .page-intro .primary-button { align-self: flex-start; }
}

@media (max-width: 430px) {
  .workspace-content { padding: .8rem; }
  .workspace-header { padding: .8rem; }
  .workspace-header h1 { font-size: 1rem; }
  .metric-card { padding: .9rem; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal-card, .modal-card--wide { max-height: 92vh; border-radius: 22px 22px 0 0; }
}
