/* ============================================
   Kashkoo Custom Styles
   ============================================ */

/* Sidebar top-level items - 18px headers */
#side-menu > li > a {
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 600;
}
#side-menu > li > a i {
  color: #ffffff !important;
  font-size: 18px !important;
}

/* Sub-menu items - 15px, indented */
#side-menu .sub-menu li a {
  color: #ffffff !important;
  font-size: 15px !important;
  padding-left: 3.5rem !important;
}

/* Disabled What If links (coming soon) */
.disabled-link {
  pointer-events: none;
  color: #a0d0d0 !important;
}
.disabled-link small {
  font-size: 0.85em;
  font-style: italic;
}

/* ============================================
   New Scenario Modal Options
   ============================================ */
.scenario-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 12px;
  border: 2px solid #e8e4dc;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  cursor: pointer;
}

.scenario-option:hover {
  border-color: #00856a;
  background: rgba(0, 133, 106, 0.05);
  text-decoration: none;
  color: inherit;
}

.scenario-option-danger:hover {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.05);
}

.option-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.option-text {
  display: flex;
  flex-direction: column;
}

.option-text strong {
  font-size: 16px;
  color: #1a1a1a;
}

.option-text small {
  font-size: 13px;
  color: #6b6b6b;
}

/* ============================================
   Income Table Compact Editing
   ============================================ */
#incomes-table th:nth-child(3),
#incomes-table th:nth-child(4),
#incomes-table th:nth-child(5),
#incomes-table th:nth-child(6) {
    width: 55px;
    text-align: center;
}
#incomes-table td:nth-child(3),
#incomes-table td:nth-child(4),
#incomes-table td:nth-child(5),
#incomes-table td:nth-child(6) {
    text-align: center;
}
#incomes-table td input {
    width: 100% !important;
    min-width: 45px;
    max-width: 120px;
    padding: 4px 6px !important;
    font-size: 13px;
}
#incomes-table td:nth-child(3) input,
#incomes-table td:nth-child(4) input,
#incomes-table td:nth-child(5) input,
#incomes-table td:nth-child(6) input {
    max-width: 55px !important;
    text-align: center;
}

/* Expenses Table Compact Editing */
#expenses-table th:nth-child(3),
#expenses-table th:nth-child(4) {
    width: 55px;
    text-align: center;
}
#expenses-table td:nth-child(3),
#expenses-table td:nth-child(4) {
    text-align: center;
}
#expenses-table td input {
    width: 100% !important;
    min-width: 45px;
    max-width: 120px;
    padding: 4px 6px !important;
    font-size: 13px;
}
#expenses-table td:nth-child(3) input,
#expenses-table td:nth-child(4) input {
    max-width: 55px !important;
    text-align: center;
}

/* Debts Table Compact Editing */
#debts-table th:nth-child(3),
#debts-table th:nth-child(4),
#debts-table th:nth-child(5) {
    width: 55px;
    text-align: center;
}
#debts-table td:nth-child(3),
#debts-table td:nth-child(4),
#debts-table td:nth-child(5) {
    text-align: center;
}
#debts-table td input {
    width: 100% !important;
    min-width: 45px;
    max-width: 120px;
    padding: 4px 6px !important;
    font-size: 13px;
}
#debts-table td:nth-child(3) input,
#debts-table td:nth-child(4) input,
#debts-table td:nth-child(5) input {
    max-width: 55px !important;
    text-align: center;
}

/* ============================================
   MyPlan Design System
   ============================================ */

/* Color Palette */
:root {
    --mp-bg: #F9F8F6;
    --mp-primary: #0D9488;
    --mp-primary-light: #E6FFFA;
    --mp-positive: #0D9488;
    --mp-negative: #E57373;
    --mp-warning: #F59E0B;
    --mp-text: #1F2937;
    --mp-text-light: #6B7280;
    --mp-card-bg: #FFFFFF;
    --mp-border: #E5E7EB;
    --mp-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --mp-shadow-lg: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
}

/* Page Background */
.myplan-page {
    background: var(--mp-bg);
    min-height: 100vh;
    padding: 24px;
}

