* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Prompt', sans-serif;
}

body {
  background: #f8fafc;
  color: #0f172a;
  min-height: 100vh;
}

.style-hidden {
  display: none !important;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: #1e40af;
}

.nav-tabs {
  display: flex;
  gap: 6px;
}

.nav-tab-btn {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #475569;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.15s;
}
.nav-tab-btn:hover { background: #e2e8f0; }
.nav-tab-btn.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.container {
  max-width: 1240px;
  margin: 24px auto;
  padding: 0 16px;
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.card h2, .card h3 {
  font-weight: 700;
  margin-bottom: 6px;
  color: #1e293b;
}

.subtitle {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}

.auth-card {
  max-width: 480px;
  margin: 60px auto;
  text-align: center;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary { background: #2563eb; color: #fff; } .btn-primary:hover { background: #1d4ed8; }
.btn-success { background: #10b981; color: #fff; } .btn-success:hover { background: #059669; }
.btn-google { background: #ffffff; color: #374151; border: 1px solid #cbd5e1; } .btn-google:hover { background: #f8fafc; }
.btn-danger { background: #ef4444; color: #fff; } .btn-danger:hover { background: #dc2626; }
.btn-amber { background: #f59e0b; color: #fff; } .btn-amber:hover { background: #d97706; }

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}
.divider::before { margin-right: .5em; }
.divider::after { margin-left: .5em; }

.mock-login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mock-login-form input, .input-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2563eb;
}

.email-text {
  font-size: 12px;
  color: #64748b;
}

.sub-status-box {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #fff;
  padding: 16px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-title { font-size: 12px; opacity: 0.85; }
.status-days { font-size: 26px; font-weight: 700; }
.status-meta { font-size: 12px; opacity: 0.9; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.badge {
  background: #e0f2fe;
  color: #0369a1;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-admin { background: #fef3c7; color: #b45309; }
.badge-superadmin { background: #fce7f3; color: #be185d; }
.badge-active { background: #dcfce7; color: #15803d; }
.badge-disabled { background: #fee2e2; color: #b91c1c; }

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.pkg-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pkg-name { font-weight: 700; font-size: 14px; color: #1e293b; margin-bottom: 6px; }
.pkg-price { font-size: 22px; font-weight: 700; color: #2563eb; margin-bottom: 8px; }
.pkg-desc { font-size: 12px; color: #64748b; margin-bottom: 14px; flex: 1; }

.input-group {
  display: flex;
  gap: 8px;
}

.device-item, .inventory-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #f1f5f9;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 8px;
}

.dev-name { font-weight: 600; font-size: 13px; }
.dev-meta { font-size: 11px; color: #64748b; }

/* Analytics Cards */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .analytics-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
}
.stat-title { font-size: 12px; color: #64748b; font-weight: 600; margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 700; color: #0f172a; }
.text-blue { color: #2563eb; }
.text-green { color: #10b981; }
.text-purple { color: #8b5cf6; }

/* Data Tables */
.table-wrap {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th, .data-table td {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
}
.data-table th {
  background: #f8fafc;
  font-weight: 700;
  color: #334155;
}
.data-table tr:hover td {
  background: #f1f5f9;
}

/* Modals Overlay & Card */
.modal-overlay, .modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card, .modal-box {
  background: #fff;
  border-radius: 12px;
  width: 520px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #64748b;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}

.form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}
.form-input:focus {
  border-color: #2563eb;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
