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

:root {
  --primary: #39A9E8;
  --primary-dark: #168bd2;
  --bg: #f4f7fb;
  --white: #ffffff;
  --text: #17324d;
  --muted: #718096;
  --border: #e5eaf0;
  --success: #16a36a;
  --danger: #e05252;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(23,50,77,.06);
}

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

body {
  font-family: 'Inter', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1200px, 94%);
  margin: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: .2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
}

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

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

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-brand {
  background: linear-gradient(145deg, #168bd2, #39A9E8);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9%;
}

.auth-brand h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
  margin-bottom: 18px;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px;
}

.auth-form {
  width: 100%;
  max-width: 420px;
}

.auth-form h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.form-group {
  margin: 18px 0;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 7px;
}

.form-control {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: white;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(57,169,232,.12);
}

.auth-form .btn {
  width: 100%;
  margin-top: 10px;
}

.dashboard {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 250px;
  background: #17324d;
  color: white;
  padding: 25px 16px;
  flex-shrink: 0;
}

.sidebar-logo {
  font-size: 21px;
  font-weight: 800;
  padding: 8px 12px 28px;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin: 5px 0;
}

.sidebar-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  color: #c7d5e3;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: var(--primary);
  color: white;
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: 30px;
}

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

.topbar h1 {
  font-size: 25px;
}

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

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.stat-card h3 {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.stat-card strong {
  display: block;
  font-size: 27px;
  margin-top: 9px;
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th, td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.badge-success {
  background: #e4f7ed;
  color: #168653;
}

.badge-pending {
  background: #fff4dc;
  color: #a66b00;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.plan-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 25px;
}

.plan-card.featured {
  border: 2px solid var(--primary);
}

.plan-price {
  font-size: 32px;
  font-weight: 800;
  margin: 15px 0;
}

.plan-card ul {
  list-style: none;
  margin: 20px 0;
}

.plan-card li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.progress {
  height: 9px;
  background: #e9eef4;
  border-radius: 20px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 20px;
}

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

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

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

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

  .auth-brand {
    padding: 35px 25px;
    min-height: 220px;
  }

  .auth-panel {
    padding: 25px 20px;
  }

  .sidebar {
    width: 190px;
  }

  .main-content {
    padding: 18px 12px;
  }

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

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