
.btn{border:1px solid var(--ring); background:#fff; padding:8px 12px; border-radius:8px; cursor:pointer; font-size:14px; font-weight:500; transition:all .2s}
.btn:hover{background:#f9fafb}
.btn-ghost{background:transparent; border:none; color:var(--text)}
.btn-ghost:hover{background:rgba(0,0,0,.04)}
.btn-primary{background:var(--primary); color:var(--primary-contrast); border-color:transparent}
.btn-primary:hover{background:#1d4ed8; opacity:.95}
.btn-outline{background:#fff; border:1px solid #e5e7eb}
.btn-sm{padding:6px 10px; font-size:12px}

.input{border:1px solid var(--ring); background:#fff; height:38px; border-radius:8px; padding:0 10px}


/* Metric Cards Grid */
.metrics-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:20px; margin-bottom:32px}
.metric-card{background:var(--surface); border:1px solid var(--ring); border-radius:var(--radius); padding:24px; display:flex; gap:16px; align-items:flex-start; box-shadow:var(--shadow); transition:all .2s; cursor:default}
.metric-card:hover{box-shadow:0 4px 12px rgba(0,0,0,.08); border-color:#d1d5db; transform:translateY(-2px)}
.metric-icon{width:64px; height:64px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:32px; flex-shrink:0}
.metric-icon.users{background:#dbeafe}
.metric-icon.active{background:#fef3c7}
.metric-icon.notifications{background:#ede9fe}
.metric-icon.sim{background:#f0fdf4}
.metric-content h4{margin:0 0 6px; font-size:13px; color:#6b7280; font-weight:500; text-transform:uppercase; letter-spacing:.5px}
.metric-value{margin:0 0 4px; font-size:28px; font-weight:700; color:var(--text)}
.metric-detail{margin:0; font-size:12px; color:#9ca3af}


/* Charts Section */
.charts-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)); gap:20px; margin-bottom:32px}
.chart-container{background:var(--surface); border:1px solid var(--ring); border-radius:var(--radius); padding:24px; box-shadow:var(--shadow); display:flex; flex-direction:column}
.chart-header{margin-bottom:20px}
.chart-header h3{margin:0 0 4px; font-size:16px; font-weight:600; color:var(--text)}
.chart-subtitle{margin:0; font-size:12px; color:#9ca3af}
.chart-wrapper{position:relative; height:280px; display:flex; align-items:center; justify-content:center}
.chart-wrapper canvas{max-height:100% !important}

/* Stats List */
.stats-list{display:flex; flex-direction:column; gap:16px}
.stat-item{display:flex; justify-content:space-between; align-items:center; padding:12px; background:#f9fafb; border-radius:8px; border:1px solid var(--ring)}
.stat-label{font-size:13px; color:#6b7280; font-weight:500}
.stat-value{font-size:20px; font-weight:700; color:var(--text)}
.stat-value.stat-warning{color:#d97706}
/* Regular Cards */
.cards{display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:24px}
.card{background:var(--surface); border:1px solid var(--ring); border-radius:var(--radius); padding:16px; box-shadow:var(--shadow)}
.metric{font-size:28px; font-weight:700; margin:6px 0 0}
.metric-danger{color:#dc2626}

.panel{background:var(--surface); border:1px solid var(--ring); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; margin-bottom:24px}
.panel-header{display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid var(--ring); background:#f9fafb}
.panel-header h2{margin:0; font-size:16px; font-weight:600}
.panel-body{padding:20px}
.list{margin:0; padding-left:18px}
.toolbar{display:flex; gap:10px; margin-bottom:12px;}
.table-wrap{background:var(--surface); border:1px solid var(--ring); border-radius:8px; overflow:hidden}
.table{width:100%; border-collapse:separate; border-spacing:0}
.table th,.table td{padding:12px 14px; border-bottom:1px solid var(--ring); text-align:left; font-size:14px}
.table th{background:#f9fafb; font-weight:600; color:#6b7280}
.table tbody tr:hover{background:#f9fafb}
.badge{padding:4px 8px; border-radius:999px; background:#eef2ff; color:#3730a3; border:1px solid #e0e7ff}
.badge-success{background:#ecfdf5; color:#065f46; border-color:#dcfce7}

.help-text{font-size:13px; color:#6b7280; margin-top:12px}

/* Modal */
.modal{position:fixed; inset:0; display:none}
.modal.open{display:block; z-index:3;}
.modal-backdrop{position:absolute; inset:0; background:rgba(0,0,0,.5)}
.modal-card{position:relative; margin:10vh auto; max-width:560px; background:#fff; border:1px solid var(--ring); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden}
.modal-header,.modal-footer{        display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;}
.modal-footer{border-top:1px solid var(--ring); justify-content: end; border-bottom:none}
.modal-body{padding:20px}
.modal-header h3{margin:0; font-size:16px; font-weight:600}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  padding: 8px 14px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  cursor: pointer;
  border-radius:6px;
  font-weight:500;
  font-size:13px;
}

.tab:hover{background:#f3f4f6}

.tab.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.badge-expired {
  color: #dc2626;
  font-weight: 700;
}

.badge-warning {
  color: #d97706;
  font-weight: 600;
}

.badge-ok {
  color: #16a34a;
}

/* Shared dashboard layout */
.content {
  padding: 32px;
  background: #f7f9fc;
  min-height: 100vh;
}

.page-title {
  font-size: 19px;
  font-weight: 600;
  color: #111827;
}

.page-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-breadcrumb {
  margin: 0;
  color: #64748b;
  font-size: .95rem;
}

.page-breadcrumb span {
  color: #0f172a;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 24px 48px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  z-index: 2;
}

.topbar-left {
  display: flex;
  flex-direction: row;
  gap: 6px;
}

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

.btn-secondary {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 22px;
  margin-bottom: 32px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, .05);
}

.filter-search {
  display: flex;
  gap: 12px;
  width: 100%;
}

.filter-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px 16px;
  background: #f8fafc;
  color: #0f172a;
}

.filter-search button {
  min-width: 120px;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.filter-controls select {
  min-width: 160px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px 16px;
  background: #f8fafc;
  color: #0f172a;
}

.stats-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.highlight-card {
  border-left: 4px solid #2563eb;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
  background: #fff;
}

.highlight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, .08);
}

