/* =========================================================
   ACCOUNT PAGE
   Uses design tokens already defined in style.css
   (--blue, --navy, --bg, --border, --text, --muted, --shadow)
========================================================= */


/* ---------------------------------------------------------
   HEADER + PAGE SHELL
--------------------------------------------------------- */

.account-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;

  background: rgba(4, 13, 30, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
}

.account-page {
  min-height: 100vh;
  padding-top: 72px;

  background:
    linear-gradient(180deg, #f5f8fc 0%, #ffffff 42%, #f4f7fb 100%);
}


/* ---------------------------------------------------------
   LOGIN VIEW
--------------------------------------------------------- */

.account-login-section {
  padding: 78px 0 90px;
}

.account-login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  align-items: start;
  gap: 50px;
}

.account-login-intro {
  padding-top: 18px;
}

.account-login-intro h1 {
  max-width: 520px;
  margin: 0 0 18px;
  color: #101a2c;
  font-size: clamp(38px, 4.4vw, 56px);
}

.account-login-intro h1 span {
  color: var(--blue);
}

.account-login-intro-text {
  max-width: 460px;
  margin: 0 0 28px;
  color: #657085;
  font-size: 15px;
  line-height: 1.7;
}

.account-login-points {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.account-login-points li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #37455c;
  font-size: 13px;
  font-weight: 600;
}

.account-login-points li span {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.account-login-card {
  padding: 36px;
  border: 1px solid #dce3ed;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(20, 43, 83, 0.10);
}

.account-login-heading {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e4e9f0;
}

.account-login-heading h2 {
  margin: 9px 0 8px;
  color: #101a2c;
  font-size: clamp(24px, 2.6vw, 30px);
}

.account-login-heading p {
  margin: 0;
  color: #657085;
  font-size: 12.5px;
  line-height: 1.6;
}

.account-form {
  display: grid;
  gap: 16px;
}

.account-form label {
  display: grid;
  gap: 7px;
  color: #1b2638;
  font-size: 12px;
  font-weight: 700;
}

.account-form input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d9e1eb;
  border-radius: 8px;
  background: #ffffff;
  color: #101a2c;
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.account-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.account-full-button {
  width: 100%;
  justify-content: center;
}

.account-otp-note {
  margin: 0;
  color: #657085;
  font-size: 12px;
  line-height: 1.6;
}

.account-link-button {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.account-login-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e4e9f0;
  color: #69768a;
  font-size: 11.5px;
  line-height: 1.6;
}

.account-login-note a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
}

.account-login-note span {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf3ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}


/* ---------------------------------------------------------
   DASHBOARD SHELL
--------------------------------------------------------- */

.account-dashboard-section {
  padding: 46px 0 90px;
}

.account-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.account-topbar h1 {
  margin: 8px 0 0;
  color: #101a2c;
  font-size: clamp(28px, 3vw, 38px);
}

#welcomeName {
  color: var(--blue);
}


/* ---------------------------------------------------------
   STAT CARDS
--------------------------------------------------------- */

.account-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}

.account-stat-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 19px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(20, 39, 69, 0.05);
}

.account-stat-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 16px;
  font-weight: 800;
}

.account-stat-card-warn .account-stat-icon {
  background: #fdf1e8;
  color: #c1691f;
}

.account-stat-card strong {
  display: block;
  color: #101a2c;
  font-size: 22px;
  line-height: 1.15;
}

.account-stat-card small {
  color: var(--muted);
  font-size: 11.5px;
}


/* ---------------------------------------------------------
   TABS
--------------------------------------------------------- */

.account-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.account-tab {
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #59677d;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.account-tab:hover {
  color: #101a2c;
}

.account-tab.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}

.account-panel {
  display: none;
}

.account-panel.is-active {
  display: block;
}

.account-panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.account-panel-heading h2 {
  margin: 0;
  color: #101a2c;
  font-size: clamp(21px, 2vw, 26px);
}

