:root {
    --primary-color: #1f4e3d;
    --primary-dark: #143529;
    --secondary-color: #2e7d32;
    --secondary-dark: #1b5e20;
    --bg-color: #f2f6f3;
    --box-bg: #ffffff;
    --text-color: #333333;
    --border-color: #dfe6e1;
    --good-color: #2e7d32;
    --warn-color: #e65100;
    --bad-color: #b71c1c;
    --info-color: #1565c0;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 30px 16px;
    display: flex;
    justify-content: center;
}

.review-container {
    background-color: var(--box-bg);
    max-width: 880px;
    width: 100%;
    padding: 36px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    border-top: 5px solid var(--secondary-color);
}

.header {
    text-align: center;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
}

.logo {
    max-height: 95px;
    max-width: 220px;
    object-fit: contain;
    margin-bottom: 12px;
}

.header h1 {
    color: var(--primary-color);
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.header h2 {
    color: var(--secondary-color);
    margin: 4px 0 8px 0;
    font-size: 17px;
    font-weight: 600;
}

.header p {
    color: #6d7d74;
    margin: 0;
    font-size: 14px;
}

/* ===== Navigation Tabs ===== */
.portal-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 26px;
    background: #edf3ee;
    padding: 6px;
    border-radius: 10px;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s ease;
    color: #4b5d53;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--primary-color);
}

