:root {
  --blue: #1769ff;
  --blue-dark: #0d47c7;
  --cyan: #08afd5;
  --green: #18b979;
  --orange: #ff9f43;
  --red: #ef5350;
  --purple: #7856ff;

  --bg: #f5f8fc;
  --white: #ffffff;
  --text: #182230;
  --muted: #718096;
  --border: #e7edf5;

  --sidebar: 260px;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(26, 52, 93, 0.07);
}

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

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

button,
input,
select {
  font-family: inherit;
}

/* =====================================
           SIDEBAR
        ===================================== */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar);
  height: 100vh;
  padding: 24px 16px;
  background: linear-gradient(180deg, #1261f4 0%, #0d47c7 100%);
  color: white;
  z-index: 1000;
  transition: 0.3s ease;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 28px;
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -1px;
}

.brand-text strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
}

.brand-text span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  opacity: 0.7;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.menu-title {
  padding: 10px 12px;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 13px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 500;
  transition: 0.2s ease;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.09);
}

.nav-item.active {
  color: white;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 3px 0 0 white;
}

.sidebar-bottom {
  margin-top: 25px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.care-box {
  margin: 0 4px 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.care-box small {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
}

.care-box strong {
  display: block;
  font-size: 12px;
  margin-bottom: 10px;
}

.care-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  border-radius: 9px;
  background: white;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.care-btn svg {
  width: 15px;
  height: 15px;
}

/* =====================================
           MAIN
        ===================================== */

.main {
  margin-left: var(--sidebar);
  min-height: 100vh;
}

/* =====================================
           TOPBAR
        ===================================== */

.topbar {
  height: 74px;
  padding: 0 32px;
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 900;
}

.page-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.mobile-menu {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-menu svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.page-heading h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.page-heading p {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.notification {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--muted);
}

.notification svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.notification-dot {
  position: absolute;
  right: 8px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  border: 1px solid white;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #1769ff, #08afd5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

.user-info strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.user-info span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

/* =====================================
           CONTENT
        ===================================== */

.content {
  padding: 30px 32px 45px;
  max-width: 1500px;
  margin: auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 11px;
}

.breadcrumb svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.breadcrumb .current {
  color: var(--blue);
  font-weight: 600;
}

/* =====================================
           PAYMENT HERO
        ===================================== */

.payment-hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0f5ff1 0%, #1769ff 55%, #08afd5 100%);
  color: white;
  box-shadow: 0 12px 35px rgba(23, 105, 255, 0.18);
  margin-bottom: 22px;
}

.payment-hero::before {
  content: "";
  position: absolute;
  width: 270px;
  height: 270px;
  border: 45px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  right: -90px;
  top: -140px;
}

.payment-hero::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  border: 35px solid rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  right: 150px;
  bottom: -130px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 13px;
}

.hero-label svg {
  width: 13px;
  height: 13px;
}

.hero-title {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 7px;
}

.hero-desc {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  line-height: 1.7;
}

.hero-amount {
  min-width: 235px;
  padding: 18px 20px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.hero-amount small {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.hero-amount strong {
  display: block;
  font-size: 24px;
  letter-spacing: -0.7px;
}

.hero-amount span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 9px;
}

/* =====================================
           GRID
        ===================================== */

.grid {
  display: grid;
  gap: 20px;
}

.grid-main {
  grid-template-columns: 1.2fr 0.8fr;
}

.grid-history {
  grid-template-columns: 1fr;
}

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

.card-header {
  min-height: 67px;
  padding: 18px 21px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.card-icon {
  width: 35px;
  height: 35px;
  border-radius: 10px;
  background: #edf4ff;
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.card-title h2 {
  font-size: 13px;
  font-weight: 750;
}

.card-title p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.card-body {
  padding: 21px;
}

/* =====================================
           BILLING DETAIL
        ===================================== */

.invoice-box {
  padding: 19px;
  border-radius: 15px;
  background: #fbfcfe;
  border: 1px solid var(--border);
}

.invoice-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 5px;
}

.invoice-number small,
.invoice-date small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 5px;
}

.invoice-number strong {
  font-size: 13px;
}

.invoice-date {
  text-align: right;
}

.invoice-date strong {
  font-size: 11px;
}

.detail-list {
  display: flex;
  flex-direction: column;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid #eef2f7;
}

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

.detail-label {
  color: var(--muted);
  font-size: 10px;
}

.detail-value {
  font-size: 11px;
  font-weight: 650;
  text-align: right;
}

.detail-value.total {
  color: var(--blue);
  font-size: 16px;
  font-weight: 800;
}

.due-warning {
  margin-top: 16px;
  padding: 12px 13px;
  border-radius: 11px;
  background: #fff6ea;
  border: 1px solid #ffe5c4;
  color: #b86b1b;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  line-height: 1.5;
}

.due-warning svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

/* =====================================
           PAYMENT METHOD
        ===================================== */

.method-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  cursor: pointer;
  transition: 0.2s ease;
}

.method:hover {
  border-color: #cbd9ed;
  background: #fbfcff;
}

.method.selected {
  border-color: var(--blue);
  background: #f3f7ff;
  box-shadow: 0 0 0 1px rgba(23, 105, 255, 0.08);
}

.method-radio {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid #c7d1df;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.method.selected .method-radio {
  border-color: var(--blue);
}

.method.selected .method-radio::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.method-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #edf4ff;
  color: var(--blue);
  flex-shrink: 0;
}

.method-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.method-info {
  flex: 1;
}

.method-info strong {
  display: block;
  font-size: 11px;
}

.method-info span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.method-arrow {
  color: #a3afbd;
}

.method-arrow svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* =====================================
           BUTTON
        ===================================== */

.payment-button {
  width: 100%;
  height: 45px;
  margin-top: 16px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--blue), #0e58df);
  color: white;
  font-size: 11px;
  font-weight: 750;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(23, 105, 255, 0.18);
  transition: 0.2s ease;
}

