/* FineRecharge - Premium Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary: #0266F2;
  --primary-hover: #0052C6;
  --primary-light: #EEF5FF;
  --primary-gradient: linear-gradient(135deg, #0F67FE 0%, #0048C2 100%);
  --secondary: #00C6FF;
  
  --bg-main: #F4F7FB;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  
  --border-color: #E2E8F0;
  --border-focus: #0266F2;
  
  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;

  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s ease;
}

input, select, textarea {
  font-family: inherit;
  outline: none;
}

/* Layout App Shell */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  padding: 24px 16px;
  overflow-y: auto;
}

.brand-wrapper {
  padding: 0 8px 24px 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-subtle);
  padding: 12px 12px 6px 12px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background-color: #F8FAFC;
  color: var(--primary);
  transform: translateX(2px);
}

.nav-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.nav-spacer {
  flex: 1;
}

/* Top App Header */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.top-header {
  height: 72px;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-search {
  display: flex;
  align-items: center;
  background-color: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 8px 18px;
  width: 420px;
  gap: 10px;
  transition: all 0.2s ease;
}

.header-search:focus-within {
  border-color: var(--primary);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(2, 102, 242, 0.15);
}

.header-search input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 13.5px;
  color: var(--text-main);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 20px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(2, 102, 242, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #F8FAFC;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  position: relative;
}

.header-icon-btn:hover {
  background-color: #F1F5F9;
  color: var(--text-main);
}

.unread-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background-color: #EF4444;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
}

.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 6px;
  border-radius: 9999px;
  background-color: #F8FAFC;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-profile-pill:hover {
  border-color: #CBD5E1;
  background-color: #F1F5F9;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
}

.user-role-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
}

