:root {
    --primary-dark: #0B1F33;
    --accent-peach: #F58A54;
    --accent-blue: #31A8E0;
    --accent-peach-light: #FDBA7A;
    --neutral-light: #E4E4E4;
    --neutral-dark: #1F1F1F;

    --peach-red: #D04A32;
    --leaf-light: #73A54A;
    --leaf-dark: #3C6C2A;
    --cyan-glow: #7BE5FF;

    --page-bg: #F7F8FB;
    --card-bg: #FFFFFF;
    --border-soft: #D9E0E8;
    --text-muted: #5B6573;
    --shadow-soft: 0 6px 18px rgba(11, 31, 51, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    font-family: Inter, system-ui, Arial, sans-serif;
    margin: 0;
    background: var(--page-bg);
    color: var(--neutral-dark);
}

.container {
    max-width: 1500px;
    margin: 32px auto;
    padding: 0 24px 28px 24px;
}

h1 {
    color: var(--primary-dark);
    font-size: 2rem;
    margin: 0 0 24px 0;
}

h2 {
    color: var(--primary-dark);
    margin-top: 0;
    margin-bottom: 18px;
}

h3 {
    color: var(--primary-dark);
}

p {
    color: var(--text-muted);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-soft);
}

.error-box {
    color: var(--peach-red);
    background: #FFF1EE;
    border: 1px solid #F3C2B8;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.field-grid {
    display: grid;
    gap: 14px;
}

.plan-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.debt-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.debt-card {
    background: #FCFDFE;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
}

.debt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.debt-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--primary-dark);
}

input,
select,
button {
    font: inherit;
}

input,
select {
    width: 100%;
    padding: 11px 12px;
    font-size: 14px;
    border: 1px solid #C9D4E0;
    border-radius: 10px;
    background: #FFFFFF;
    color: var(--neutral-dark);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(49, 168, 224, 0.18);
}