.payment-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(23, 105, 255, 0.24);
}

.payment-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.secure-note {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 8px;
}

.secure-note svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

/* =====================================
           HISTORY
        ===================================== */

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th {
  padding: 12px 15px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.history-table td {
  padding: 14px 15px;
  border-bottom: 1px solid #eef2f7;
  font-size: 10px;
  vertical-align: middle;
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.invoice-id {
  color: var(--blue);
  font-weight: 700;
}

.payment-date {
  color: var(--muted);
}

.payment-amount {
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 8px;
  font-weight: 700;
}

.badge.green {
  color: #119565;
  background: #e8fbf3;
}

.badge.blue {
  color: var(--blue);
  background: #edf4ff;
}

.badge.orange {
  color: #d67a1e;
  background: #fff4e7;
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.download-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.download-btn:hover {
  color: var(--blue);
  border-color: #cbd9ed;
  background: #f7faff;
}

.download-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

/* =====================================
           INFO CARDS
        ===================================== */

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.info-card {
  padding: 18px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.info-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 13px;
  background: #edf4ff;
  color: var(--blue);
}

.info-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.info-card strong {
  display: block;
  font-size: 11px;
  margin-bottom: 5px;
}

.info-card p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

/* =====================================
           TOAST
        ===================================== */

.toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  padding: 13px 16px;
  border-radius: 12px;
  background: #182230;
  color: white;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
  transform: translateY(80px);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
  z-index: 2000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* =====================================
           RESPONSIVE
        ===================================== */

@media (max-width: 1050px) {
  .grid-main {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --sidebar: 0px;
  }

  .sidebar {
    width: 260px;
    transform: translateX(-100%);
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.12);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .mobile-menu {
    display: flex;
  }

  .topbar {
    padding: 0 18px;
  }

  .content {
    padding: 22px 18px 35px;
  }

  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-amount {
    width: 100%;
  }

  .user-info {
    display: none;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .history-wrapper {
    overflow-x: auto;
  }

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

@media (max-width: 600px) {
  .top-actions {
    gap: 8px;
  }

  .page-heading p {
    display: none;
  }

  .page-heading h1 {
    font-size: 16px;
  }

  .payment-hero {
    padding: 22px;
  }

  .hero-title {
    font-size: 22px;
  }

  .card-header {
    padding: 16px;
  }

  .card-body {
    padding: 16px;
  }

  .invoice-box {
    padding: 15px;
  }

  .invoice-top {
    flex-direction: column;
    gap: 13px;
  }

  .invoice-date {
    text-align: left;
  }

  .detail-row {
    align-items: flex-start;
  }

  .detail-value {
    max-width: 55%;
  }
}
