@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --outer-bg: #e7f0f5;
  --canvas-bg: #eef5f9;
  --card-bg: #dee9f0;
  --card-hover: #d6e4ed;
  --card-white: #f7fbfd;
  --dark: #0b0c0e;
  --dark-soft: #1a1c20;
  --dark-track: #2b2e35;
  --text: #101216;
  --muted: #5f6c78;
  --border: rgba(16, 18, 22, 0.08);
  --green-bg: #cdecd9;
  --green-text: #15743f;
  --red-bg: #f6d5d8;
  --red-text: #b82d38;
  --amber-bg: #f7e6c9;
  --amber-text: #945609;
  --radius-shell: 28px;
  --radius-card: 22px;
  --radius-sm: 14px;
  --shadow-shell: 0 24px 60px rgba(15, 35, 52, 0.08);
  --shadow-dark: 0 16px 36px rgba(11, 12, 14, 0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--outer-bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; }

.app-outer {
  min-height: 100vh;
  padding: 18px;
  display: flex;
  justify-content: center;
}

.app-shell {
  width: 100%;
  max-width: 1440px;
  min-height: calc(100vh - 36px);
  background: var(--canvas-bg);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-shell);
  padding: 16px;
  display: flex;
  gap: 24px;
  position: relative;
}

.sidebar {
  width: 78px;
  flex-shrink: 0;
  background: var(--dark);
  color: #fff;
  border-radius: 24px;
  padding: 22px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: width 0.22s ease;
  box-shadow: var(--shadow-dark);
}

.sidebar.expanded {
  width: 224px;
  padding: 22px 16px;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 28px;
}

.sidebar.expanded .sidebar-top {
  justify-content: flex-start;
  padding-left: 8px;
}

.sidebar-brand {
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.sidebar-brand-full { display: none; }
.sidebar.expanded .sidebar-brand-short { display: none; }
.sidebar.expanded .sidebar-brand-full { display: inline; font-size: 18px; }

.sidebar-toggle {
  position: absolute;
  right: -25px;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
  transition: transform 0.2s ease;
}

.sidebar-toggle svg { width: 14px; height: 14px; }
.sidebar.expanded .sidebar-toggle svg { transform: rotate(180deg); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.side-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 46px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.62);
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 0 12px;
  transition: background 0.16s ease, color 0.16s ease;
}

.sidebar.expanded .side-link { justify-content: flex-start; }

.side-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.side-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.side-link.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 10px;
  bottom: 10px;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: #ffffff;
}

.sidebar.expanded .side-link.active::before { left: -16px; }

.side-icon {
  width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.side-icon svg { width: 20px; height: 20px; }
.side-label { display: none; white-space: nowrap; }
.sidebar.expanded .side-label { display: inline; }

.sidebar-bottom {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.app-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 6px 8px 12px 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.topbar-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: var(--card-bg);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mobile-menu-btn svg { width: 20px; height: 20px; }

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

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: transparent;
  transition: background 0.15s ease;
}
.icon-btn:hover { background: var(--card-bg); }
.icon-btn svg { width: 20px; height: 20px; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: var(--card-bg);
  transition: background 0.15s ease;
}
.user-chip:hover { background: var(--card-hover); }

.avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-chip-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.user-chip-name { font-size: 13px; font-weight: 700; }
.user-chip-plan { font-size: 11px; color: var(--muted); font-weight: 600; }

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
  align-items: start;
}

.main-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.right-rail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 146px;
  transition: background 0.16s ease, transform 0.16s ease;
}
.kpi-card:hover { background: var(--card-hover); transform: translateY(-1px); }

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

.kpi-ico {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.kpi-ico svg { width: 24px; height: 24px; }

.kpi-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.kpi-val {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 6px;
}

.kpi-label {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.3;
}

.mid-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
}

.mini-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mini-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mini-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mini-num {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.pill-green { background: var(--green-bg); color: var(--green-text); }
.pill-red { background: var(--red-bg); color: var(--red-text); }
.pill-amber { background: var(--amber-bg); color: var(--amber-text); }
.pill-dark { background: var(--dark); color: #fff; }

.soft-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 22px 24px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card-sub {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
}

.chart-wrap {
  position: relative;
  height: 165px;
  margin-top: 6px;
}
.chart-svg { width: 100%; height: 100%; overflow: visible; }
.chart-tooltip {
  position: absolute;
  top: 8px;
  left: 34%;
  background: var(--dark);
  color: #fff;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.dark-card {
  background: var(--dark);
  color: #ffffff;
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-dark);
}

.dark-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dark-muted {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--dark-track);
  overflow: hidden;
  margin: 18px 0 14px;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: #dcebf5;
  transition: width 0.3s ease;
}