.nav-tab.active {
    background: #ffffff;
    color: var(--primary-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.tab-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.tab-title {
    font-weight: 700;
    font-size: 14.5px;
}

.tab-sub {
    font-size: 12px;
    color: #7b8e83;
    margin-top: 1px;
}

.nav-tab.active .tab-sub {
    color: var(--secondary-color);
    font-weight: 500;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

.section-intro {
    background: #f4f8f5;
    border-left: 4px solid var(--secondary-color);
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 24px;
}

.section-intro h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: var(--primary-color);
}

.section-intro p {
    margin: 0;
    font-size: 13.5px;
    color: #485c50;
    line-height: 1.5;
}

/* ===== Form Elements ===== */
.form-group { margin-bottom: 22px; }

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 14px;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
    outline: none;
}

/* File upload */
.file-upload-wrapper {
    border: 2px dashed var(--secondary-color);
    background-color: #f8fbf8;
    padding: 28px 18px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.25s ease;
    position: relative;
}

.file-upload-wrapper:hover,
.file-upload-wrapper.dragover { background-color: #eef6ee; }

.file-upload-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon { font-size: 36px; margin-bottom: 6px; }
.upload-text { margin: 0; color: #34495e; font-size: 14px; }

.file-name-display {
    margin-top: 10px;
    font-weight: 600;
    font-size: 13px;
    color: var(--secondary-color);
    word-break: break-all;
}

/* Checkboxes */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-top: 6px;
}

.checkbox-item {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    font-weight: 600;
    font-size: 13.5px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.checkbox-item small { font-weight: 400; color: #6b7a72; }
.checkbox-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-color: var(--secondary-color); }

.checkbox-item input {
    margin-right: 10px;
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: var(--secondary-color);
}

/* Reviewers upload grid */
.reviewers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.reviewer-card {
    background: #fafbf9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reviewer-card:hover {
    border-color: #b5c7ba;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.reviewer-card.required-card {
    border-color: #a4c4ac;
    background: #f7faf7;
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.rev-num {
    background: var(--primary-color);
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.card-header strong {
    font-size: 13px;
    display: block;
    line-height: 1.25;
    color: var(--primary-color);
}

.badge-req {
    color: var(--bad-color);
    font-weight: 600;
    font-size: 11px;
}

.badge-opt {
    color: #7b8e83;
    font-weight: 500;
    font-size: 11px;
}

.required-badge {
    background: #fde8e8;
    color: var(--bad-color);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.reviewer-card input[type="file"],
.single-file-box input[type="file"] {
    width: 100%;
    font-size: 12px;
    color: #444;
}

.single-file-box {
    background: #fafbf9;
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: 8px;
}

/* Buttons */
.submit-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 15.5px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.25s ease;
}

.submit-btn:hover { background-color: var(--secondary-dark); }
.submit-btn:disabled { background-color: #9bb59d; cursor: not-allowed; }

.secondary-btn {
    background: none;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
}

.secondary-btn:hover { background-color: #eef6ee; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 18px; font-size: 13.5px; }
.alert-error { background: #fdecea; color: #b71c1c; border: 1px solid #f5c6c2; }
.alert-warning-custom {
    background: #fff8e1;
    color: #8d5b00;
    border: 1px solid #ffe082;
    margin: 18px 0;
}
.alert-list {
    margin: 8px 0 0 18px;
    padding: 0;
    font-size: 13px;
    color: #634000;
}
.alert-list li { margin-bottom: 4px; }

/* Panels */
.panel { margin-top: 10px; }
.panel h3 { color: var(--primary-color); margin: 0 0 6px 0; font-size: 20px; }
.muted { color: #6d7d74; font-size: 13.5px; margin-top: 0; }

.progress-track {
    height: 12px;
    background: #e5ece6;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 16px;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #66bb6a, var(--secondary-color));
    border-radius: 6px;
    transition: width 0.5s ease;
}

.progress-pct { text-align: right; font-weight: 600; font-size: 13px; color: var(--primary-color); margin-top: 4px; }

.steps { list-style: none; padding: 0; margin: 14px 0 0 0; font-size: 13.5px; }
.steps li { padding: 5px 0 5px 24px; position: relative; color: #49584f; }
.steps li::before { content: '✔'; position: absolute; left: 0; color: var(--secondary-color); }
.steps li:last-child:not(.finished)::before { content: '⏳'; }

/* Result - Initial Review */
.result-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.decision-badge {
    padding: 10px 20px;
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.overall-score { font-size: 40px; font-weight: 700; color: var(--primary-color); }
.overall-score small { font-size: 15px; color: #7f8c8d; font-weight: 400; margin-left: 4px; }

.section-scores { margin-bottom: 18px; }
.score-row { display: grid; grid-template-columns: 220px 1fr 60px; gap: 12px; align-items: center; margin-bottom: 8px; font-size: 13.5px; }
.score-track { height: 10px; background: #e5ece6; border-radius: 5px; overflow: hidden; }
.score-fill { height: 100%; border-radius: 5px; }
.score-val { font-weight: 600; text-align: right; }

.exec-summary {
    background: #f6faf6;
    border-left: 4px solid var(--secondary-color);
    padding: 14px 16px;
    border-radius: 4px;
    font-size: 14px;
    margin: 0 0 20px 0;
}

/* Result - Compliance Audit */
.compliance-header-result { margin-bottom: 14px; }

.compliance-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-color);
    color: #ffffff;
    padding: 20px 24px;
    border-radius: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 16px;
}

.banner-title {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #a4cebe;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.banner-left h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
}

.banner-sub {
    margin: 4px 0 0 0;
    font-size: 12.5px;
    color: #d1e7dd;
}

.comp-percent-box {
    text-align: right;
    background: rgba(255, 255, 255, 0.12);
    padding: 10px 18px;
    border-radius: 8px;
}

.comp-percent-box span {
    display: block;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.comp-percent-box small {
    font-size: 11.5px;
    color: #c9ded3;
}

.compliance-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.metric-card {
    background: #f8faf8;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 10px;
    text-align: center;
}

.metric-val {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.1;
    margin-bottom: 4px;
}

.metric-label {
    font-size: 11.5px;
    color: #63756a;
    font-weight: 500;
}

.metric-good .metric-val { color: var(--good-color); }
.metric-warn .metric-val { color: var(--warn-color); }
.metric-bad .metric-val { color: var(--bad-color); }

.summary-box {
    background: #f9fbf9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
}

.summary-box h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 15px;
}

.comp-summary-p {
    margin: 0 0 14px 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: #333;
}

.recommendation-callout {
    background: #edf5ef;
    border-left: 4px solid var(--secondary-color);
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13.5px;
    color: var(--primary-dark);
}

.reviewers-audit-section {
    margin-bottom: 24px;
}

.reviewers-audit-section h4 {
    margin: 0 0 12px 0;
    color: var(--primary-color);
    font-size: 15px;
}

.reviewer-audit-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.rev-audit-header {
    background: #f4f7f5;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rev-audit-title {
    font-weight: 700;
    font-size: 14.5px;
    color: var(--primary-color);
}

.rev-audit-score {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--secondary-color);
    background: #e4efe6;
    padding: 3px 8px;
    border-radius: 4px;
}

.rev-assessment {
    padding: 10px 16px;
    font-size: 13px;
    color: #555;
    font-style: italic;
    background: #fafcfb;
    border-bottom: 1px solid #edf1ee;
}

.rev-audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.rev-audit-table th {
    background: #ecf3ee;
    color: var(--primary-color);
    text-align: left;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.rev-audit-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf1ee;
    vertical-align: top;
    line-height: 1.45;
}

.rev-audit-table tr:nth-child(even) td {
    background: #fcfdfc;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
}

.status-fully { background: #e8f5e9; color: #2e7d32; }
.status-partially { background: #fff3e0; color: #e65100; }
.status-not { background: #ffebee; color: #c62828; }
.status-rebuttal { background: #e3f2fd; color: #1565c0; }

.priority-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 2px;
}
.priority-critical { color: var(--bad-color); }
.priority-major { color: var(--warn-color); }
.priority-minor { color: var(--info-color); }

.evidence-box {
    color: #2b3a32;
    background: #f7faf8;
    padding: 6px 8px;
    border-radius: 4px;
    margin-top: 4px;
    font-size: 12px;
    border-left: 2px solid #a3c4ab;
}

.compliance-actions {
    margin-top: 20px;
}

.footer {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 12.5px;
    color: #8a978f;
}

[hidden] { display: none !important; }

@media (max-width: 768px) {
    .review-container { padding: 24px 18px; }
    .portal-nav { grid-template-columns: 1fr; }
    .reviewers-grid { grid-template-columns: 1fr; }
    .compliance-metrics-grid { grid-template-columns: 1fr 1fr; }
    .checkbox-group { grid-template-columns: 1fr; }
    .score-row { grid-template-columns: 1fr 60px; }
    .score-row .score-track { grid-column: 1 / -1; order: 3; }
    .compliance-banner { flex-direction: column; text-align: center; }
    .comp-percent-box { text-align: center; width: 100%; }
}
