:root {
  --bg: #edf2f7;
  --bg-soft: #f8fafc;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #ffffff;
  --line: rgba(15, 23, 42, 0.08);
  --text: #102033;
  --muted: #64748b;
  --navy: #0f2742;
  --navy-2: #17395e;
  --teal: #0ea5a4;
  --cyan: #22c1c3;
  --gold: #f4b400;
  --blue: #2667ff;
  --green: #1db954;
  --red: #ef4444;
  --shadow: 0 18px 45px rgba(15, 39, 66, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(34, 193, 195, 0.14), transparent 28%),
    radial-gradient(circle at right, rgba(38, 103, 255, 0.1), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

body,
input,
button,
select,
textarea,
table {
  font-family: inherit;
}

.vpn-app-body {
  min-height: 100vh;
}

.vpn-shell {
  display: grid;
  grid-template-columns: 290px 1fr;
  min-height: 100vh;
}

.vpn-sidebar {
  background:
    radial-gradient(circle at top, rgba(34, 193, 195, 0.18), transparent 26%),
    linear-gradient(180deg, var(--navy) 0%, #081728 100%);
  color: #e5eefb;
  padding: 28px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.vpn-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none;
  margin-bottom: 34px;
}

.vpn-brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  color: #06273b;
  font-size: 20px;
  box-shadow: 0 15px 35px rgba(34, 193, 195, 0.22);
}

.vpn-brand strong,
.vpn-brand small {
  display: block;
}

.vpn-brand small {
  opacity: 0.72;
  margin-top: 2px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
}

.vpn-nav {
  display: grid;
  gap: 10px;
}

.vpn-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  color: #c4d5ea;
  text-decoration: none;
  transition: all 0.2s ease;
}

.vpn-nav-link:hover,
.vpn-nav-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.vpn-sidebar-foot {
  margin-top: auto;
}

.vpn-sidebar-note {
  padding: 15px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.vpn-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.12);
}

.vpn-main {
  padding: 24px;
}

.vpn-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.vpn-eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.vpn-page-title {
  margin: 0;
  font-size: 36px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.04em;
}

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

.vpn-user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.vpn-user-chip strong,
.vpn-user-chip small {
  display: block;
}

.vpn-user-chip small {
  color: var(--muted);
  text-transform: capitalize;
}

.vpn-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
  font-weight: 800;
}

.vpn-ghost-btn,
.btn,
button {
  border-radius: 14px !important;
}

.vpn-ghost-btn {
  border: 1px solid rgba(239, 68, 68, 0.28);
  background: #fff;
  color: #dc2626;
  padding: 11px 16px;
  font-weight: 700;
}

.vpn-content {
  display: block;
}

.vpn-flash {
  padding: 14px 18px;
  border-radius: 18px;
  margin-bottom: 18px;
  font-weight: 600;
  border: 1px solid transparent;
}