.todo-section h3 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 13px;
}

.todo-ico {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--dark);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.todo-ico.done {
  background: var(--green-bg);
  color: var(--green-text);
}
.todo-ico svg { width: 18px; height: 18px; }

.todo-title { font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.todo-sub { font-size: 12px; color: var(--muted); }

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 7px;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--dark);
  color: #ffffff;
  border: none;
  border-radius: 13px;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }

.btn-light {
  background: #e9f2f7;
  color: var(--dark);
}
.btn-light:hover { background: #ffffff; opacity: 1; }

.btn-soft {
  background: rgba(16, 18, 22, 0.08);
  color: var(--text);
}
.btn-soft:hover { background: rgba(16, 18, 22, 0.14); opacity: 1; }

.btn-danger {
  background: var(--red-bg);
  color: var(--red-text);
}
.btn-green {
  background: var(--green-bg);
  color: var(--green-text);
}
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 10px; }
.btn-block { width: 100%; }

.inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
  background: var(--card-white);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus {
  border-color: var(--dark);
  box-shadow: 0 0 0 3px rgba(11, 12, 14, 0.09);
}

.inline-form input, .inline-form select { flex: 1; min-width: 150px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.field input, .field select { width: 100%; }

.list-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.42);
  transition: background 0.15s ease;
  flex-wrap: wrap;
}
.list-row:hover { background: rgba(255, 255, 255, 0.78); }

.list-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.list-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.list-avatar.alt-1 { background: #264653; }
.list-avatar.alt-2 { background: #1d3557; }
.list-avatar.alt-3 { background: #3d405b; }

.list-main { font-size: 14px; font-weight: 700; word-break: break-all; }
.list-sub { font-size: 12.5px; color: var(--muted); }

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
th, td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 3px 7px;
  border-radius: 7px;
  word-break: break-all;
}

.dark-card code {
  background: rgba(255, 255, 255, 0.12);
  color: #e9f2f7;
}

.copy-btn {
  border: none;
  background: rgba(16, 18, 22, 0.09);
  color: var(--text);
  border-radius: 8px;
  padding: 4px 9px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 6px;
}
.copy-btn:hover { background: rgba(16, 18, 22, 0.16); }

.flash {
  padding: 13px 18px;
  border-radius: 16px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 16px;
}
.flash.ok { background: var(--green-bg); color: var(--green-text); }
.flash.error { background: var(--red-bg); color: var(--red-text); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.plan-card {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  border: 2px solid transparent;
  transition: transform 0.16s ease;
}
.plan-card:hover { transform: translateY(-3px); }

.plan-card.featured {
  background: var(--dark);
  color: #ffffff;
  box-shadow: var(--shadow-dark);
}
.plan-card.current { border-color: var(--dark); }
.plan-card.featured.current { border-color: #7dd3fc; }

.plan-price {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 14px 0 4px;
  line-height: 1;
}
.plan-price span {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.65;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 20px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(16, 18, 22, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.plan-card.featured .check-badge { background: rgba(255, 255, 255, 0.16); }

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tab-btn {
  padding: 9px 16px;
  border-radius: 12px;
  border: none;
  background: var(--card-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tab-btn.active { background: var(--dark); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.public-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 72px;
}

.public-nav {
  background: var(--canvas-bg);
  border-radius: 20px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-shell);
  margin-bottom: 28px;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--canvas-bg);
  border-radius: 28px;
  padding: 34px;
  box-shadow: var(--shadow-shell);
}

.domain-dns-box {
  background: rgba(255, 255, 255, 0.52);
  border-radius: 18px;
  padding: 16px;
  margin-top: 12px;
}

@media (max-width: 1160px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .app-outer { padding: 8px; }
  .app-shell { padding: 12px; border-radius: 20px; }
  .sidebar {
    position: fixed;
    left: -260px;
    top: 12px;
    bottom: 12px;
    z-index: 50;
    width: 224px;
    transition: left 0.22s ease;
  }
  .sidebar.mobile-open { left: 12px; }
  .sidebar .side-label, .sidebar .sidebar-brand-full { display: inline; }
  .sidebar .sidebar-brand-short { display: none; }
  .sidebar .side-link { justify-content: flex-start; }
  .sidebar-toggle { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .mid-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .user-chip-meta { display: none; }
  .user-chip { padding: 4px; }
}

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