@import url("https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --bg-top: #f0f4fa;
  --bg-mid: #e7edf6;
  --bg-bottom: #dde6f2;
  --ink-strong: #0f1f3a;
  --ink-mid: #314769;
  --ink-soft: #5e7091;
  --line-soft: rgba(54, 80, 124, 0.22);
  --line-dark: rgba(184, 207, 245, 0.2);
  --panel-dark-a: #2f3f5c;
  --panel-dark-b: #1f2d45;
  --panel-dark-c: #17243b;
  --accent: #ff465f;
  --accent-strong: #da2748;
  --accent-soft: rgba(255, 70, 95, 0.2);
  --panel-shadow: 0 25px 55px rgba(18, 31, 56, 0.16);
  --surface-shadow: 0 18px 42px rgba(12, 27, 53, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink-strong);
  font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.46) 0%, rgba(255, 255, 255, 0.12) 32%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 48%, var(--bg-bottom) 100%);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(130deg, rgba(28, 50, 88, 0.03) 8%, transparent 8%, transparent 50%, rgba(28, 50, 88, 0.03) 50%, rgba(28, 50, 88, 0.03) 58%, transparent 58%, transparent 100%);
  background-size: 240px 220px;
  opacity: 0.55;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(16px);
  z-index: 0;
}

.ambient-one {
  width: 48vw;
  height: 48vw;
  left: -10vw;
  top: -14vw;
  background: radial-gradient(circle, rgba(73, 108, 173, 0.34) 0%, rgba(73, 108, 173, 0) 70%);
}

.ambient-two {
  width: 52vw;
  height: 52vw;
  right: -18vw;
  bottom: -18vw;
  background: radial-gradient(circle, rgba(210, 44, 82, 0.22) 0%, rgba(210, 44, 82, 0) 74%);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1700px, 100%);
  margin: 0 auto;
  padding: 30px 22px;
}

.hidden {
  display: none !important;
}

.kicker {
  margin: 0 0 8px;
  font-family: "Rajdhani", "Manrope", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(206, 220, 246, 0.85);
}

h1,
h2 {
  margin: 0;
  font-family: "Rajdhani", "Manrope", sans-serif;
  letter-spacing: 0.01em;
}

.subtext {
  margin: 0;
  color: #b9c8e0;
  line-height: 1.55;
}

.panel-dark {
  border: 1px solid var(--line-dark);
  background:
    radial-gradient(circle at 95% 8%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(145deg, var(--panel-dark-a) 0%, var(--panel-dark-b) 48%, var(--panel-dark-c) 100%);
  border-radius: 28px;
  box-shadow: var(--panel-shadow);
  color: #e8f1ff;
}

.login-card {
  max-width: 760px;
  margin: 52px auto 0;
  padding: 34px;
}

.login-card h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-bottom: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.87rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(188, 208, 238, 0.95);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(171, 196, 234, 0.2);
  border-radius: 14px;
  padding: 11px 12px;
  color: #f2f7ff;
  background: rgba(10, 22, 42, 0.38);
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(255, 70, 95, 0.32);
  border-color: rgba(255, 70, 95, 0.58);
}

input::placeholder,
textarea::placeholder {
  color: rgba(172, 193, 225, 0.75);
}

.dashboard {
  display: grid;
  grid-template-columns: 295px minmax(0, 1fr);
  gap: 20px;
}

.sidebar {
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 60px);
  position: sticky;
  top: 20px;
}

.brand-block {
  border: 1px solid rgba(177, 203, 239, 0.2);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 20px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.brand-block h1 {
  font-size: 1.95rem;
  margin-bottom: 10px;
  line-height: 1.02;
}

.tabs {
  display: grid;
  gap: 10px;
}

.tab-btn {
  border: 1px solid rgba(174, 196, 235, 0.2);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(10, 23, 45, 0.3);
  color: #d8e8ff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  font-family: "Rajdhani", "Manrope", sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.tab-btn:hover {
  border-color: rgba(207, 224, 250, 0.46);
  transform: translateY(-1px);
}

.tab-btn.active {
  border-color: rgba(255, 95, 122, 0.8);
  background: linear-gradient(140deg, rgba(255, 70, 95, 0.32), rgba(255, 70, 95, 0.12));
  color: #fff;
}

.tab-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.88rem;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(171, 197, 236, 0.24);
  padding-top: 16px;
}

.content-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

.topbar {
  border-radius: 26px;
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.topbar h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  margin-bottom: 10px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-pill {
  border: 1px solid rgba(171, 198, 238, 0.3);
  border-radius: 999px;
  padding: 8px 14px 8px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(9, 20, 39, 0.34);
  max-width: 360px;
}

.avatar-badge {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, rgba(255, 70, 95, 0.3), rgba(40, 53, 79, 0.75));
  color: #fff;
  font-family: "Rajdhani", "Manrope", sans-serif;
  font-weight: 700;
}

