/**
 * assets/css/portal-tab.css — Giao diện Tab "Gói 90 Ngày" trong /tai-khoan/
 */

.g90-portal-wrapper {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    overflow-x: hidden !important;
}
.woocommerce-MyAccount-content {
    overflow-x: hidden !important;
    max-width: 100%;
}
.g90-portal-wrapper *,
.g90-portal-wrapper *:before,
.g90-portal-wrapper *:after {
    box-sizing: border-box;
}

/* Hero Section */
.g90-portal-hero {
    background: linear-gradient(135deg, #062b1b 0%, #0d4a30 100%);
    color: #ffffff;
    padding: 28px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px rgba(6, 43, 27, 0.15);
}

.g90-hero-badge {
    display: inline-block;
    background: rgba(0, 230, 118, 0.15);
    color: #00E676;
    border: 1px solid rgba(0, 230, 118, 0.4);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.g90-portal-wrapper .g90-portal-hero .g90-hero-title,
.g90-portal-hero .g90-hero-title,
.g90-hero-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: #ffffff !important;
}

.g90-hero-subtitle {
    font-size: 13px;
    color: #cbd5e1;
    margin: 0 0 18px 0;
}

.g90-quick-status-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.g90-status-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}
.g90-status-pill.status-approved { background: rgba(5, 150, 105, 0.2); color: #34d399; border: 1px solid #059669; }
.g90-status-pill.status-published { background: rgba(37, 99, 235, 0.2); color: #60a5fa; border: 1px solid #2563eb; }
.g90-status-pill.status-pending_review { background: rgba(217, 119, 6, 0.2); color: #fbbf24; border: 1px solid #d97706; }
.g90-status-pill.status-draft { background: rgba(148, 163, 184, 0.2); color: #e2e8f0; border: 1px solid #64748b; }

.g90-btn-preview-link {
    background: #00E676;
    color: #010a06;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}
.g90-btn-preview-link:hover {
    background: #00c853;
    color: #000;
    transform: translateY(-1px);
}

/* Card Chung */
.g90-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    min-width: 0;
    max-width: 100%;
}

.g90-services-section {
    min-width: 0;
    max-width: 100%;
}

.g90-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.g90-card-icon {
    font-size: 28px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.g90-card-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.g90-card-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Khối A: Task List */
.g90-task-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.g90-task-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}
.g90-task-item.is-done {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.g90-task-item.is-waiting {
    background: #fffbeb;
    border-color: #fde68a;
}
.g90-task-item.is-locked {
    background: #f8fafc;
    border-color: #e2e8f0;
    opacity: 0.72;
}

.g90-task-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0f172a;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.g90-task-item.is-done .g90-task-num {
    background: #16a34a;
}
.g90-task-item.is-waiting .g90-task-num {
    background: #d97706;
}
.g90-task-item.is-locked .g90-task-num {
    background: #94a3b8;
}

.g90-btn-link-toggle {
    background: none;
    border: none;
    color: #059669;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    display: inline-block;
}
.g90-btn-link-toggle:hover {
    color: #047857;
}

.g90-task-body {
    flex: 1;
}

.g90-task-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px 0;
}

.g90-task-text {
    font-size: 13px;
    color: #475569;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.g90-task-input-row {
    margin-top: 10px;
}
.g90-task-input-row label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #334155;
}

.g90-input-group {
    display: flex;
    gap: 8px;
    max-width: 420px;
}

/* Nút & Input */
.g90-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border 0.2s;
}
.g90-input:focus {
    outline: none;
    border-color: #00AF51;
    box-shadow: 0 0 0 3px rgba(0, 175, 81, 0.15);
}

.g90-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: inherit;
}
.g90-btn-primary { background: #00AF51; color: #fff; }
.g90-btn-primary:hover { background: #009645; color: #fff; }

.g90-btn-success { background: #059669; color: #fff; }
.g90-btn-success:hover { background: #047857; color: #fff; }

.g90-btn-outline { background: #fff; border: 1px solid #cbd5e1; color: #334155; }
.g90-btn-outline:hover { background: #f1f5f9; color: #0f172a; }

.g90-btn-sm { padding: 6px 12px; font-size: 12px; }
.g90-btn-large { padding: 14px 24px; font-size: 15px; }

/* Khối B: Form thông tin */
.g90-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.g90-col-2 { grid-column: span 2; }

.g90-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #334155;
}

.g90-services-section {
    margin-top: 24px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.g90-section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.g90-section-title-row h4 { margin: 0; font-size: 15px; font-weight: 800; }

#g90-services-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
}

.g90-table {
    min-width: 520px;
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.g90-table th, .g90-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}
.g90-table th { background: #f8fafc; font-weight: 700; color: #475569; text-align: left; }

.g90-btn-del-row {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
}
.g90-btn-del-row:hover { color: #b91c1c; }

.g90-form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}
.g90-msg-feedback { font-size: 13px; font-weight: 600; }

/* Khối C: Preview & Approve */
.g90-preview-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}
.g90-preview-actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.g90-approval-box {
    border-top: 1px dashed #cbd5e1;
    padding-top: 20px;
}
.g90-alert-box {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}
.g90-alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.g90-alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

.g90-confirm-panel h4 { font-size: 15px; font-weight: 700; margin: 0 0 6px 0; }
.g90-confirm-panel p { font-size: 13px; color: #64748b; margin: 0 0 14px 0; }

/* Khối D: Đồ của tiệm */
.g90-assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}
.g90-asset-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafafa;
}
.g90-asset-icon { font-size: 24px; line-height: 1; }
.g90-asset-info h4 { margin: 0 0 4px 0; font-size: 14px; font-weight: 700; }
.g90-asset-info p { margin: 0 0 8px 0; font-size: 12px; color: #64748b; }
.g90-asset-link { font-size: 12px; font-weight: 700; color: #00AF51; text-decoration: none; }
.g90-asset-link:hover { text-decoration: underline; }
.g90-asset-waiting { font-size: 11px; color: #94a3b8; font-style: italic; }

/* Khối E: Timeline */
.g90-timeline-track {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    padding-left: 24px;
    border-left: 2px solid #e2e8f0;
    margin-left: 12px;
}
.g90-timeline-node { position: relative; }
.g90-timeline-marker {
    position: absolute;
    left: -32px;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.g90-timeline-node.is-completed .g90-timeline-marker {
    background: #00AF51;
}
.g90-timeline-date { font-size: 11px; color: #64748b; font-weight: 600; }
.g90-timeline-name { font-size: 14px; font-weight: 700; margin: 2px 0; }
.g90-timeline-report-link { font-size: 12px; font-weight: 600; color: #2563eb; }

/* Support Bar */
.g90-support-bar {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.g90-support-text strong { display: block; font-size: 14px; color: #0f172a; }
.g90-support-text span { font-size: 12px; color: #64748b; }
.g90-btn-zalo { background: #0284c7; color: #fff; }
.g90-btn-zalo:hover { background: #0369a1; color: #fff; }

/* Khối Giới Thiệu Gói 90 Ngày Tinh Gọn */
.g90-card-intro-compact {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border: 1px solid #bbf7d0;
    border-left: 4px solid #00AF51;
    padding: 20px 24px;
}
.g90-intro-compact-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.g90-badge-package {
    background: #00AF51;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-block;
}
.g90-shop-meta-item {
    font-size: 13px;
    color: #475569;
    font-weight: 600;
}
.g90-intro-compact-desc {
    font-size: 13.5px;
    line-height: 1.6;
    color: #334155;
    margin: 0 0 14px 0;
}
.g90-intro-custom-notes {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.g90-intro-compact-action {
    display: flex;
    align-items: center;
    gap: 12px;
}
.g90-btn-outline-green {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    color: #00873d;
    border: 1.5px solid #00AF51;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.g90-btn-outline-green:hover {
    background: #00AF51;
    color: #ffffff;
    border-color: #00AF51;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 175, 81, 0.25);
    transform: translateY(-1px);
}

/* Khối Giới Thiệu Gói 90 Ngày Cũ (Dự phòng) */
.g90-card-intro {
    border-left: 4px solid #00AF51;
    background: #ffffff;
}
.g90-intro-header {
    margin-bottom: 16px;
}
.g90-intro-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.g90-intro-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.g90-intro-item-title {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 1.5px solid #e2e8f0;
    padding-bottom: 6px;
}
.g90-intro-item p {
    margin: 0 0 8px 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: #334155;
}
.g90-intro-item p:last-child {
    margin-bottom: 0;
}
.g90-intro-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #334155;
}
.g90-intro-list li {
    margin-bottom: 8px;
}
.g90-intro-list li:last-child {
    margin-bottom: 0;
}
.g90-custom-highlight {
    background: #f0fdf4;
    border-left: 3px solid #16a34a;
    padding: 6px 10px;
    border-radius: 0 6px 6px 0;
    color: #15803d;
    font-weight: 600;
    list-style-type: none;
    margin-left: -18px;
}
.g90-text-muted {
    color: #64748b;
    font-size: 12.5px;
    font-style: italic;
}
.g90-process-phase {
    margin: 14px 0 6px 0;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}
.g90-process-phase:first-child {
    margin-top: 0;
}

/* Collapsible intro for completed tasks */
.g90-intro-collapsible {
    padding: 16px 20px;
}
.g90-intro-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #00AF51;
    user-select: none;
    outline: none;
}
.g90-intro-summary::-webkit-details-marker {
    display: none;
}
.g90-intro-summary-arrow {
    font-size: 14px;
    transition: transform 0.2s ease;
}
details[open] .g90-intro-summary-arrow {
    transform: rotate(180deg);
}
details[open] .g90-intro-content {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

/* Bảng ước tính dùng chung */
.g90-forecast-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 12px;
}
.g90-forecast-heading {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}
.g90-forecast-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 10px;
}
.g90-forecast-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    text-align: left;
    background: #ffffff;
}
.g90-forecast-table th {
    background: #f1f5f9;
    color: #334155;
    padding: 6px 10px;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    white-space: nowrap;
}
.g90-forecast-table td {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    color: #1e293b;
}
.g90-forecast-table td.col-budget {
    font-weight: 700;
    color: #00873d;
    white-space: nowrap;
}
.g90-forecast-notes {
    margin: 8px 0 10px 0;
    padding-left: 18px;
    font-size: 12px;
    color: #475569;
    line-height: 1.5;
}
.g90-forecast-notes li {
    margin-bottom: 4px;
}
.g90-forecast-disclaimer {
    font-size: 12px;
    color: #64748b;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-left: 3px solid #00AF51;
    padding: 8px 10px;
    border-radius: 4px;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .g90-portal-hero { padding: 20px 16px; border-radius: 12px; margin-bottom: 16px; }
    .g90-card { padding: 16px; border-radius: 12px; margin-bottom: 16px; }
    .g90-hero-title { font-size: 22px; }
    .g90-intro-grid { grid-template-columns: 1fr; gap: 12px; }
    .g90-form-grid { grid-template-columns: 1fr; }
    .g90-col-2 { grid-column: span 1; }
    .g90-input-group { flex-direction: column; align-items: stretch; }
    .g90-input-group .g90-btn { width: 100%; }
    .g90-support-bar { flex-direction: column; align-items: stretch; text-align: center; }
    .g90-preview-actions-row { flex-direction: column; }
    .g90-preview-actions-row .g90-btn { width: 100%; text-align: center; }
    .g90-assets-grid { grid-template-columns: 1fr; }
}
