/* ── IVB Netwerk Portaal — SIM Provider Dashboard ── */

:root {
  --primary: #0066cc;
  --primary-dark: #004499;
  --primary-light: #e6f0ff;
  --accent: #00c8ff;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #1a1a1a;
  --text-muted: #666666;
  --text-light: #999999;
  --border: #e8e8e8;
  --border-light: #f5f5f5;
  --success: #00a859;
  --warning: #ff9800;
  --danger: #e53935;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 2px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --transition: 0.25s ease;
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

/* ── Navbar ── */
.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-logo { height: 30px; width: auto; }

.navbar-nav {
  display: flex;
  align-items: center;
  list-style: none;
  height: 56px;
}

.navbar-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.88rem;
  padding: 0 0.9rem;
  height: 56px;
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
}

.navbar-nav a:hover { color: var(--primary); }
.navbar-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.navbar-user { display: flex; align-items: center; gap: 0.6rem; }

.navbar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem;
}

.navbar-name { font-weight: 500; font-size: 0.88rem; color: var(--text); }

/* ── Login ── */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0066cc 0%, #00c8ff 100%); padding: 1rem;
}

.login-card {
  background: var(--card); border-radius: var(--radius-lg);
  padding: 2.5rem; box-shadow: var(--shadow-lg); width: 100%; max-width: 400px;
}

.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo-img { width: 72px; height: 72px; object-fit: contain; margin-bottom: 1rem; }
.login-logo h1 { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.25rem; }
.login-logo p { color: var(--text-muted); font-size: 0.9rem; }

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 500; font-size: 0.875rem; margin-bottom: 0.4rem; }
.form-control {
  width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.95rem; background: var(--card);
  transition: border var(--transition), box-shadow var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem;
  border: none; border-radius: var(--radius); font-weight: 600; font-size: 0.95rem;
  cursor: pointer; transition: all var(--transition);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: white; width: 100%; justify-content: center; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--text-muted); padding: 0.4rem 0.8rem; }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

.alert { padding: 0.75rem 1rem; border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 1rem; }
.alert-error { background: #fef2f2; color: #c62828; border: 1px solid #ffcdd2; }

/* ── Dashboard ── */
.dashboard { max-width: 960px; margin: 0 auto; padding: 1.5rem 1.5rem 3rem; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #0066cc 0%, #00a8e8 50%, #00c8ff 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 110px;
}

.hero::before {
  content: ''; position: absolute; right: -80px; top: -80px;
  width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,0.07);
}

.hero::after {
  content: ''; position: absolute; right: 60px; bottom: -100px;
  width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,0.05);
}

.hero-content { position: relative; z-index: 2; color: white; }
.hero-content h1 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.2rem; }
.hero-content p { font-size: 0.85rem; opacity: 0.9; }

.hero-icon-wrap {
  position: relative; z-index: 2; flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
}

.hero-icon-wrap svg { width: 18px; height: 18px; }

/* ── Quick stats ── */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem; margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card); border-radius: var(--radius);
  padding: 1rem 0.75rem; box-shadow: var(--shadow);
  text-align: center; position: relative; overflow: hidden;
}

.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
}