/* View Content Area */
.content-wrapper {
  padding: 28px 32px 48px 32px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Hero & Balance Grid */
.dashboard-top-row {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.hero-banner {
  background: var(--primary-gradient);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px -4px rgba(2, 102, 242, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-content {
  max-width: 58%;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.hero-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  color: #FFFFFF;
}

.hero-subtitle {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-operator-bubbles {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.operator-bubble-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #0F172A;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.hero-illustration {
  z-index: 2;
  margin-right: 12px;
}

/* Wallet Balance Card */
.wallet-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.wallet-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.wallet-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.wallet-amount {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin-top: 4px;
}

.wallet-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: 16px;
}

.wallet-stat-item {
  text-align: center;
}

.wallet-stat-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.wallet-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.section-link {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.section-link:hover {
  text-decoration: underline;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.service-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-card);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(2, 102, 242, 0.12);
}

.category-icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.service-card:hover .category-icon-bubble {
  transform: scale(1.08);
}

.service-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

/* Recent Transactions List */
.transactions-table-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.transaction-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s ease;
}

.transaction-row:last-child {
  border-bottom: none;
}

.transaction-row:hover {
  background-color: #F8FAFC;
}

.txn-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.txn-operator-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.txn-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.txn-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.txn-right {
  display: flex;
  align-items: center;
  gap: 24px;
  text-align: right;
}

.txn-amount {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  text-transform: capitalize;
}

.status-badge.success {
  background-color: #DCFCE7;
  color: #166534;
}

.status-badge.pending {
  background-color: #FEF3C7;
  color: #92400E;
}

.status-badge.failed {
  background-color: #FEE2E2;
  color: #991B1B;
}

.btn-view-receipt {
  background-color: #F1F5F9;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
}

.btn-view-receipt:hover {
  background-color: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* Service Page Sub-Views (Mobile Recharge, DTH, Bills) */
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.page-breadcrumb a:hover {
  color: var(--primary);
}

.page-breadcrumb span {
  color: var(--primary);
}

.recharge-flow-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}

.recharge-form-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.pill-toggle-group {
  display: inline-flex;
  background-color: #F1F5F9;
  padding: 4px;
  border-radius: 9999px;
  margin-bottom: 24px;
}

.pill-toggle-btn {
  padding: 8px 24px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
}

.pill-toggle-btn.active {
  background-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(2, 102, 242, 0.3);
}

.input-field-group {
  margin-bottom: 24px;
}

.input-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon input,
.input-with-icon select {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  background-color: #FFFFFF;
  transition: all 0.2s ease;
}

.input-with-icon input:focus,
.input-with-icon select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(2, 102, 242, 0.12);
}

.input-end-action {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

/* Operator Selector Row */
.operators-selection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.operator-select-card {
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #FFFFFF;
}

.operator-select-card:hover {
  border-color: #94A3B8;
  transform: translateY(-2px);
}

.operator-select-card.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
  box-shadow: 0 4px 12px rgba(2, 102, 242, 0.15);
}

.operator-select-card .op-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

/* Plan Tabs */
.plan-tabs-row {
  display: flex;
  gap: 8px;
  border-bottom: 1.5px solid var(--border-color);
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.plan-tab-item {
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.plan-tab-item.active {
  background-color: var(--primary);
  color: #FFFFFF;
}

/* Plan Card */
.plan-item-card {
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #FFFFFF;
}

.plan-item-card:hover {
  border-color: #94A3B8;
  box-shadow: var(--shadow-sm);
}

.plan-item-card.selected {
  border-color: var(--primary);
  background-color: #F8FAFC;
  box-shadow: 0 4px 16px rgba(2, 102, 242, 0.12);
}

.plan-radio {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
}

.plan-price-tag {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.plan-specs-text {
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.plan-desc-text {
  font-size: 12px;
  color: var(--text-subtle);
  margin-top: 4px;
}

/* Plan Sidebar Summary */
.plan-summary-sidebar {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
  height: fit-content;
  position: sticky;
  top: 96px;
}

.summary-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text-main);
}

.summary-price-box {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.summary-price-val {
  font-size: 34px;
  font-weight: 800;
  color: var(--text-main);
}

.summary-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.summary-feature-item svg {
  color: var(--primary);
  width: 18px;
  height: 18px;
}

.btn-proceed-pay {
  width: 100%;
  background: var(--primary-gradient);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  padding: 16px;
  border-radius: var(--radius-md);
  margin-top: 24px;
  box-shadow: 0 8px 20px rgba(2, 102, 242, 0.3);
}

.btn-proceed-pay:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(2, 102, 242, 0.4);
}

/* Electricity Bill Fetch Card */
.bill-result-card {
  background: linear-gradient(135deg, #F8FAFC 0%, #EEF2F6 100%);
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 20px;
}

.bill-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.bill-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.bill-field-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background-color: #FFFFFF;
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  transform: translateY(15px);
  transition: transform 0.2s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
}

/* Digital Invoice Receipt */
.receipt-header {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1.5px dashed var(--border-color);
  margin-bottom: 20px;
}

.receipt-status-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #DCFCE7;
  color: #166534;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.receipt-amount-display {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  margin: 6px 0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 13.5px;
  border-bottom: 1px solid #F1F5F9;
}

.receipt-row-label {
  color: var(--text-muted);
  font-weight: 600;
}

.receipt-row-val {
  font-weight: 700;
  color: var(--text-main);
  text-align: right;
}

/* Mobile Frame Simulator */
.mobile-simulator-wrapper {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.smartphone-frame {
  width: 390px;
  height: 800px;
  background-color: #FFFFFF;
  border-radius: 44px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3), 0 0 0 12px #1E293B;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.mobile-notch {
  height: 36px;
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 12px;
  font-weight: 700;
  color: #0F172A;
  z-index: 10;
}

.mobile-app-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 80px 20px;
  background-color: #F8FAFC;
}

.mobile-bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: #FFFFFF;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 20;
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  background: none;
  border: none;
}

.mobile-nav-btn.active {
  color: var(--primary);
}

.mobile-nav-btn svg {
  width: 20px;
  height: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
  .dashboard-top-row {
    grid-template-columns: 1fr;
  }
  .recharge-flow-container {
    grid-template-columns: 1fr;
  }
  .plan-summary-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .top-header {
    padding: 0 16px;
  }
  .content-wrapper {
    padding: 16px;
  }
  .header-search {
    width: auto;
    flex: 1;
  }
}