button {
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.05s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

.actions button,
.section-header button,
.remove-debt-btn {
    width: auto;
}

.actions button,
.section-header button {
    background: var(--accent-peach);
    color: var(--neutral-dark);
    box-shadow: 0 4px 12px rgba(245, 138, 84, 0.25);
}

.actions button:hover,
.section-header button:hover {
    background: #FF9E6A;
}

.remove-debt-btn {
    background: var(--neutral-light);
    color: var(--neutral-dark);
}

.remove-debt-btn:hover {
    background: #D8D8D8;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 24px 0 28px 0;
}

.summary-card {
    background: linear-gradient(180deg, #FFFFFF 0%, #F9FBFD 100%);
    border: 1px solid var(--border-soft);
    border-top: 4px solid var(--accent-blue);
    border-radius: 12px;
    padding: 16px;
}

.summary-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
}

.section-title {
    margin-top: 10px;
    margin-bottom: 16px;
    color: var(--primary-dark);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
}

.results-table th,
.results-table td {
    text-align: left;
    padding: 14px 10px;
    border-bottom: 1px solid var(--border-soft);
}

.results-table th {
    font-weight: 700;
    color: var(--primary-dark);
}

.best-row {
    background: rgba(49, 168, 224, 0.08);
}

.results-actions {
    margin-top: 16px;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

@media (max-width: 700px) {
    .container {
        margin: 20px auto;
        padding: 0 14px 20px 14px;
    }

    .card {
        padding: 16px;
    }

    .summary-value {
        font-size: 20px;
    }

    .debt-card-header {
        align-items: flex-start;
        gap: 10px;
        flex-direction: column;
    }
}

/* .chart-card {
    background: #FFFFFF;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 26px;
    box-shadow: var(--shadow-soft);
} */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.chart-card {
    background: #fafbfd;
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 26px;
    box-shadow: var(--shadow-soft);
    min-width: 0;
}

.chart-card canvas {
    width: 100% !important;
    height: 320px !important;
    display: block;
}

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

.app-header {
    background: var(--primary-dark);
    padding: 18px 0;
    margin-bottom: 24px;
}

.app-header h1 {
    color: white;
    margin: 0;
}

.chart-card-large {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 26px auto;
}

.fixed-chart-wrap {
    width: 1000px;
    height: 500px;
    margin: 0 auto;
    position: relative;
}

.fixed-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.muted {
    color: #6b7280;
    font-size: 0.9em;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0B1F33; /* your brand dark */
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

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

.toast.success {
    background: #3C6C2A; /* green */
}

.toast.error {
    background: #D04A32; /* red */
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 31, 51, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    padding: 24px;
}

.modal-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.modal-card p {
    margin-top: 0;
    margin-bottom: 16px;
    color: #555;
}

.modal-card label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.modal-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #cfcfcf;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 18px;
}

.modal-input:focus {
    outline: none;
    border-color: #31A8E0;
    box-shadow: 0 0 0 3px rgba(49, 168, 224, 0.15);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-actions button,
.secondary-btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.modal-actions button {
    background: #F58A54;
    color: white;
}

.secondary-btn {
    background: #E4E4E4;
    color: #1F1F1F;
}

.hidden {
    display: none !important;
}

.current-plan-banner {
    margin: 0 0 16px 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: #E4E4E4;
    color: #0B1F33;
    font-weight: 600;
}

/* ===== My Plans table layout ===== */
.my-plans-table {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.plans-header,
.plans-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.8fr;
    gap: 16px;
    align-items: center;
}

.plans-header {
    font-weight: 700;
    padding: 12px 14px;
    background: var(--primary-dark);
    color: #ffffff;
    border: 1px solid var(--primary-dark);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.plans-row {
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: var(--shadow-soft);
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.08s ease;
}

.plans-row:hover {
    background: #F9FBFD;
    border-color: var(--accent-blue);
    transform: translateY(-1px);
}

.plan-name-cell {
    font-weight: 700;
    color: var(--primary-dark);
}

.plan-date-cell {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.plan-actions-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.plan-actions-cell button {
    width: auto;
    min-width: 84px;
    padding: 9px 12px;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: none;
}

/* Load */
.plan-actions-cell button:nth-child(1) {
    background: var(--accent-blue);
    color: #ffffff;
}

.plan-actions-cell button:nth-child(1):hover {
    background: #2598ca;
}

/* Duplicate */
.plan-actions-cell button:nth-child(2) {
    background: var(--leaf-light);
    color: #ffffff;
}

.plan-actions-cell button:nth-child(2):hover {
    background: var(--leaf-dark);
}

/* Rename */
.plan-actions-cell button:nth-child(3) {
    background: var(--neutral-light);
    color: var(--neutral-dark);
}

.plan-actions-cell button:nth-child(3):hover {
    background: #d7d7d7;
}

/* Delete */
.plan-actions-cell button:nth-child(4) {
    background: var(--peach-red);
    color: #ffffff;
}

.plan-actions-cell button:nth-child(4):hover {
    background: #b63d28;
}

.active-plan {
    border-left: 5px solid var(--leaf-light);
    background: #F3FFF6;
    box-shadow: inset 0 0 0 1px rgba(115, 165, 74, 0.18), var(--shadow-soft);
}

@media (max-width: 900px) {
    .plans-header,
    .plans-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .plans-header {
        display: none;
    }

    .plans-row {
        padding: 16px;
    }

    .plan-actions-cell {
        margin-top: 4px;
    }
}

.secondary-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    padding: 9px 2px;
}

.secondary-link:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* ===== Admin Users ===== */
.admin-users-table {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.admin-users-header,
.admin-users-row {
    display: grid;
    grid-template-columns: 1.8fr 1.4fr 1fr 1fr 1fr 1fr 0.9fr 0.9fr 1.2fr 0.8fr;
    gap: 14px;
    align-items: center;
}

.admin-users-header {
    font-weight: 700;
    padding: 12px 14px;
    background: var(--primary-dark);
    color: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.admin-users-row {
    padding: 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.admin-users-row:hover {
    border-color: var(--accent-blue);
    background: #F9FBFD;
}

.admin-email-cell {
    font-weight: 700;
    color: var(--primary-dark);
    word-break: break-word;
}

/* .success-box {
    background: #F3FFF6;
    color: var(--leaf-dark);
    border: 1px solid rgba(115, 165, 74, 0.35);
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 12px;
} */

@media (max-width: 1100px) {
    .admin-users-header,
    .admin-users-row {
        grid-template-columns: 1fr;
    }

    .admin-users-header {
        display: none;
    }
}

/* ===== Account Page ===== */
.account-shell {
    max-width: 1100px;
    margin: 32px auto;
}

.account-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #14314f 100%);
    color: #ffffff;
}

.account-title {
    margin: 0 0 8px 0;
    color: #1F1F1F;
}

.account-subtitle {
    margin: 0;
    color: #1F1F1F;
}

.account-email-chip {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    white-space: nowrap;
}

.account-grid-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    gap: 22px;
    align-items: start;
}

.account-password-card {
    grid-column: 1 / -1;
}

.account-info-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px 18px;
    margin-top: 8px;
    align-items: center;
}

.account-info-label {
    font-weight: 700;
    color: var(--primary-dark);
}

.account-info-value {
    color: var(--neutral-dark);
}

.account-section-text {
    margin-top: -2px;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.account-actions-row {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.account-actions-row button {
    background: var(--accent-peach);
    color: var(--neutral-dark);
    box-shadow: 0 4px 12px rgba(245, 138, 84, 0.25);
}

.account-actions-row button:hover {
    background: #FF9E6A;
}

.internal-note {
    padding: 14px 16px;
    border-radius: 12px;
    background: #F4F8FB;
    border: 1px solid var(--border-soft);
    color: var(--primary-dark);
}

.status-pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
}

.status-active {
    background: #F3FFF6;
    color: var(--leaf-dark);
    border: 1px solid rgba(115, 165, 74, 0.35);
}

.status-inactive {
    background: #FFF2F0;
    color: var(--peach-red);
    border: 1px solid rgba(208, 74, 50, 0.30);
}

.status-verified {
    background: #EEF8FF;
    color: var(--accent-blue);
    border: 1px solid rgba(49, 168, 224, 0.30);
}

.status-pending {
    background: #FFF8EE;
    color: var(--accent-peach);
    border: 1px solid rgba(245, 138, 84, 0.30);
}

.success-box {
    color: var(--leaf-dark);
    background: #F3FFF6;
    border: 1px solid rgba(115, 165, 74, 0.35);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

@media (max-width: 900px) {
    .account-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .account-email-chip {
        white-space: normal;
        word-break: break-word;
    }

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

    .account-password-card {
        grid-column: auto;
    }

    .account-info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

.plans-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.plans-table th,
.plans-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-soft);
    text-align: center;
}

.plans-table th:first-child,
.plans-table td:first-child {
    text-align: left;
    font-weight: 600;
}

.toast a {
    color: var(--accent-blue);
    text-decoration: underline;
    font-weight: 600;
}

.secondary-action {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    background: #E4E4E4;
    text-decoration: none;
    color: #0B1F33;
    font-weight: 500;
    margin-right: 8px;
}

/* .card {
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #ddd;
} */

.nav-email {
  color: white;
}

/* ===========================
     TOOLTIP STYLES
============================ */

.tooltip {
  position: relative;
  cursor: help;
  margin-left: 6px;
  font-size: 12px;
  display: inline-block;
}

.tooltip:hover::after {
  content: attr(data-tip);
  position: absolute;
  background: #1F1F1F;
  color: white;
  padding: 8px 10px;
  border-radius: 6px;
  top: 22px;
  left: 0;
  font-size: 12px;
  line-height: 1.35;
  width: 240px;
  white-space: normal;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

@media (max-width: 600px) {
  .tooltip:hover::after {
    width: 200px;
    left: auto;
    right: 0;
  }
}

.app-footer {
  margin: 32px auto 16px;
  /* margin-top: 40px; */
  padding: 16px;
  text-align: center;
  font-size: 14px;
  color: #666;
}

.app-footer a {
  color: #31A8E0;
  text-decoration: none;
  margin: 0 6px;
}

.app-footer a:hover {
  text-decoration: underline;
}

.header-left {
    display: flex;
    gap: 18px;
    align-items: center;
}

.logo {
    height: 90px;   /* 👈 bump this up */
    width: auto;
    display: block;
    border-radius: 6px;
}

.logo-text {
    margin-left: 16px;
    font-size: 30px;   /* 👈 restore that strong header feel */
    font-weight: 700;
    color: #ffffff;      /* 👈 matches your dark header */
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

button.primary {
    background-color: #F58A54;  /* peach accent */
    color: white;
    border: none;
}

button.primary:hover {
    background-color: #D04A32;
}