/* =========================================
   NUVOCO DASHBOARD – MAIN STYLESHEET
   Bootstrap 5 + Full Mobile Responsive
   ========================================= */

:root {
  --primary: #7c6fe0;
  --primary-light: #a89eea;
  --primary-soft: rgba(124,111,224,0.12);
  --sidebar-bg: #eef0fb;
  --navbar-bg: #ffffff;
  --body-bg: #e8eaf6;
  --card-bg: #ffffff;
  --text-dark: #1a1a2e;
  --text-muted: #6b7280;
  --chart-blue: #90caf9;
  --chart-dark: #1a5276;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(124,111,224,0.10);
  --sidebar-width: 220px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', sans-serif; }

/* =====================
   LOGIN PAGE
   ===================== */
.login-body { height: 100vh; overflow: hidden; }

.login-left {
  background: linear-gradient(135deg, #a89eea 0%, #7c6fe0 60%, #5b4fd4 100%);
  position: relative; overflow: hidden; min-height: 100vh;
}
.login-right {
  background: #ffffff;
  position: relative; overflow: hidden; min-height: 100vh;
}
.bubble { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.15); }
.b1 { width: 180px; height: 180px; top: -40px; left: -40px; }
.b2 { width: 120px; height: 120px; bottom: 40px; left: 60px; background: rgba(255,255,255,0.10); }
.b3 { width: 80px; height: 80px; bottom: 180px; right: -20px; background: rgba(255,255,255,0.18); }
.br1 { width: 120px; height: 120px; top: -30px; right: -30px; background: rgba(124,111,224,0.18); }
.br2 { width: 60px; height: 60px; bottom: 40px; right: 80px; background: rgba(124,111,224,0.12); }

.logo-ring {
  border: 3px solid rgba(255,255,255,0.85); border-radius: 50%;
  width: 260px; height: 260px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 0 0 8px rgba(255,255,255,0.10);
}
.logo-ring .logo-text { font-size: 2.4rem; font-weight: 900; letter-spacing: 2px; color: #fff; }
.logo-ring .tagline { color: rgba(255,255,255,0.85); font-size: 0.9rem; margin-top: 6px; letter-spacing: 1px; }

.login-card { width: 100%; max-width: 400px; padding: 20px 10px; position: relative; z-index: 1; }
.login-title { text-align: center; font-weight: 700; color: var(--text-dark); font-size: 1.8rem; margin-bottom: 6px; }
.title-underline { width: 60px; height: 3px; background: var(--primary); border-radius: 2px; margin: 0 auto 32px; }

.login-input {
  border: none; border-bottom: 1.5px solid #d1d5db; border-radius: 0;
  padding: 14px 4px; font-size: 0.95rem; color: var(--text-muted);
  background: transparent; box-shadow: none !important;
}
.login-input:focus { border-bottom-color: var(--primary); color: var(--text-dark); }

.btn-login {
  background: linear-gradient(90deg, #a89eea, #7c6fe0);
  color: #fff; font-weight: 700; font-size: 1.1rem;
  border-radius: 50px; padding: 14px; border: none; letter-spacing: 1px;
  transition: opacity 0.2s; text-decoration: none; display: block; text-align: center;
}
.btn-login:hover { opacity: 0.88; color: #fff; }

.nu { color: #e53935; }
.v-letter { color: #43a047; font-style: italic; }
.oco { color: inherit; }
.reg { font-size: 0.5em; vertical-align: super; }

/* =====================
   DASHBOARD LAYOUT
   ===================== */
.dashboard-body { background: var(--body-bg); min-height: 100vh; }

/* --- TOP NAVBAR --- */
.top-navbar {
  height: 70px;
  background: var(--navbar-bg);
  border-bottom: 1.5px solid #e5e7eb;
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
.logo-small { font-size: 1.2rem; font-weight: 900; letter-spacing: 1px; color: #1a1a2e; }
.logo-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.admin-info { font-weight: 600; color: var(--text-dark); font-size: 0.95rem; }
.logout-link { color: var(--primary); text-decoration: none; font-weight: 700; }
.logout-link:hover { text-decoration: underline; }

/* Hamburger button – only visible on mobile */
.sidebar-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 6px; border-radius: 8px; color: var(--text-dark);
  font-size: 1.5rem; line-height: 1;
  transition: background 0.15s;
}
.sidebar-toggle:hover { background: var(--primary-soft); }

/* --- LAYOUT WRAPPER --- */
.layout-wrapper {
  display: flex;
  min-height: calc(100vh - 70px);
  position: relative;
}

/* --- SIDEBAR --- */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1.5px solid #dde1f5;
  display: flex; flex-direction: column; gap: 12px;
  padding: 20px 12px;
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  z-index: 150;
}

.sidebar-btn {
  display: flex; align-items: center;
  padding: 13px 18px; border-radius: 50px;
  font-weight: 600; font-size: 0.92rem;
  color: var(--text-dark); text-decoration: none;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(124,111,224,0.07);
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}
.sidebar-btn:hover { background: var(--primary-soft); color: var(--primary); }
.sidebar-btn.active {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 16px rgba(124,111,224,0.25);
}

/* Overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 140;
}

/* --- MAIN CONTENT --- */
.main-content { flex: 1; overflow-y: auto; padding: 24px; }

/* --- STAT CARDS --- */
.stat-card {
  background: var(--card-bg); border-radius: var(--radius);
  padding: 20px 22px; display: flex; align-items: center; gap: 18px;
  box-shadow: var(--shadow); transition: transform 0.18s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}
.bg-primary-soft { background: rgba(13,110,253,0.10); }
.bg-success-soft { background: rgba(25,135,84,0.10); }
.bg-info-soft    { background: rgba(13,202,240,0.10); }
.bg-warning-soft { background: rgba(255,193,7,0.12); }

.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--text-dark); line-height: 1; }
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

/* --- CHART CARD --- */
.chart-card { background: var(--card-bg); border-radius: var(--radius); padding: 28px 32px; box-shadow: var(--shadow); }
.chart-title { font-weight: 700; font-size: 1.2rem; color: var(--text-dark); margin-bottom: 12px; }
.chart-legend { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.legend-dot { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 6px; }
.legend-label { font-size: 0.85rem; color: var(--text-muted); }

/* =====================
   PURPLE BG PAGES
   ===================== */
.purple-main {
  background: linear-gradient(135deg, #b3b8f0 0%, #8f94e0 40%, #9fa5e8 100%);
  flex: 1; min-height: calc(100vh - 70px);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.purple-main::before {
  content: ''; position: absolute;
  width: 280px; height: 280px; border-radius: 50%;
  background: rgba(255,255,255,0.18); top: -60px; right: 120px;
}
.purple-main::after {
  content: ''; position: absolute;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,0.12); bottom: 60px; right: -40px;
}
.pbubble { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.15); pointer-events: none; }
.pb1 { width: 200px; height: 200px; top: -50px; right: 80px; }
.pb2 { width: 120px; height: 120px; bottom: 80px; right: 200px; }
.pb3 { width: 60px; height: 60px; top: 160px; right: 30px; background: rgba(124,111,224,0.3); }
.pb4 { width: 18px; height: 18px; top: 260px; left: 200px; background: rgba(255,255,255,0.5); }
.pb5 { width: 10px; height: 10px; bottom: 200px; right: 140px; background: rgba(255,255,255,0.6); }
.pb6 { width: 30px; height: 30px; top: 120px; left: 80px; background: rgba(255,255,255,0.2); }

/* Center floating card */
.center-card {
  background: #ffffff; border-radius: 20px; padding: 44px 40px;
  position: relative; z-index: 2;
  box-shadow: 0 8px 40px rgba(100,90,200,0.18);
  width: 100%; max-width: 520px;
}

/* Password inputs */
.pw-input {
  border: none; border-bottom: 1.5px solid #d1d5db; border-radius: 0;
  padding: 16px 6px; font-size: 0.95rem; color: #aaa;
  background: transparent; box-shadow: none !important; text-align: center;
}
.pw-input:focus { border-bottom-color: var(--primary); color: var(--text-dark); }
.pw-input::placeholder { color: #bbb; }

/* =====================
   DEALER TABLE (OLD – kept for compatibility)
   ===================== */
.dealer-table { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 24px rgba(100,90,200,0.13); width: 100%; }
.dealer-table th {
  font-weight: 700; font-size: 0.95rem; color: #1a1a2e;
  padding: 16px 14px; border-right: 1.5px solid #e0e0e0; border-bottom: 1.5px solid #e0e0e0;
  text-align: center;
}
.dealer-table th:last-child { border-right: none; }
.dealer-table td {
  padding: 14px; font-size: 0.9rem; color: #333;
  text-align: center; border-right: 1.5px solid #e5e5e5; border-bottom: 1px solid #efefef;
}
.dealer-table td:last-child { border-right: none; }
.dealer-table tr:last-child td { border-bottom: none; }
.view-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.view-link:hover { text-decoration: underline; }

/* Pic radio grid */
.pic-radio-wrap { display: flex; align-items: center; gap: 14px; }
.pic-radio-wrap input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  border: none; cursor: pointer; flex-shrink: 0; transition: background 0.18s;
}
.pic-radio-wrap input[type="radio"]:checked { background: #7c6fe0; box-shadow: 0 2px 14px rgba(124,111,224,0.45); }
.pic-box {
  background: rgba(255,255,255,0.50); border: 1.5px solid rgba(255,255,255,0.70);
  border-radius: 12px; height: 180px; flex: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; color: #444; cursor: pointer; transition: background 0.18s; overflow: hidden;
}
.pic-box:hover { background: rgba(255,255,255,0.68); }

/* Register form card */
.reg-form-card {
  background: rgba(255,255,255,0.60); border-radius: 20px; padding: 36px 40px;
  position: relative; z-index: 2;
  box-shadow: 0 8px 32px rgba(100,90,200,0.13);
  width: 100%; max-width: 580px;
}
.reg-input {
  border: none; border-bottom: 1.5px solid #c5c5dd; border-radius: 0;
  background: transparent; padding: 12px 4px; color: #333; box-shadow: none !important;
}
.reg-input:focus { border-bottom-color: var(--primary); }

/* Video page */
.video-select-box {
  background: #fff; border-radius: 12px; padding: 44px 24px;
  text-align: center; color: #888; font-size: 1rem;
  box-shadow: 0 2px 12px rgba(100,90,200,0.10); cursor: pointer;
  border: 2px dashed #d0d0ee; transition: border-color 0.2s;
}
.video-select-box:hover { border-color: var(--primary); }
.region-select {
  background: #fff; border: none; border-radius: 50px;
  padding: 14px 28px; font-size: 1rem; font-weight: 600; color: #333;
  box-shadow: 0 2px 12px rgba(100,90,200,0.10);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%232e7d32' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 46px; cursor: pointer; width: 100%; max-width: 420px;
}

.pic-radio-wrap { display:flex; align-items:center; gap:12px; }
.pic-radio-wrap input[type="radio"] {
  appearance:none; -webkit-appearance:none;
  width:34px; height:34px; border-radius:50%;
  background:#fff; box-shadow:0 2px 10px rgba(0,0,0,0.15);
  border:none; cursor:pointer; flex-shrink:0; transition:background 0.18s;
}
.pic-radio-wrap input[type="radio"]:checked { background:#7c6fe0; box-shadow:0 2px 14px rgba(124,111,224,0.45); }
.pic-box {
  background:rgba(255,255,255,0.50); border:1.5px solid rgba(255,255,255,0.70);
  border-radius:12px; height:180px; flex:1;
  display:flex; align-items:center; justify-content:center;
  font-size:0.95rem; color:#444; cursor:pointer; transition:background 0.18s;
}
.pic-box:hover { background:rgba(255,255,255,0.70); }
@media(max-width:575px){
  .pic-box { height:120px; font-size:0.82rem; }
  .pic-radio-wrap input[type="radio"] { width:26px; height:26px; }
  .pic-radio-wrap { gap:8px; }
}

.info-card {
  background:#f9f9fb;
  border:1px solid #ececec;
  border-radius:14px;
  padding:18px;
}
.info-card label {
  display:block;
  font-size:13px;
  font-weight:600;
  color:#7b7b7b;
  margin-bottom:8px;
  text-transform:uppercase;
  letter-spacing:0.5px;
}
.info-card p {
  margin:0;
  font-size:16px;
  font-weight:600;
  color:#2b2b2b;
  word-break:break-word;
}

/* =====================
   DEALER LIST PAGE – NEW STYLES
   ===================== */

/* Top bar: title + buttons + search */
.page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.page-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.dealer-count-badge {
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.4);
}

.page-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Search box */
.dl-search-wrap {
  position: relative;
}
.dl-search-wrap .dl-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 15px;
  pointer-events: none;
}
.dl-search-input {
  padding: 8px 12px 8px 34px;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 50px;
  background: rgba(255,255,255,0.85);
  font-size: 13px;
  color: #333;
  width: 210px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.dl-search-input::placeholder { color: #aaa; }
.dl-search-input:focus {
  border-color: var(--primary);
  background: #fff;
}

/* Add / Download buttons */
.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.12s;
  white-space: nowrap;
}
.add-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.add-btn-outline {
  background: rgba(255,255,255,0.20);
  border: 1.5px solid rgba(255,255,255,0.6);
  color: #fff;
}
.add-btn-solid {
  background: #fff;
  border: 1.5px solid #fff;
  color: var(--primary);
}

/* Show entries + footer bar */
.dl-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid #efefef;
  background: #fafafa;
  border-radius: 0 0 12px 12px;
}

.dl-show-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
}
.dl-show-wrap select {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 13px;
  color: #333;
  background: #fff;
  cursor: pointer;
  outline: none;
}
.dl-show-wrap select:focus { border-color: var(--primary); }

.dl-info-text {
  font-size: 12px;
  color: #888;
}

/* Pagination */
.dl-pagination {
  display: flex;
  gap: 4px;
  align-items: center;
}
.dl-pg-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.dl-pg-btn:hover { background: var(--primary-soft); border-color: var(--primary-light); color: var(--primary); }
.dl-pg-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.dl-pg-btn:disabled, .dl-pg-btn.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* Table card wrapper */
.dl-table-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 32px rgba(100,90,200,0.13);
}

/* New dealer table styles – override old .dealer-table */
.dealer-table thead tr {
  background: #f4f3fc;
}
.dealer-table th {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888 !important;
  padding: 13px 14px !important;
  text-align: left !important;
  border-right: none !important;
  border-bottom: 1px solid #ebebf5 !important;
  white-space: nowrap;
}
.dealer-table td {
  padding: 13px 14px !important;
  font-size: 13px !important;
  text-align: left !important;
  border-right: none !important;
  border-bottom: 1px solid #f0f0f7 !important;
  vertical-align: middle;
}
.dealer-table tbody tr:last-child td { border-bottom: none !important; }
.dealer-table tbody tr:hover { background: #f9f8ff; }

/* State badge */
.state-badge {
  display: inline-block;
  background: #eeedfe;
  color: #3c3489;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Pic Uploaded badges */
.pic-badge-yes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eaf3de;
  color: #3b6d11;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.pic-badge-no {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fcebeb;
  color: #a32d2d;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

/* Action links */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.14s, border-color 0.14s;
  cursor: pointer;
  color: var(--primary);
}
.action-btn:hover { background: #eeedfe; border-color: #afa9ec; color: var(--primary); }
.action-btn.del { color: #a32d2d; }
.action-btn.del:hover { background: #fcebeb; border-color: #f09595; }

/* Dealer name bold */
.dealer-name { font-weight: 600; color: #1a1a2e; }
.shop-name { color: #6b7280; }

/* Serial number muted */
.sno-cell { color: #aaa; font-size: 12px; }

/* =====================
   MOBILE RESPONSIVE
   ===================== */
@media (max-width: 767.98px) {

  /* Show hamburger */
  .sidebar-toggle { display: flex; align-items: center; justify-content: center; }

  /* Sidebar slides in from left */
  .sidebar {
    position: fixed;
    top: 70px; left: 0; bottom: 0;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); }

  /* Overlay shows when sidebar open */
  .sidebar-overlay.open { display: block; }

  /* Admin text shorter on mobile */
  .admin-info { font-size: 0.8rem; }
  .logo-sub { display: none; }

  /* Main content full width */
  .main-content { padding: 16px; }

  /* Stat cards – 2 per row on mobile */
  .stat-card { padding: 14px 16px; gap: 12px; }
  .stat-value { font-size: 1.4rem; }
  .stat-icon { width: 44px; height: 44px; font-size: 1.2rem; }

  /* Chart card */
  .chart-card { padding: 18px 16px; }

  /* Purple pages */
  .purple-main { padding: 16px; align-items: flex-start; padding-top: 24px; min-height: calc(100vh - 70px); }

  /* Center card */
  .center-card { padding: 28px 20px; }

  /* Register form */
  .reg-form-card { padding: 24px 16px; }

  /* Pic grid – stacked on small */
  .pic-radio-wrap { gap: 10px; }
  .pic-box { height: 130px; font-size: 0.85rem; }
  .pic-radio-wrap input[type="radio"] { width: 28px; height: 28px; }

  /* Dealer table – scrollable */
  .table-scroll-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dealer-table th, .dealer-table td { white-space: nowrap; }

  /* Video page */
  .video-select-box { padding: 28px 16px; }
  .region-select { max-width: 100%; }

  /* Login page – stack vertically */
  .login-body { height: auto; overflow: auto; }
  .login-left { min-height: 40vh; }
  .login-right { min-height: 60vh; }
  .logo-ring { width: 180px; height: 180px; }
  .logo-ring .logo-text { font-size: 1.6rem; }

  /* Dealer list page responsive */
  .page-topbar { flex-direction: column; align-items: flex-start; }
  .page-topbar-right { width: 100%; justify-content: space-between; }
  .dl-search-input { width: 160px; }
  .add-btn { padding: 7px 14px; font-size: 12px; }
  .dl-footer-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .dl-pagination { flex-wrap: wrap; }
}

@media (max-width: 400px) {
  .pic-box { height: 110px; }
  .center-card { padding: 20px 12px; }
  .dl-search-input { width: 130px; }
}