.session-meta {
  margin: 0;
  color: #d7e5fa;
  font-size: 0.92rem;
}

.status-strip {
  min-height: 1.4rem;
  margin: 0;
  color: var(--ink-mid);
  font-size: 0.93rem;
  padding-left: 6px;
}

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-note {
  color: var(--ink-soft) !important;
}

.tab-panel {
  display: none;
}

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

.split-layout {
  display: grid;
  grid-template-columns: minmax(345px, 540px) minmax(0, 1fr);
  gap: 16px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 45;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 13, 27, 0.62);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  width: min(1100px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  margin: 20px auto;
  padding: 20px;
  overflow: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-header h2 {
  color: #eaf2ff;
  font-size: clamp(1.5rem, 2.2vw, 1.95rem);
}

.modal-close {
  min-width: 108px;
}

.panel {
  border-radius: 24px;
  padding: 18px;
}

.panel-soft {
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(239, 246, 255, 0.62) 100%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.8), rgba(230, 239, 252, 0.58));
  box-shadow: var(--surface-shadow);
}

.panel-soft h2 {
  color: var(--ink-strong);
  margin-bottom: 12px;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
}

.panel-soft .subtext,
.panel-soft .helper-text,
.panel-soft .muted-inline {
  color: var(--ink-soft);
}

.panel-soft label {
  color: var(--ink-mid);
}

.panel-soft input,
.panel-soft textarea,
.panel-soft select {
  color: #1d3357;
  border-color: rgba(93, 121, 166, 0.26);
  background: rgba(255, 255, 255, 0.88);
}

.panel-soft input::placeholder,
.panel-soft textarea::placeholder {
  color: #6d82a8;
}

.checkbox-label {
  align-items: center;
  flex-direction: row !important;
  gap: 8px;
}

.checkbox-label input {
  width: auto;
}

.span-2 {
  grid-column: span 2;
}

.stack {
  display: grid;
  gap: 12px;
}

.helper-text {
  margin: 0;
  font-size: 0.89rem;
}

.btn {
  border-radius: 14px;
  padding: 10px 15px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Rajdhani", "Manrope", sans-serif;
  letter-spacing: 0.02em;
  font-weight: 700;
  font-size: 1rem;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 10px 24px rgba(218, 39, 72, 0.32);
}

.btn-outline {
  color: #d9e8ff;
  border-color: rgba(184, 206, 241, 0.35);
  background: rgba(10, 22, 41, 0.35);
}

.panel-soft .btn-outline,
.panel-soft .btn-danger,
.panel-soft .btn-ghost {
  color: #29436a;
  border-color: rgba(83, 114, 162, 0.4);
  background: rgba(255, 255, 255, 0.78);
}

.btn-ghost {
  color: #d9e8ff;
  border-color: rgba(179, 206, 245, 0.3);
  background: rgba(11, 23, 44, 0.2);
}

.btn-danger {
  color: #9f1f39;
  border-color: rgba(159, 31, 57, 0.35);
  background: rgba(255, 238, 242, 0.75);
}

button:disabled,
.btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.error {
  margin: 0;
  min-height: 1.1rem;
  color: #ff5d7f;
  font-size: 0.92rem;
}

.panel-soft .error {
  color: #b31942;
}

.muted-inline {
  font-size: 0.9rem;
}

.table-wrap {
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(91, 120, 165, 0.24);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(89, 118, 164, 0.18);
  text-align: left;
  vertical-align: top;
  color: #203557;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #edf3fd, #deebfd);
  color: #1b2f4f;
  font-family: "Rajdhani", "Manrope", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-pill {
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid rgba(92, 121, 166, 0.38);
  background: rgba(255, 255, 255, 0.82);
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions .btn {
  padding: 7px 11px;
  font-size: 0.93rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: #213e67;
}

@media (max-width: 1250px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

  .sidebar-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar-footer {
    margin-top: 14px;
  }
}

@media (max-width: 1040px) {
  .split-layout {
    grid-template-columns: 1fr;
  }

  .section-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 18px 14px;
  }

  .login-card {
    padding: 24px;
    margin-top: 24px;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-actions,
  .button-row.wrap-on-mobile {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .profile-pill {
    max-width: none;
    width: 100%;
  }

  .sidebar-tabs {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-card {
    width: calc(100vw - 20px);
    margin: 10px auto;
    max-height: calc(100vh - 20px);
    padding: 16px;
  }

  .span-2 {
    grid-column: span 1;
  }

  .btn,
  .button-row .btn,
  .button-row.wrap-on-mobile .btn {
    width: 100%;
  }
}
