/* FEAT Software — Nature Green Theme v3.0 */

/* === Base Reset === */
.feat-app, .feat-report { box-sizing: border-box; font-family: 'Segoe UI', Arial, sans-serif; color: #1a1a1a; }
.feat-app *, .feat-report * { box-sizing: border-box; }

/* === Login Wall === */
.feat-login-wall { display: flex; justify-content: center; align-items: center; min-height: 60vh; padding: 20px; }
.feat-login-prompt-card { background: white; border-radius: 16px; padding: 40px; max-width: 520px; width: 100%; text-align: center; box-shadow: 0 8px 40px rgba(27,94,32,0.15); border: 1px solid #C8E6C9; }
.feat-login-logo { height: 70px; margin-bottom: 12px; }
.feat-login-brand { font-size: 28px; font-weight: 900; color: #1B5E20; letter-spacing: -0.5px; }
.feat-login-tagline { font-size: 13px; color: #558B2F; margin: 6px 0 16px; }
.feat-login-divider { border: none; border-top: 2px solid #E8F5E9; margin: 16px 0; }
.feat-login-heading { font-size: 20px; color: #1B5E20; margin: 0 0 12px; }
.feat-login-desc { font-size: 14px; color: #555; line-height: 1.6; margin-bottom: 12px; }
.feat-login-access { font-size: 14px; color: #2E7D32; font-weight: 600; margin-bottom: 20px; }
.feat-login-note { font-size: 13px; color: #777; margin-top: 16px; }
.feat-login-note a { color: #2E7D32; }
.feat-btn-large { font-size: 16px !important; padding: 14px 32px !important; }

/* === App Header === */
.feat-app-header { background: linear-gradient(135deg, #1B5E20, #2E7D32); color: white; padding: 20px 24px; border-radius: 12px 12px 0 0; }
.feat-app-logo { font-size: 22px; font-weight: 900; letter-spacing: -0.5px; }
.feat-app-subtitle { font-size: 12px; color: #A5D6A7; margin-top: 3px; }
.feat-access-info { font-size: 13px; color: #C8E6C9; margin-top: 8px; background: rgba(0,0,0,0.15); padding: 6px 12px; border-radius: 6px; display: inline-block; }

/* === Tabs === */
.feat-tabs { display: flex; background: #E8F5E9; border-bottom: 2px solid #A5D6A7; }
.feat-tab { flex: 1; padding: 12px 16px; border: none; background: none; cursor: pointer; font-size: 14px; font-weight: 600; color: #558B2F; transition: all 0.2s; position: relative; }
.feat-tab:hover { background: #C8E6C9; }
.feat-tab.active { background: white; color: #1B5E20; border-bottom: 2px solid #1B5E20; margin-bottom: -2px; }
.feat-tab-badge { background: #1B5E20; color: white; border-radius: 10px; padding: 2px 7px; font-size: 11px; margin-left: 4px; }
.feat-tab-content { display: none; }
.feat-tab-content.active { display: block; }

/* === Form Card === */
.feat-form-card { background: white; border-radius: 0 0 12px 12px; padding: 24px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.feat-form-card h2 { color: #1B5E20; font-size: 20px; margin: 0 0 8px; }
.feat-form-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.feat-form-group { flex: 1; min-width: 200px; }
.feat-form-group.feat-full { flex: 100%; }
.feat-form-group label { display: block; font-weight: 600; color: #2E7D32; margin-bottom: 6px; font-size: 14px; }
.feat-form-group input { width: 100%; padding: 10px 14px; border: 2px solid #C8E6C9; border-radius: 8px; font-size: 15px; transition: border-color 0.2s; }
.feat-form-group input:focus { outline: none; border-color: #2E7D32; box-shadow: 0 0 0 3px rgba(46,125,50,0.1); }
.feat-form-group small { font-size: 12px; color: #888; margin-top: 4px; display: block; }
.feat-required { color: #B71C1C; }
.feat-optional { color: #888; font-size: 12px; font-weight: 400; }
.feat-form-actions { margin-top: 8px; }
.feat-error-msg { background: #FFEBEE; color: #C62828; padding: 10px 14px; border-radius: 8px; margin-top: 12px; font-size: 14px; border-left: 4px solid #E53935; }

/* === Buttons === */
.feat-btn { display: inline-block; padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: none; transition: all 0.2s; }
.feat-btn-primary { background: linear-gradient(135deg, #1B5E20, #2E7D32); color: white; padding: 12px 28px; font-size: 15px; width: 100%; text-align: center; box-shadow: 0 4px 12px rgba(27,94,32,0.3); }
.feat-btn-primary:hover { background: linear-gradient(135deg, #145216, #1B5E20); box-shadow: 0 6px 18px rgba(27,94,32,0.4); transform: translateY(-1px); }
.feat-btn-secondary { background: #E8F5E9; color: #1B5E20; border: 2px solid #2E7D32; }
.feat-btn-secondary:hover { background: #C8E6C9; }
.feat-btn-outline { background: transparent; color: #555; border: 2px solid #ccc; }
.feat-btn-outline:hover { background: #f5f5f5; }
.feat-btn-small, .feat-btn-sm { padding: 6px 14px; font-size: 13px; }
.feat-btn-pay { background: linear-gradient(135deg, #1B5E20, #33691E); color: white; padding: 8px 16px; font-size: 13px; border-radius: 6px; text-decoration: none; white-space: nowrap; }
.feat-btn-pay:hover { background: linear-gradient(135deg, #145216, #1B5E20); color: white; }
.feat-btn-delete { background: #FFEBEE; color: #C62828; border: 1px solid #EF9A9A; margin-left: 4px; }
.feat-btn-delete:hover { background: #FFCDD2; }

/* === Reports Table === */
.feat-reports-table-wrapper { overflow-x: auto; }
.feat-reports-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 600px; }
.feat-reports-table th { background: #1B5E20; color: white; padding: 10px 12px; text-align: left; }
.feat-reports-table td { padding: 10px 12px; border-bottom: 1px solid #E8F5E9; vertical-align: middle; }
.feat-reports-table tr:hover { background: #F1F8E9; }
.feat-lock-badge { background: #FFF3E0; color: #E65100; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.feat-unlock-badge { background: #E8F5E9; color: #1B5E20; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }

/* === Report Actions Bar === */
.feat-report-actions { background: #E8F5E9; padding: 12px 20px; border-radius: 8px; margin-bottom: 16px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* === Success Message === */
.feat-success-msg { background: #E8F5E9; color: #1B5E20; padding: 14px 18px; border-radius: 8px; border-left: 4px solid #2E7D32; font-size: 15px; margin: 12px 0; }

/* ============================================================
   REPORT STYLING
   ============================================================ */
.feat-report { background: white; max-width: 900px; margin: 0 auto; font-size: 14px; line-height: 1.6; }

/* === Language Switcher === */
.feat-lang-switcher { background: #F1F8E9; padding: 10px 16px; border-radius: 8px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feat-lang-btn { padding: 5px 14px; border-radius: 20px; border: 2px solid #A5D6A7; background: white; cursor: pointer; font-size: 13px; font-weight: 600; color: #2E7D32; transition: all 0.2s; }
.feat-lang-btn.active, .feat-lang-btn:hover { background: #1B5E20; color: white; border-color: #1B5E20; }

/* === Cover Page === */
.feat-cover-page { background: #ffffff; color: #1B5E20; padding: 40px 40px 30px; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; page-break-after: always; border-bottom: 6px solid #2E7D32; }
.feat-cover-logo img { height: 90px; margin-bottom: 20px; }
.feat-cover-badge { background: #E8F5E9; border: 2px solid #2E7D32; color: #1B5E20; padding: 8px 24px; border-radius: 24px; font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 30px; }
.feat-cover-name { font-size: 42px; font-weight: 900; letter-spacing: -1px; margin: 8px 0; color: #1A237E; }
.feat-cover-dob { font-size: 16px; color: #33691E; margin-bottom: 30px; font-weight: 600; }
.feat-cover-numbers { display: flex; align-items: center; gap: 20px; margin: 20px 0 30px; justify-content: center; }
.feat-cover-num-box { text-align: center; background: #F1F8E9; border: 2px solid #AED581; border-radius: 12px; padding: 16px 28px; min-width: 140px; }
.feat-cover-num-label { font-size: 12px; letter-spacing: 2px; color: #33691E; font-weight: 700; }
.feat-cover-num-val { font-size: 48px; font-weight: 900; line-height: 1; margin: 4px 0; color: #1B5E20; }
.feat-cover-num-elem { font-size: 13px; color: #558B2F; }
.feat-cover-divider { font-size: 36px; color: #AED581; }
.feat-cover-tagline { font-size: 14px; color: #558B2F; margin-bottom: 40px; font-style: italic; }
.feat-cover-footer { font-size: 13px; color: #666; border-top: 1px solid #C8E6C9; padding-top: 20px; }
.feat-page-break { page-break-after: always; }

/* === Report Header === */
.feat-report-header { background: linear-gradient(135deg, #1B5E20, #2E7D32); color: white; padding: 20px 24px; border-radius: 8px; margin-bottom: 20px; }
.feat-header-logo { height: 50px; margin-bottom: 10px; }
.feat-report-title-bar { font-size: 18px; font-weight: 900; letter-spacing: 1px; margin-bottom: 8px; }
.feat-report-for-box { font-size: 14px; color: #C8E6C9; }
.feat-report-for-name { font-size: 22px; font-weight: 900; color: white; margin-bottom: 4px; }

/* === Sections === */
.feat-section { margin-bottom: 24px; border: 1px solid #C8E6C9; border-radius: 10px; overflow: hidden; page-break-inside: avoid; }
.feat-section-title { background: linear-gradient(135deg, #1B5E20, #2E7D32); color: white; padding: 12px 20px; font-weight: 800; font-size: 15px; letter-spacing: 0.5px; }
.feat-subsection-title { background: #E8F5E9; color: #1B5E20; padding: 8px 20px; font-weight: 700; font-size: 13px; border-left: 4px solid #2E7D32; margin: 0; }
.feat-section p { padding: 6px 20px; margin: 4px 0; }

/* === Tables === */
.feat-table { width: 100%; border-collapse: collapse; margin: 0; }
.feat-table th { background: #E8F5E9; color: #1B5E20; padding: 9px 14px; text-align: left; font-size: 13px; font-weight: 700; border-bottom: 2px solid #A5D6A7; }
.feat-table td { padding: 8px 14px; border-bottom: 1px solid #F1F8E9; font-size: 13px; vertical-align: top; }
.feat-table tr:nth-child(even) { background: #FAFFF9; }
.feat-table tr:hover { background: #F1F8E9; }
.feat-row-highlight { background: #FFF3E0 !important; }

/* === Status Badges === */
.feat-status { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.feat-status-missing { background: #ECEFF1; color: #546E7A; border: 1px solid #CFD8DC; }
.feat-status-balanced { background: #E8F5E9; color: #1B5E20; border: 1px solid #A5D6A7; }
.feat-status-imbalanced { background: #FFF8E1; color: #F57F17; border: 1px solid #FFE082; }
.feat-status-highly-imbalanced { background: #FFEBEE; color: #C62828; border: 1px solid #EF9A9A; }
.feat-status-lucky { background: #E8F5E9; color: #1B5E20; }
.feat-status-enemy { background: #FFEBEE; color: #C62828; }
.feat-status-friendly { background: #E3F2FD; color: #1565C0; }
.feat-status-neutral { background: #F5F5F5; color: #555; }

/* Impact badge */
.feat-impact-badge { display: inline-block; padding: 3px 12px; border-radius: 12px; font-size: 13px; font-weight: 700; }
.feat-impact-lucky { background: #E8F5E9; color: #1B5E20; border: 1px solid #A5D6A7; }
.feat-impact-lucky_2 { background: #FFF8E1; color: #F57F17; border: 1px solid #FFE082; }
.feat-impact-friendly { background: #E3F2FD; color: #1565C0; border: 1px solid #90CAF9; }
.feat-impact-enemy { background: #FFEBEE; color: #C62828; border: 1px solid #EF9A9A; }
.feat-impact-not_acceptable { background: #FFEBEE; color: #B71C1C; border: 1px solid #EF9A9A; }
.feat-impact-neutral { background: #F5F5F5; color: #555; border: 1px solid #ddd; }

/* === Lo Shu Birth Grid === */
.feat-grid-wrapper { padding: 20px; background: #F9FFF9; }
.feat-birth-grid { margin: 0 auto; border-collapse: collapse; }
.feat-grid-cell { width: 100px; height: 80px; text-align: center; vertical-align: middle; border: 2px solid #A5D6A7; font-size: 22px; font-weight: 900; letter-spacing: 2px; border-radius: 4px; transition: all 0.2s; }
.feat-grid-missing { background: #ECEFF1; color: #bbb; font-size: 28px; }
.feat-grid-balanced { background: #E8F5E9; color: #1B5E20; }
.feat-grid-imbalanced { background: #FFF8E1; color: #E65100; }
.feat-grid-highly-imbalanced { background: #FFEBEE; color: #B71C1C; box-shadow: inset 0 0 8px rgba(183,28,28,0.2); }
.feat-grid-legend { font-size: 12px; color: #666; margin-top: 10px; padding: 0 !important; text-align: center; }

/* === Info Boxes === */
.feat-info-box { background: #E8F5E9; border-left: 4px solid #2E7D32; padding: 14px 18px; margin: 12px 20px; border-radius: 0 8px 8px 0; font-size: 13px; line-height: 1.7; }
.feat-warning-box { background: #FFF8E1; border-left: 4px solid #F9A825; padding: 14px 18px; margin: 12px 20px; border-radius: 0 8px 8px 0; font-size: 13px; line-height: 1.7; }
.feat-critical-box { background: #FFEBEE; border-left: 4px solid #B71C1C; padding: 14px 18px; margin: 12px 20px; border-radius: 0 8px 8px 0; font-size: 13px; line-height: 1.7; }
.feat-golden-box { background: linear-gradient(135deg, #F9FFF5, #E8F5E9); border: 2px solid #A5D6A7; padding: 20px 24px; margin: 12px 20px; border-radius: 10px; font-size: 14px; line-height: 1.8; }
.feat-strength-box { background: linear-gradient(135deg, #F9FFF5, #E8F5E9); border-left: 4px solid #1B5E20; padding: 14px 18px; margin: 12px 20px; border-radius: 0 8px 8px 0; font-size: 13px; line-height: 1.7; }
.feat-scenario-box { background: linear-gradient(135deg, #E8F5E9, #F1F8E9); border: 1px solid #A5D6A7; border-left: 5px solid #2E7D32; padding: 18px 20px; margin: 12px 20px; border-radius: 0 10px 10px 0; font-size: 13px; line-height: 1.8; }
.feat-summary-box { background: linear-gradient(135deg, #1B5E20, #2E7D32); color: white; padding: 20px 24px; margin: 16px 20px; border-radius: 10px; font-size: 13px; line-height: 2; }
.feat-summary-box strong { color: #A5D6A7; }

/* Property risk boxes */
.feat-property-risk-box { padding: 14px 18px; margin: 12px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.feat-risk-balanced { background: #E8F5E9; border: 2px solid #2E7D32; color: #1B5E20; }
.feat-risk-imbalanced { background: #FFF8E1; border: 2px solid #F9A825; color: #E65100; }
.feat-risk-highly-imbalanced { background: #FFEBEE; border: 2px solid #B71C1C; color: #C62828; }

/* Month colors */
.feat-month-power td { background: #E8F5E9 !important; }
.feat-month-caution td { background: #FFF8E1 !important; }
.feat-month-neutral td { background: white; }

/* === Report Footer === */
.feat-report-footer { background: linear-gradient(135deg, #1B5E20, #2E7D32); color: #C8E6C9; padding: 24px; text-align: center; font-size: 13px; line-height: 1.8; border-radius: 0 0 10px 10px; margin-top: 24px; }
.feat-report-footer strong { color: white; }

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .no-print, .feat-lang-switcher, .feat-app-header, .feat-tabs,
    .feat-report-actions, .feat-btn, .feat-form-card { display: none !important; }
    /* Override inline display:none — show report container */
    #feat-report-container { display: block !important; visibility: visible !important; }
    #feat-report-html { display: block !important; }
    /* Cover page — no forced full-page height */
    .feat-cover-page { page-break-after: always; }
    .feat-section { page-break-inside: avoid; border: 1px solid #ccc; }
    .feat-report { max-width: 100%; font-size: 11px; }
    .feat-report-footer { background: #1B5E20 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .feat-section-title { background: #1B5E20 !important; color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .feat-report-header { background: #1B5E20 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .skiptranslate, .goog-te-banner-frame, body > iframe { display: none !important; }
    body { top: 0 !important; margin-top: 0 !important; }
    body * { visibility: hidden; }
    #feat-report-container, #feat-report-container * { visibility: visible; }
    #feat-report-container { position: absolute; left: 0; top: 0; width: 100%; }
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .feat-form-row { flex-direction: column; gap: 12px; }
    .feat-form-group { min-width: 100%; }
    .feat-cover-name { font-size: 28px; }
    .feat-cover-numbers { flex-direction: column; gap: 12px; }
    .feat-cover-divider { display: none; }
    .feat-grid-cell { width: 70px; height: 60px; font-size: 18px; }
    .feat-btn-primary { font-size: 14px; padding: 12px 20px; }
    .feat-reports-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .feat-section-title { font-size: 13px; padding: 10px 14px; }
    .feat-table th, .feat-table td { padding: 7px 10px; font-size: 12px; }
    .feat-report-actions { flex-direction: column; }
    .feat-btn { width: 100%; text-align: center; }
}

/* ============================================================
   HIDE GOOGLE TRANSLATE BAR (top iframe toolbar)
   ============================================================ */
body { top: 0 !important; }
.goog-te-banner-frame, .skiptranslate { display: none !important; visibility: hidden !important; }
#goog-gt-tt, .goog-te-balloon-frame, .goog-te-menu-frame { display: none !important; }
/* Hide the translate bar that pushes body down */
.translated-ltr, .translated-rtl { margin-top: 0 !important; }
iframe.goog-te-banner-frame { display: none !important; }

/* Remedy card for donation section */
.remedy-card {
    border-left: 3px solid #E65100;
    background: #FFF8F5;
    padding: 10px 14px;
    margin: 8px 0;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    line-height: 1.5;
}
.remedy-card .rc-heading {
    font-weight: 700;
    color: #BF360C;
    margin-bottom: 4px;
    font-size: 13px;
}
.remedy-card .rc-seva {
    color: #1B5E20;
    font-weight: 600;
    margin-top: 6px;
    font-size: 12px;
}
.remedy-card .rc-timing {
    color: #666;
    font-size: 11px;
    font-style: italic;
    margin-top: 4px;
}

/* === BOTTOM ACTION BAR === */
.feat-report-actions-bottom {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid #C8E6C9;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* === MOBILE RESPONSIVE TABLES === */
@media (max-width: 768px) {
    .feat-reports-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .feat-reports-table {
        min-width: 600px;
    }
    /* Report content tables */
    .feat-table {
        font-size: 12px;
    }
    .feat-table th,
    .feat-table td {
        padding: 5px 7px;
        word-break: break-word;
    }
    /* Section titles wrap on mobile */
    .feat-section-title {
        font-size: 11px;
        padding: 7px 10px;
    }
    .feat-subsection-title {
        font-size: 11px;
    }
    /* Cover page on mobile */
    .feat-cover-numbers {
        flex-direction: column;
        align-items: center;
    }
    .feat-cover-num-box {
        min-width: 180px;
    }
    /* Lo Shu grid scale on mobile */
    .feat-grid-cell {
        width: 50px !important;
        height: 50px !important;
        font-size: 16px !important;
    }
    /* Action buttons stack on mobile */
    .feat-report-actions,
    .feat-report-actions-bottom {
        flex-direction: column;
    }
    .feat-report-actions button,
    .feat-report-actions-bottom button {
        width: 100%;
        text-align: center;
    }
    /* Tab labels truncate */
    .feat-tab {
        font-size: 12px;
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .feat-table th,
    .feat-table td {
        padding: 4px 6px;
        font-size: 11px;
    }
    .feat-cover-name {
        font-size: 22px !important;
    }
    .feat-cover-num-val {
        font-size: 32px !important;
    }
}