.stat-card.blue::before { background: linear-gradient(90deg, #0066cc, #00c8ff); }
.stat-card.green::before { background: linear-gradient(90deg, #00a859, #4caf50); }
.stat-card.orange::before { background: linear-gradient(90deg, #ff9800, #ff5722); }
.stat-card.purple::before { background: linear-gradient(90deg, #7b1fa2, #e040fb); }

.stat-num { font-size: 1.3rem; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ── Navigation tiles ── */
.tiles-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; margin-bottom: 1.5rem;
}

.tile {
  background: var(--card); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
  transition: all var(--transition); text-decoration: none;
  display: flex; flex-direction: column;
}

.tile:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.tile-top {
  height: 56px; display: flex; align-items: center; padding: 0 1.25rem;
  position: relative; overflow: hidden;
}

.tile-top.blue { background: linear-gradient(135deg, #0066cc, #00c8ff); }
.tile-top.orange { background: linear-gradient(135deg, #ff9800, #ff5722); }
.tile-top.green { background: linear-gradient(135deg, #00a859, #4caf50); }

.tile-top::before {
  content: ''; position: absolute; right: -15px; top: -15px;
  width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.1);
}

.tile-top::after {
  content: ''; position: absolute; left: -8px; bottom: -20px;
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.08);
}

.tile-icon-wrap {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}

.tile-icon-wrap svg { width: 14px; height: 14px; }

.tile-body { padding: 0.85rem 1rem 1rem; position: relative; }
.tile-title { font-weight: 600; font-size: 0.92rem; color: var(--text); margin-bottom: 0.1rem; }
.tile-desc { font-size: 0.8rem; color: var(--text-muted); }
.tile-arrow { position: absolute; bottom: 1rem; right: 1rem; color: var(--primary); font-size: 1rem; }

/* ── SIM cards ── */
.sim-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }

.sim-card {
  background: var(--card); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}

.sim-top {
  padding: 1.25rem 1.5rem; display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
  border-bottom: 1px solid var(--border-light);
}

.sim-phone { font-size: 1.1rem; font-weight: 700; }
.sim-product { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.1rem; }

.sim-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.8rem; font-weight: 500; color: var(--success);
  background: #e8f5e9; padding: 0.3rem 0.65rem; border-radius: 999px;
}
.sim-badge.inactive { color: var(--text-light); background: var(--border-light); }

.sim-body { padding: 1.5rem; display: flex; gap: 1.5rem; align-items: center; }

.gauge { width: 100px; height: 100px; position: relative; flex-shrink: 0; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-bg { fill: none; stroke: var(--border-light); stroke-width: 8; }
.gauge-fill { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.gauge-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.gauge-num { font-size: 1.3rem; font-weight: 800; line-height: 1; }
.gauge-label { font-size: 0.65rem; color: var(--text-muted); margin-top: 0.15rem; }

.sim-usage { flex: 1; }

.usage-block { margin-bottom: 1rem; }
.usage-block:last-child { margin-bottom: 0; }
.usage-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.35rem; }
.usage-label { font-size: 0.85rem; font-weight: 500; }
.usage-value { font-size: 0.85rem; color: var(--text-muted); }
.progress-bar { height: 8px; background: var(--border-light); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; transition: width 0.6s ease; }

.sim-meta { display: flex; gap: 1.5rem; padding: 0 1.5rem 1.5rem; flex-wrap: wrap; }
.sim-meta-item { display: flex; flex-direction: column; }
.sim-meta-label { font-size: 0.72rem; color: var(--text-light); }
.sim-meta-value { font-size: 0.82rem; font-weight: 500; margin-top: 0.1rem; }
.mono { font-family: 'SF Mono', monospace; font-size: 0.78rem; }

.sim-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 1.5rem; background: var(--border-light);
  border-top: 1px solid var(--border-light); font-size: 0.85rem;
}
.usage-warning { color: var(--danger); font-weight: 500; font-size: 0.8rem; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: auto; box-shadow: var(--shadow);
}

.card-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.card .table {
  min-width: 700px;
}

.contact-card {
  background: linear-gradient(135deg, #0066cc 0%, #00c8ff 100%);
  border-radius: var(--radius-lg); padding: 1.5rem;
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;
  color: white; position: relative; overflow: hidden;
}

.contact-card::before {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,0.08);
}

.contact-icon-wrap {
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; z-index: 2;
}

.contact-icon-wrap svg { width: 24px; height: 24px; }

.contact-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.1rem; z-index: 2; position: relative; }
.contact-card p { font-size: 0.85rem; opacity: 0.9; margin-bottom: 0.5rem; z-index: 2; position: relative; }
.contact-card .btn-primary { background: white; color: var(--primary); z-index: 2; position: relative; }
.contact-card .btn-primary:hover { background: #f0f0f0; }

.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 0.78rem; font-weight: 500; color: var(--text-muted);
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
}
.table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border-light); font-size: 0.88rem; }
.table tr:last-child td { border-bottom: none; }
.table-hover tbody tr { transition: background var(--transition); }
.table-hover tbody tr:hover { background: #fafafa; }

.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.72rem; font-weight: 500; }
.bg-success { background: #e8f5e9; color: #2e7d32; }
.bg-warning { background: #fff3e0; color: #e65100; }
.bg-danger { background: #ffebee; color: #c62828; }
.bg-info { background: #e3f2fd; color: #1565c0; }
.bg-secondary { background: var(--border-light); color: var(--text-muted); }

.empty-state { text-align: center; padding: 2.5rem 1.5rem; color: var(--text-muted); }
.empty-state .icon { font-size: 2rem; margin-bottom: 0.5rem; }
.empty-state p { margin-bottom: 0.4rem; }
.text-muted { color: var(--text-light); font-size: 0.85rem; }

.dashboard-footer {
  text-align: center; padding: 1.5rem 0 0; margin-top: 2rem;
  color: var(--text-light); font-size: 0.8rem;
}
.dashboard-footer p { margin-bottom: 0.2rem; }
.login-footer { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; color: var(--text-muted); }

@media (max-width: 768px) {
  .navbar { padding: 0 1rem; height: auto; flex-wrap: wrap; }
  .navbar-nav { gap: 0; order: 3; width: 100%; height: auto; overflow-x: auto; }
  .navbar-nav a { padding: 0.5rem 0.75rem; height: auto; white-space: nowrap; border-bottom: 0; }
  .navbar-nav a.active { border-bottom: 0; color: var(--primary); }
  .navbar-name { display: none; }
  .dashboard { padding: 1rem 1rem 2rem; }
  .hero { padding: 1.5rem; min-height: auto; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .tiles-row { grid-template-columns: 1fr; }
  .sim-body { flex-direction: column; gap: 1rem; }
  .table { font-size: 0.8rem; }
  .table th, .table td { padding: 0.6rem 0.75rem; }
  .contact-card { flex-direction: column; text-align: center; }
}