/* Cards */
.mp-card {
    background: var(--mp-card-bg);
    border-radius: 12px;
    box-shadow: var(--mp-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

/* ============================================
   Section 1: The Reveal (Compact Horizontal)
   ============================================ */
.mp-reveal {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 32px;
}

.mp-reveal-einscow {
    width: 110px;
    height: auto;
    flex-shrink: 0;
}

.mp-reveal-content {
    flex: 1;
}

.mp-reveal-header {
    font-size: 18px;
    font-weight: 600;
    color: var(--mp-text);
    margin-bottom: 8px;
}

.mp-reveal-subtext {
    font-weight: 400;
    color: var(--mp-text-light);
    font-size: 14px;
}

.mp-reveal-numbers {
    display: flex;
    gap: 48px;
    margin-bottom: 12px;
}

.mp-reveal-item {
    text-align: left;
}

.mp-reveal-label {
    font-size: 28px;
    font-weight: 500;
    color: var(--mp-text-light);
    margin-bottom: 4px;
}

.mp-reveal-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--mp-positive);
    line-height: 1.1;
}

.mp-reveal-number.negative {
    color: var(--mp-negative);
}

.mp-reveal-message {
    font-size: 16px;
    color: var(--mp-text);
    line-height: 1.4;
}

/* ============================================
   Section 2: Key Moments
   ============================================ */
.mp-section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--mp-text);
    margin-bottom: 16px;
}

.mp-moments-list {
    background: var(--mp-card-bg);
    border-radius: 12px;
    box-shadow: var(--mp-shadow);
    overflow: hidden;
}

.mp-moment {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--mp-border);
}

.mp-moment:last-child {
    border-bottom: none;
}

.mp-moment-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.mp-moment-age {
    font-weight: 600;
    color: var(--mp-primary);
    min-width: 70px;
}

.mp-moment-text {
    color: var(--mp-text);
    flex: 1;
}

.mp-moment.warning .mp-moment-age,
.mp-moment.warning .mp-moment-text {
    color: var(--mp-warning);
}

/* ============================================
   Section 3: Net Worth Chart
   ============================================ */
