/* ============================================================
   GLERCIMOR NETWORK AND DATA SOLUTION
   Billing System - Stylesheet
   ============================================================ */

:root {
  --primary:      #0ea5e9;
  --primary-dark: #0284c7;
  --sidebar-bg:   #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-active: #0ea5e9;
  --topbar-h:     60px;
  --sidebar-w:    250px;
  --radius:       10px;
  --shadow:       0 2px 12px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  background: #f1f5f9;
  color: #1e293b;
  margin: 0;
}
a { text-decoration: none; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  transition: transform .25s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 38px; height: 38px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}
.logo-name { font-size: 14px; font-weight: 700; color: #f1f5f9; display: block; line-height:1.1; }
.logo-sub  { font-size: 10px; color: var(--sidebar-text); display: block; }

.sidebar-toggle { background: none; border: none; color: var(--sidebar-text); font-size: 18px; cursor: pointer; padding: 4px; }

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary);
  color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; color: #f1f5f9; display: block; }
.user-role { font-size: 11px; color: var(--sidebar-text); text-transform: capitalize; }

.sidebar-menu { list-style: none; margin: 0; padding: 10px 0; flex: 1; }
.menu-category {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  color: #475569;
  padding: 14px 18px 4px;
  text-transform: uppercase;
}
.menu-item a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px;
  color: var(--sidebar-text);
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
  font-size: 13.5px;
}
.menu-item a i { width: 18px; text-align: center; font-size: 14px; }
.menu-item a:hover { background: rgba(255,255,255,.05); color: #e2e8f0; }
.menu-item.active a,
.menu-item.active > a {
  background: rgba(14,165,233,.15);
  color: var(--sidebar-active);
  border-left-color: var(--sidebar-active);
  font-weight: 600;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.btn-logout {
  display: flex; align-items: center; gap: 10px;
  color: #f87171; padding: 9px 12px; border-radius: 8px;
  font-size: 13.5px;
  transition: background .15s;
}
.btn-logout:hover { background: rgba(239,68,68,.1); color: #ef4444; }
.btn-logout i { width: 18px; text-align: center; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-navbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky; top: 0; z-index: 900;
  box-shadow: var(--shadow);
}
.sidebar-toggle-btn { color: #64748b; padding: 6px 8px; }
.sidebar-toggle-btn:hover { color: #0f172a; }
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: #64748b; }

.user-avatar-sm {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary);
  color: #fff; font-weight: 700; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 4px;
}
.user-dropdown { color: #334155; font-size: 14px; }
.user-dropdown:hover { color: #0f172a; }

.page-content {
  padding: 24px;
  flex: 1;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title { font-size: 22px; font-weight: 700; color: #0f172a; margin: 0; }
.page-subtitle { font-size: 13px; color: #64748b; margin: 2px 0 0; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border-top: 4px solid transparent;
  transition: transform .15s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card.primary { border-top-color: var(--primary); }
.stat-card.success { border-top-color: #10b981; }
.stat-card.warning { border-top-color: #f59e0b; }
.stat-card.danger  { border-top-color: #ef4444; }
.stat-card.info    { border-top-color: #06b6d4; }

.stat-value { font-size: 28px; font-weight: 700; color: #0f172a; line-height: 1.1; }
.stat-label { font-size: 12px; font-weight: 500; color: #64748b; text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.stat-icon  { font-size: 28px; color: #cbd5e1; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header {
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  padding: 14px 18px;
  font-weight: 600;
  border-radius: var(--radius) var(--radius) 0 0 !important;
}
.card-body { padding: 18px; }

/* ============================================================
   CHART
   ============================================================ */
.chart-container { position: relative; height: 280px; }

/* ============================================================
   QUICK ACTION CARDS
   ============================================================ */
.quick-action-card {
  background: #f8fafc;
  padding: 14px;
  text-align: center;
  border: 1px solid #e2e8f0;
  color: #334155;
  transition: background .15s, border-color .15s;
}
.quick-action-card:hover { background: #eff6ff; border-color: #bfdbfe; color: var(--primary); }
.quick-action-card i    { font-size: 22px; margin-bottom: 6px; display: block; color: var(--primary); }
.quick-action-card h6   { font-size: 12px; font-weight: 600; margin: 0; }
.quick-action-card p    { font-size: 11px; color: #94a3b8; margin: 2px 0 0; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; color: #94a3b8; padding: 30px 20px; }
.empty-state i { font-size: 40px; display: block; margin-bottom: 10px; }

/* ============================================================
   TABLES
   ============================================================ */
.table th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #64748b;
  background: #f8fafc;
}
.table td { vertical-align: middle; }

/* ============================================================
   FORMS
   ============================================================ */
.form-label { font-weight: 500; font-size: 13px; color: #374151; }
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14,165,233,.12);
}
.required-star { color: #ef4444; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .logo-icon {
  width: 60px; height: 60px; font-size: 26px;
  margin: 0 auto 12px;
}
.login-logo h2 { font-size: 22px; font-weight: 800; color: #0f172a; margin: 0; }
.login-logo p  { font-size: 13px; color: #64748b; margin: 4px 0 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
}
