/* =============================================
   result.css — Evaluation Results Page
   ============================================= */

/* ── Empty State ── */
.result-empty {
    display:flex; flex-direction:column; align-items:center;
    justify-content:center; padding:80px 32px; text-align:center;
}
.result-empty-icon {
    width:80px; height:80px; background:#dbeafe; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    font-size:32px; color:#1a56db; margin-bottom:20px;
}
.result-empty h3 { font-family:'DM Serif Display',serif; font-size:22px; margin-bottom:8px; }
.result-empty p { color:#64748b; font-size:14px; margin-bottom:20px; }
.btn-start {
    display:inline-flex; align-items:center; gap:8px;
    background:#1a56db; color:white; padding:11px 24px;
    border-radius:8px; font-size:14px; font-weight:600; text-decoration:none;
}

/* ── Result Hero ── */
.result-hero {
    margin: 24px 32px 0;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: start;
}

.result-hero-left {
    background: linear-gradient(135deg, #1e3a8a 0%, #1a56db 100%);
    border-radius: 16px;
    padding: 28px;
    color: white;
}

.result-company-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.result-company-icon {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.result-company-name {
    font-family: 'DM Serif Display', serif;
    font-size: 18px; font-weight: 400; color: white; margin-bottom: 8px;
}
.result-company-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.rmeta-tag {
    padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
}
.rmeta-tag.phase { background: rgba(255,255,255,0.2); color: white; }
.rmeta-tag.persp { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.85); }
.rmeta-tag.date  { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); font-weight:400; }

/* Overall Ring */
.overall-score-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
}
.overall-ring-wrap {
    position: relative;
    width: 120px; height: 120px; flex-shrink: 0;
}
.overall-ring { width: 100%; height: 100%; }
.overall-ring-label {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.overall-score-num {
    font-family: 'DM Serif Display', serif;
    font-size: 28px; color: white; line-height: 1;
}
.overall-score-max { font-size: 12px; color: rgba(255,255,255,0.6); }
.overall-score-title { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 6px; }
.overall-score-status { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.overall-score-count { font-size: 12px; color: rgba(255,255,255,0.6); }

/* Aspect Cards Grid */
.aspect-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.aspect-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
.aspect-card:hover { transform: translateY(-2px); }
.aspect-card-top {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.aspect-card-icon {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.aspect-card-label { flex: 1; font-size: 13px; font-weight: 600; color: #1e293b; }
.aspect-card-score {
    font-family: 'DM Serif Display', serif;
    font-size: 22px; font-weight: 400; line-height: 1;
}
.aspect-progress-wrap { margin-bottom: 8px; }
.aspect-progress-bar {
    height: 6px; border-radius: 3px; overflow: hidden; margin-bottom: 4px;
}
.aspect-progress-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.aspect-progress-label { font-size: 11px; font-weight: 600; }
.aspect-card-count { font-size: 11px; color: #94a3b8; }

/* ── Action Bar ── */
.result-action-bar {
    display: flex; align-items: center; justify-content: space-between;
    margin: 16px 32px;
    padding: 12px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.result-action-left { display: flex; gap: 8px; }
.btn-action-bar {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 16px; border-radius: 8px;
    font-size: 13px; font-weight: 500;
    background: #f1f5f9; color: #475569;
    border: none; cursor: pointer; text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    transition: background 0.2s;
}
.btn-action-bar:hover { background: #e2e8f0; }
.btn-new-eval-bar {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px; border-radius: 8px;
    font-size: 13px; font-weight: 600;
    background: #1a56db; color: white;
    text-decoration: none; transition: background 0.2s;
}
.btn-new-eval-bar:hover { background: #1e3a8a; }

/* ── Section Title ── */
.result-section-title {
    display: flex; align-items: center; gap: 10px;
    padding: 0 32px; margin: 24px 0 12px;
    font-family: 'DM Serif Display', serif;
    font-size: 18px; color: #1e293b;
}
.result-section-title i { color: #1a56db; font-size: 16px; }
.detail-total-badge {
    margin-left: auto;
    background: #dbeafe; color: #1a56db;
    padding: 3px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
    font-family: 'DM Sans', sans-serif;
}

/* ── Charts ── */
.charts-row {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 16px; padding: 0 32px;
}
.chart-card {
    background: white; border-radius: 12px;
    padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.chart-card-header { margin-bottom: 16px; }
.chart-card-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 600; color: #1e293b;
    margin-bottom: 4px;
}
.chart-card-desc { font-size: 12px; color: #94a3b8; }
.chart-wrap { position: relative; height: 260px; }

/* ── Strengths & Weaknesses ── */
.sw-row {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 16px; padding: 0 32px;
}
.sw-card {
    background: white; border-radius: 12px;
    padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.sw-card-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 16px; padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}
.sw-icon {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0;
}
.strengths-icon { background: #d1fae5; color: #059669; }
.weaknesses-icon { background: #fee2e2; color: #dc2626; }
.sw-title { font-size: 15px; font-weight: 700; color: #1e293b; }
.sw-subtitle { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.sw-count {
    margin-left: auto;
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.strengths-count { background: #d1fae5; color: #059669; }
.weaknesses-count { background: #fee2e2; color: #dc2626; }

.sw-list { list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.sw-item {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 8px 10px; border-radius: 8px; background: #f8fafc;
    font-size: 12px; line-height: 1.4; color: #1e293b;
}
.sw-score-badge {
    flex-shrink: 0; width: 22px; height: 22px;
    border-radius: 6px; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; color: white;
}
.sw-score-badge.s1 { background: #dc2626; }
.sw-score-badge.s2 { background: #ea580c; }
.sw-score-badge.s3 { background: #d97706; }
.sw-score-badge.s4 { background: #059669; }
.sw-score-badge.s5 { background: #1d4ed8; }
.sw-ind-name { flex: 1; }
.sw-aspect-tag {
    flex-shrink: 0; padding: 2px 8px;
    border-radius: 4px; font-size: 10px; font-weight: 600; white-space: nowrap;
}
.sw-empty { font-size: 13px; color: #94a3b8; font-style: italic; padding: 8px 0; }

/* ── Detail Groups (Collapsible) ── */
.detail-group {
    margin: 0 32px 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
}
.detail-group-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}
.detail-group-header:hover { background: #f8faff; }
.detail-group-left { display: flex; align-items: center; gap: 14px; }
.detail-group-icon {
    width: 38px; height: 38px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0;
}
.detail-group-name { font-size: 15px; font-weight: 600; color: #1e293b; }
.detail-group-meta { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.detail-group-right { display: flex; align-items: center; gap: 12px; }
.detail-mini-bar-wrap {
    width: 100px; height: 6px;
    background: #f1f5f9; border-radius: 3px; overflow: hidden;
}
.detail-mini-bar { height: 100%; border-radius: 3px; transition: width 0.8s ease; }
.detail-avg-pill {
    padding: 4px 12px; border-radius: 20px;
    font-size: 13px; font-weight: 700;
}
.detail-chevron { color: #94a3b8; font-size: 13px; transition: transform 0.3s; }

/* Collapsible body */
.detail-table-wrap {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s ease;
}
.detail-table-wrap.open { max-height: 2000px; }

.detail-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.detail-table thead tr { background: #f8fafc; }
.detail-table th {
    padding: 10px 16px; text-align: left;
    font-size: 11px; font-weight: 700; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid #f1f5f9;
}
.detail-table tbody tr { border-bottom: 1px solid #f8fafc; transition: background 0.15s; }
.detail-table tbody tr:last-child { border-bottom: none; }
.detail-table tbody tr:hover { background: #f8faff; }
.td-num { padding: 12px 8px; text-align: center; font-size: 12px; color: #94a3b8; font-weight: 700; }
.td-ind { padding: 12px 16px; color: #1e293b; line-height: 1.4; }
.td-sub { padding: 12px 16px; font-size: 12px; color: #64748b; }
.td-score-cell { padding: 12px 8px; text-align: center; }
.td-desc { padding: 12px 16px; font-size: 12px; color: #475569; font-style: italic; line-height: 1.4; }

.score-circle {
    width: 32px; height: 32px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: white; margin: 0 auto;
}
.score-circle.s1 { background: #dc2626; }
.score-circle.s2 { background: #ea580c; }
.score-circle.s3 { background: #d97706; }
.score-circle.s4 { background: #059669; }
.score-circle.s5 { background: #1d4ed8; }

/* ── Print ── */
@media print {
    .sidebar, .topbar, .result-action-bar { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .detail-table-wrap { max-height: none !important; }
    .charts-row { grid-template-columns: 1fr 1fr; }
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .result-hero { grid-template-columns: 1fr; }
    .charts-row { grid-template-columns: 1fr; }
    .sw-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .result-hero, .charts-row, .sw-row { margin: 16px; }
    .result-section-title, .detail-group { padding-left: 16px; padding-right: 16px; }
    .result-section-title { padding: 0 16px; }
    .detail-group { margin: 0 16px 12px; }
    .result-action-bar { margin: 16px; }
    .aspect-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── New Access Code Banner ── */
.new-code-banner {
    margin:24px 32px 0; display:flex; align-items:center; gap:18px;
    background:linear-gradient(135deg,#059669,#047857);
    border-radius:14px; padding:20px 24px; color:white;
}
.new-code-icon { width:48px; height:48px; background:rgba(255,255,255,0.2); border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; }
.new-code-content { flex:1; }
.new-code-title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.8px; opacity:0.85; margin-bottom:4px; }
.new-code-value { font-family:monospace; font-size:22px; font-weight:700; letter-spacing:1px; margin-bottom:4px; }
.new-code-desc { font-size:12px; opacity:0.85; line-height:1.4; }
.new-code-copy { display:flex; align-items:center; gap:6px; background:white; color:#047857; border:none; padding:10px 18px; border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; flex-shrink:0; }
.new-code-copy:hover { background:#f0fdf4; }

/* =============================================
   DARK MODE FIX PART 4 — RESULT & CHARTS PAGE
   Append this to the BOTTOM of assets/css/style.css
   ============================================= */

/* ── Card backgrounds ── */
[data-theme="dark"] .aspect-card,
[data-theme="dark"] .chart-card,
[data-theme="dark"] .sw-card,
[data-theme="dark"] .detail-group,
[data-theme="dark"] .result-action-bar {
    background: #141d2e !important;
    box-shadow: none !important;
    border: 1px solid #2a374d;
}

/* ── Section titles ── */
[data-theme="dark"] .result-section-title {
    color: #f1f5f9 !important;
}

/* ── Aspect Card ── */
[data-theme="dark"] .aspect-card-label {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .aspect-card-count {
    color: #64748b !important;
}
[data-theme="dark"] .aspect-progress-bar {
    background: #243044 !important;
}

/* ── Chart Card ── */
[data-theme="dark"] .chart-card-title {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .chart-card-desc {
    color: #94a3b8 !important;
}

/* ── Strengths & Weaknesses Card ── */
[data-theme="dark"] .sw-card-header {
    border-bottom-color: #243044 !important;
}
[data-theme="dark"] .sw-title {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .sw-subtitle {
    color: #64748b !important;
}
[data-theme="dark"] .sw-item {
    background: #0f172a !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .sw-empty {
    color: #64748b !important;
}

/* ── Detail Group (Collapsible Indicator Tables) ── */
[data-theme="dark"] .detail-group-header:hover {
    background: #1a2740 !important;
}
[data-theme="dark"] .detail-group-name {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .detail-group-meta {
    color: #94a3b8 !important;
}
[data-theme="dark"] .detail-mini-bar-wrap {
    background: #243044 !important;
}
[data-theme="dark"] .detail-chevron {
    color: #64748b !important;
}

/* ── Detail Table ── */
[data-theme="dark"] .detail-table thead tr {
    background: #0a1428 !important;
}
[data-theme="dark"] .detail-table th {
    color: #93c5fd !important;
}
[data-theme="dark"] .detail-table tbody tr {
    border-bottom-color: #243044 !important;
}
[data-theme="dark"] .detail-table tbody tr:hover {
    background: #0f172a !important;
}
[data-theme="dark"] .td-num {
    color: #64748b !important;
}
[data-theme="dark"] .td-ind {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .td-sub {
    color: #94a3b8 !important;
}
[data-theme="dark"] .td-desc {
    color: #cbd5e1 !important;
}

/* ── Action Bar Buttons ── */
[data-theme="dark"] .btn-action-bar {
    background: #0f172a !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .btn-action-bar:hover {
    background: #1a2740 !important;
}

/* ── Detail Total Badge ── */
[data-theme="dark"] .detail-total-badge {
    background: rgba(59,130,246,0.18) !important;
    color: #93c5fd !important;
}

/* ── Result Empty State ── */
[data-theme="dark"] .result-empty h3 {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .result-empty p {
    color: #94a3b8 !important;
}