.mp-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.mp-toggle-btn {
    background: var(--mp-primary-light);
    color: var(--mp-primary);
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.mp-toggle-btn:hover {
    background: #ccfbf1;
}

.mp-chart-container {
    height: 300px;
    position: relative;
}

/* ============================================
   Section 4: What If Prompts
   ============================================ */
.mp-whatif-section {
    padding: 32px 0;
}

.mp-whatif-title {
    font-size: 18px;
    color: var(--mp-text);
    margin-bottom: 20px;
}

.mp-whatif-cards {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.mp-whatif-card {
    background: var(--mp-card-bg);
    border-radius: 12px;
    box-shadow: var(--mp-shadow);
    padding: 20px;
    width: 180px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.mp-whatif-card:hover {
    box-shadow: var(--mp-shadow-lg);
    transform: translateY(-2px);
    border: 1px solid var(--mp-primary);
}

.mp-whatif-card-text {
    font-size: 16px;
    color: var(--mp-text);
    line-height: 1.4;
}

.mp-whatif-card-arrow {
    color: var(--mp-primary);
    font-size: 20px;
    text-align: right;
}

.mp-whatif-link {
    font-size: 14px;
    color: var(--mp-primary);
}

.mp-whatif-link:hover {
    text-decoration: underline;
}

/* ============================================
   Section 5: Your Inputs (Collapsed/Expanded)
   ============================================ */
.mp-inputs-section {
    padding: 32px 0;
}

.mp-input-card {
    background: var(--mp-card-bg);
    border-radius: 12px;
    box-shadow: var(--mp-shadow);
    margin-bottom: 12px;
    overflow: hidden;
}

.mp-input-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mp-input-header:hover {
    background: #fafafa;
}

.mp-input-category {
    font-size: 16px;
    font-weight: 600;
    color: var(--mp-text);
    margin-bottom: 4px;
}

.mp-input-summary {
    font-size: 14px;
    color: var(--mp-text-light);
}

.mp-input-toggle {
    font-size: 14px;
    color: var(--mp-primary);
    font-weight: 500;
    white-space: nowrap;
}

.mp-input-body {
    padding: 0 20px 20px;
    border-top: 1px solid var(--mp-border);
}

.mp-input-body.collapse:not(.show) {
    display: none;
}

/* Input Fields */
.mp-field {
    margin-bottom: 16px;
}

.mp-field-label {
    font-size: 14px;
    color: var(--mp-text-light);
    margin-bottom: 6px;
}

.mp-field-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mp-input {
    background: #fff;
    border: 1px solid var(--mp-border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 16px;
    font-weight: 600;
    color: var(--mp-text);
    text-align: right;
    min-width: 100px;
    max-width: 150px;
}

.mp-input:focus {
    outline: none;
    border-color: var(--mp-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.mp-input.small {
    min-width: 60px;
    max-width: 80px;
}

.mp-input-suffix {
    font-size: 14px;
    color: var(--mp-text-light);
}

/* Calculated Result Box */
.mp-result-box {
    background: var(--mp-primary-light);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0;
}

.mp-result-box p {
    margin: 0;
    font-size: 14px;
    color: var(--mp-text);
}

/* SS Options */
.mp-ss-options {
    margin: 12px 0;
    font-size: 14px;
}

.mp-ss-option {
    padding: 6px 0;
    color: var(--mp-text-light);
}

.mp-ss-option.selected {
    color: var(--mp-primary);
    font-weight: 600;
}

.mp-ss-option.selected::before {
    content: "→ ";
}

/* Lab Link */
.mp-lab-link {
    display: block;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--mp-border);
    color: var(--mp-primary);
    font-size: 14px;
    text-decoration: none;
}

.mp-lab-link:hover {
    text-decoration: underline;
}

/* Read-only Section (for display-only data like expenses list) */
.mp-readonly-section {
    border-top: 1px dashed var(--mp-border);
    padding-top: 16px;
}

.mp-readonly-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--mp-text);
    margin-bottom: 8px;
}

.mp-readonly-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--mp-muted);
    border-bottom: 1px solid var(--mp-border-light, #f0f0f0);
}

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

.mp-readonly-label {
    color: var(--mp-text);
}

.mp-readonly-value {
    font-weight: 500;
    color: var(--mp-text);
}

.mp-readonly-ages {
    font-size: 12px;
    color: var(--mp-muted);
}

/* Warning Box */
.mp-warning {
    background: #FFFBEB;
    border-left: 4px solid var(--mp-warning);
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 0 8px 8px 0;
}

.mp-warning p {
    margin: 0;
    color: #92400E;
}

/* ============================================
   Section 6: Share Prompt
   ============================================ */
.mp-share-section {
    display: flex;
    justify-content: center;
    padding: 48px 24px;
}

.mp-share-row {
    display: flex;
    gap: 24px;
    max-width: 900px;
    width: 100%;
}

.mp-share-card {
    background: var(--mp-card-bg);
    border-radius: 12px;
    box-shadow: var(--mp-shadow);
    padding: 32px;
    flex: 1;
    text-align: center;
}

.mp-feedback-card {
    flex: 1;
}

.mp-share-content {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    margin-bottom: 24px;
}

.mp-einscow-img {
    width: 50px;
    height: auto;
    flex-shrink: 0;
}

.mp-share-text {
    font-size: 16px;
    color: var(--mp-text);
    line-height: 1.6;
}

.mp-share-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.mp-btn-primary {
    background: var(--mp-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.mp-btn-primary:hover {
    background: #0b7c72;
}

.mp-btn-secondary {
    background: #fff;
    color: var(--mp-primary);
    border: 1px solid var(--mp-primary);
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.mp-btn-secondary:hover {
    background: var(--mp-primary-light);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .mp-reveal {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .mp-reveal-einscow {
        width: 80px;
        height: auto;
    }

    .mp-reveal-numbers {
        justify-content: center;
        gap: 24px;
    }

    .mp-reveal-item {
        text-align: center;
    }

    .mp-reveal-label {
        font-size: 20px;
    }

    .mp-reveal-number {
        font-size: 22px;
    }

    .mp-reveal-message {
        text-align: center;
    }

    .mp-whatif-cards {
        flex-direction: column;
    }

    .mp-whatif-card {
        width: 100%;
    }

    .mp-chart-container {
        height: 200px;
    }

    .mp-share-row {
        flex-direction: column;
    }
}