.vpn-flash-success { background: rgba(29, 185, 84, 0.12); border-color: rgba(29, 185, 84, 0.2); color: #0c7a31; }
.vpn-flash-danger { background: rgba(239, 68, 68, 0.11); border-color: rgba(239, 68, 68, 0.18); color: #b91c1c; }
.vpn-flash-info { background: rgba(34, 193, 195, 0.12); border-color: rgba(34, 193, 195, 0.2); color: #0f766e; }
.vpn-flash-warning { background: rgba(244, 180, 0, 0.12); border-color: rgba(244, 180, 0, 0.18); color: #9a6700; }

.vpn-hero {
  margin-bottom: 24px;
  border-radius: 28px;
  padding: 30px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 25%),
    linear-gradient(135deg, #0f2742 0%, #12385d 40%, #0ea5a4 100%);
  box-shadow: 0 22px 55px rgba(15, 39, 66, 0.16);
}

.vpn-hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
  align-items: end;
}

.vpn-hero h2 {
  margin: 0 0 10px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.vpn-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  max-width: 720px;
}

.vpn-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.vpn-mini-card {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 16px;
}

.vpn-mini-card span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.vpn-mini-card strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 148px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  box-shadow: var(--shadow);
}

.metric-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  right: -36px;
  top: -36px;
  background: rgba(255, 255, 255, 0.12);
}

.metric-card i {
  position: absolute;
  right: 24px;
  bottom: 24px;
  font-size: 34px;
  opacity: 0.22;
}

.metric-card small {
  display: block;
  opacity: 0.78;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-card strong {
  display: block;
  font-size: 44px;
  line-height: 1;
  font-weight: 800;
  margin: 10px 0 8px;
}

.metric-card p {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
}

.metric-teal { background: linear-gradient(135deg, #0f9fb8, #0ea5a4); }
.metric-green { background: linear-gradient(135deg, #16a34a, #22c55e); }
.metric-gold { background: linear-gradient(135deg, #f59e0b, #f4b400); color: #142233; }
.metric-blue { background: linear-gradient(135deg, #2667ff, #3b82f6); }

.vpn-section-card,
.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  border-radius: 24px !important;
  overflow: hidden;
}

.vpn-section-card {
  padding: 0;
}

.vpn-section-head,
.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--line) !important;
  padding: 18px 22px !important;
}

.vpn-section-head h3,
.card-title {
  margin: 0 !important;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.vpn-section-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.card-body {
  padding: 20px 22px !important;
}

.card-body.p-0 {
  padding: 0 !important;
}

.card-footer {
  border-top: 1px solid var(--line) !important;
  background: transparent !important;
  padding: 18px 22px !important;
}

.vpn-stat-list {
  display: grid;
  gap: 14px;
}

.vpn-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}

.vpn-stat-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.vpn-stat-row span {
  color: var(--muted);
}

.vpn-stat-row strong {
  text-align: right;
}

.table {
  margin-bottom: 0 !important;
}

.table thead th {
  border-top: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 16px 18px !important;
  background: rgba(248, 250, 252, 0.92);
}

.table td {
  padding: 15px 18px !important;
  vertical-align: middle !important;
  border-top: 1px solid rgba(15, 23, 42, 0.05) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
  background: rgba(255, 255, 255, 0.34);
}

.badge {
  padding: 8px 10px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  border-radius: 999px !important;
}

.btn {
  font-weight: 700 !important;
  padding: 9px 14px !important;
  border-width: 1px !important;
}

.btn-primary { background: linear-gradient(135deg, var(--blue), #5b8cff) !important; border-color: transparent !important; }
.btn-secondary { background: linear-gradient(135deg, #6b7280, #8892a0) !important; border-color: transparent !important; }
.btn-warning { color: #162338 !important; }
.btn-outline-primary,
.btn-outline-danger,
.btn-outline-success {
  background: rgba(255, 255, 255, 0.76) !important;
}

.form-control,
.custom-select,
textarea,
select {
  border-radius: 16px !important;
  border: 1px solid rgba(15, 23, 42, 0.09) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  min-height: 46px;
  padding: 10px 14px !important;
  box-shadow: none !important;
}

.form-control:focus,
textarea:focus,
select:focus {
  border-color: rgba(38, 103, 255, 0.4) !important;
  box-shadow: 0 0 0 4px rgba(38, 103, 255, 0.08) !important;
}

label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

code,
pre {
  font-family: "Consolas", "Courier New", monospace;
}

code {
  color: #d63384;
  background: rgba(15, 39, 66, 0.05);
  border-radius: 10px;
  padding: 4px 8px;
  white-space: normal;
  word-break: break-word;
}

.log-box {
  min-height: 460px;
  max-height: 460px;
  overflow: auto;
  background: linear-gradient(180deg, #0d1625, #141e31);
  color: #dbe9ff;
  border-radius: 18px;
  padding: 18px;
  font-size: 13px;
}

.user-edit-row td {
  background: rgba(244, 248, 252, 0.86) !important;
}

.user-search {
  max-width: 250px;
}

.user-note-field {
  min-width: 240px;
}

.vpn-stack {
  display: grid;
  gap: 22px;
}

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

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

.vpn-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

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

.vpn-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at left top, rgba(34, 193, 195, 0.16), transparent 24%),
    radial-gradient(circle at bottom right, rgba(38, 103, 255, 0.16), transparent 28%),
    linear-gradient(145deg, #eef7ff, #eef2f8);
}

.vpn-login-shell {
  width: min(1100px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: stretch;
}

.vpn-login-showcase,
.vpn-login-card {
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(15, 39, 66, 0.12);
}

.vpn-login-showcase {
  padding: 34px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.22), transparent 24%),
    linear-gradient(135deg, #0f2742 0%, #12385d 45%, #0ea5a4 100%);
}

.vpn-login-showcase h1 {
  font-size: 46px;
  line-height: 1;
  margin: 18px 0 14px;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.vpn-login-showcase p {
  max-width: 520px;
  color: rgba(255,255,255,0.82);
}

.vpn-login-badges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.vpn-login-badge {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  padding: 15px;
}

.vpn-login-card {
  background: rgba(255,255,255,0.92);
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.65);
}

.vpn-login-card h2 {
  margin: 0 0 8px;
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.vpn-login-card p {
  color: var(--muted);
}

.vpn-login-card .btn {
  min-height: 48px;
}

.vpn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vpn-muted {
  color: var(--muted);
}

@media (max-width: 1200px) {
  .metric-grid,
  .vpn-card-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .vpn-shell {
    grid-template-columns: 1fr;
  }

  .vpn-sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .vpn-main {
    padding: 18px;
  }

  .vpn-hero-grid,
  .vpn-card-grid-2,
  .vpn-login-shell {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .vpn-card-grid-3 {
    grid-template-columns: 1fr;
  }

  .vpn-topbar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .vpn-page-title {
    font-size: 28px;
  }

  .vpn-hero {
    padding: 22px;
  }

  .vpn-hero h2 {
    font-size: 28px;
  }

  .metric-card strong {
    font-size: 36px;
  }

  .table td,
  .table thead th {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}