.account-panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}


/* ---------------------------------------------------------
   TICKET FILTER CHIPS
--------------------------------------------------------- */

.account-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-filter-chip {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: #59677d;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.account-filter-chip:hover {
  border-color: #b9cdf7;
}

.account-filter-chip.is-active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}


/* ---------------------------------------------------------
   TICKET LIST
--------------------------------------------------------- */

.account-ticket-list {
  display: grid;
  gap: 12px;
}

.account-ticket-card {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(20, 39, 69, 0.035);
}

.account-ticket-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.account-ticket-ref {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.account-ticket-card h3 {
  margin: 4px 0 0;
  color: #172237;
  font-size: 16px;
}

.account-ticket-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.account-status-badge {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.status-open {
  background: #fdf1e8;
  color: #c1691f;
}

.status-progress {
  background: #eaf1ff;
  color: #2f6df6;
}

.status-resolved {
  background: #eafaf1;
  color: #16886e;
}

.status-closed {
  background: #eef1f6;
  color: #59677d;
}

.account-ticket-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eef1f6;
}

.account-ticket-updated {
  color: var(--muted);
  font-size: 11.5px;
}

.account-ticket-actions {
  display: flex;
  gap: 8px;
}

.account-mini-button {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.account-mini-button:hover {
  border-color: #b9cdf7;
  background: var(--blue-soft);
}


/* ---------------------------------------------------------
   INVOICES TABLE
--------------------------------------------------------- */

.account-invoice-table {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.account-invoice-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.8fr 1fr 0.9fr 1fr;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid #eef1f6;
  font-size: 12.5px;
}

.account-invoice-row:last-child {
  border-bottom: 0;
}

.account-invoice-row-head {
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.account-invoice-id {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color: #172237;
  font-weight: 700;
}

.account-invoice-amount {
  color: #172237;
  font-weight: 700;
}

.status-paid {
  background: #eafaf1;
  color: #16886e;
}

.status-due {
  background: #eaf1ff;
  color: #2f6df6;
}

.status-overdue {
  background: #fdeeee;
  color: #c1392b;
}


/* ---------------------------------------------------------
   DOCUMENTS GRID
--------------------------------------------------------- */

.account-document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.account-document-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(20, 39, 69, 0.035);
}

.account-document-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
}

.account-document-card strong {
  display: block;
  color: #172237;
  font-size: 13px;
  line-height: 1.4;
}

.account-document-card small {
  display: block;
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.account-document-card a {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
}


/* ---------------------------------------------------------
   EMPTY STATE
--------------------------------------------------------- */

.account-empty-state {
  padding: 40px 20px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}


/* ---------------------------------------------------------
   PAYMENT MODAL
--------------------------------------------------------- */

.account-payment-dialog {
  width: min(100%, 420px);
}

.account-pay-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid #dce3ed;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 12.5px;
  color: var(--muted);
}

.account-pay-summary strong {
  color: #101a2c;
  font-size: 20px;
}


/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */

@media (max-width: 1000px) {

  .account-login-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .account-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-invoice-row {
    grid-template-columns: 1fr 1fr 0.8fr;
    row-gap: 6px;
  }

  .account-invoice-row-head {
    display: none;
  }

  .account-invoice-row > span:nth-child(4),
  .account-invoice-row > span:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {

  .account-page {
    padding-top: 64px;
  }

  .account-header .header-inner {
    height: 64px;
  }

  .account-login-section {
    padding: 46px 0 60px;
  }

  .account-login-card {
    padding: 24px 18px;
  }

  .account-dashboard-section {
    padding: 30px 0 60px;
  }

  .account-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .account-stats {
    grid-template-columns: 1fr 1fr;
  }

  .account-document-grid {
    grid-template-columns: 1fr;
  }

  .account-invoice-row {
    grid-template-columns: 1fr 1fr;
  }

  .account-ticket-top,
  .account-ticket-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
