@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&family=Space+Grotesk:wght@700&display=swap');

/* ============================
   BASE & TYPOGRAPHY
   ============================ */
*,*::before,*::after{box-sizing:border-box}
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}
body.light-mode {
    background-color: #f8fafc;
    color: #1e293b;
}
body.dark-mode {
    background-color: #0f172a;
    color: #e2e8f0;
}
.font-outfit { font-family: 'Outfit', sans-serif; }

/* ============================
   SCROLLBAR
   ============================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.dark-mode ::-webkit-scrollbar-thumb { background: #475569; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============================
   GRIMONT GLOBAL HEADER
   ============================ */
.grimont-global-header {
    width: 100%;
    z-index: 1000;
    position: sticky;
    top: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 0;
    font-family: 'Outfit', 'Inter', sans-serif;
    color: #e2e8f0;
    box-sizing: border-box;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}
.grimont-global-header * { box-sizing: border-box; }
.grimont-global-header .ggh-container {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ggh-left { display: flex; align-items: center; gap: 1.5rem; }
.ggh-logo-group {
    display: flex; align-items: center; gap: 0.875rem; text-decoration: none; transition: transform 0.2s ease;
}
.ggh-logo-group:hover { transform: scale(1.02); }
.ggh-logo-box {
    width: 40px; height: 40px; background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: white; font-weight: bold; font-size: 1.25rem; border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.25); flex-shrink: 0;
}
.ggh-logo-text {
    font-family: 'Space Grotesk', monospace; font-weight: 800; font-size: 1.2rem;
    color: white; letter-spacing: 0.05em; display: none;
}
.ggh-logo-text span { color: #00f2ff; }
@media (min-width: 640px) { .ggh-logo-text { display: block; } }
.ggh-separator { width: 1px; height: 36px; background-color: rgba(255, 255, 255, 0.1); display: none; }
@media (min-width: 768px) { .ggh-separator { display: block; } }
.ggh-app-info { display: flex; flex-direction: column; justify-content: center; }
.ggh-app-title-group { display: flex; align-items: center; gap: 0.6rem; }
.ggh-app-icon-container {
    width: 32px; height: 32px; border-radius: 8px; background: rgba(30, 41, 59, 1);
    border: 1px solid rgba(255, 255, 255, 0.1); display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #a78bfa; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); flex-shrink: 0;
}
.ggh-app-name { font-weight: 700; color: white; font-size: 1.05rem; margin: 0; padding: 0; letter-spacing: 0.02em; }
.ggh-app-desc {
    font-size: 0.8rem; color: #94a3b8; max-width: 600px;
    display: none; margin: 4px 0 0 0; padding: 0; line-height: 1.4; font-weight: 300;
}
@media (min-width: 1024px) { .ggh-app-desc { display: block; } }
.ggh-right { display: flex; align-items: center; gap: 1rem; }
.ggh-right button {
    background: rgba(30, 41, 59, 0.6) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important; width: 40px !important; height: 40px !important;
    border-radius: 50% !important; display: flex !important; align-items: center !important; justify-content: center !important;
    cursor: pointer !important; transition: all 0.2s ease !important; padding: 0 !important; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}
.ggh-right button:hover {
    background: rgba(30, 41, 59, 1) !important; color: white !important; border-color: rgba(255, 255, 255, 0.2) !important; transform: translateY(-1px) !important;
}

/* ============================
   LAYOUT CONTAINER
   ============================ */
.app-container {
    max-width: 1152px;
    margin: 0 auto;
    padding: 2rem 1rem;
}
@media (min-width: 640px) {
    .app-container { padding: 2rem 1.5rem; }
}

/* ============================
   HERO
   ============================ */
.hero-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
}
.light-mode .hero-title { color: #1e293b; }
.dark-mode .hero-title { color: #ffffff; }
.hero-subtitle {
    text-align: center;
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}
.light-mode .hero-subtitle { color: #475569; }
.dark-mode .hero-subtitle { color: #94a3b8; }

/* ============================
   CARDS & SECTIONS
   ============================ */
.card {
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}
.light-mode .card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dark-mode .card {
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.dark-mode .card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.card-flat {
    border-radius: 16px;
    padding: 1.5rem;
    transition: background-color 0.3s ease;
}
.light-mode .card-flat {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}
.dark-mode .card-flat {
    background: #1e293b;
    border: 1px solid #334155;
}

/* ============================
   SECTION HEADERS
   ============================ */
.section-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.light-mode .section-title { color: #1e293b; }
.dark-mode .section-title { color: #f1f5f9; }
.section-title i { color: #7c3aed; }

/* ============================
   TEMPLATE CARDS
   ============================ */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
@media (min-width: 768px) {
    .templates-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
.template-card {
    border-radius: 14px;
    padding: 1.25rem 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}
.light-mode .template-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
}
.dark-mode .template-card {
    background: #1e293b;
    border: 2px solid #334155;
}
.template-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.15);
}
.template-card.active {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
.light-mode .template-card.active { background: #f5f3ff; }
.dark-mode .template-card.active { background: rgba(124, 58, 237, 0.1); }

.template-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
}
.template-name {
    font-weight: 600;
    font-size: 0.9rem;
}
.light-mode .template-name { color: #1e293b; }
.dark-mode .template-name { color: #f1f5f9; }
.template-meta {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}
.light-mode .template-meta { background: #f1f5f9; color: #64748b; }
.dark-mode .template-meta { background: #334155; color: #94a3b8; }

/* ============================
   FORM ELEMENTS
   ============================ */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 768px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.form-group.full-width {
    grid-column: 1 / -1;
}
.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.light-mode .form-label { color: #334155; }
.dark-mode .form-label { color: #cbd5e1; }
.form-label i { font-size: 0.8rem; color: #7c3aed; }

.form-input,
.form-select {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s ease;
}
.light-mode .form-input,
.light-mode .form-select {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
}
.dark-mode .form-input,
.dark-mode .form-select {
    background: #0f172a;
    border: 1px solid #334155;
    color: #e2e8f0;
}
.form-input:focus,
.form-select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.form-input::placeholder {
    color: #94a3b8;
}

/* Custom select arrow */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2394a3b8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ============================
   RANGE SLIDER
   ============================ */
.range-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    outline: none;
    transition: background 0.2s ease;
}
.light-mode .range-slider { background: #e2e8f0; }
.dark-mode .range-slider { background: #334155; }
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
    transition: transform 0.15s ease;
}
.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}
.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}
.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 500;
}
.light-mode .range-labels { color: #94a3b8; }
.dark-mode .range-labels { color: #64748b; }
.range-value {
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.15rem 0.75rem;
    border-radius: 8px;
    display: inline-block;
    margin: 0.25rem auto 0;
}
.light-mode .range-value { color: #7c3aed; background: #f5f3ff; }
.dark-mode .range-value { color: #a78bfa; background: rgba(124, 58, 237, 0.12); }

/* ============================
   PRIORITY SELECTOR (Radio Visual)
   ============================ */
.priority-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.priority-btn {
    border-radius: 12px;
    padding: 1rem 0.75rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
}
.light-mode .priority-btn {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #475569;
}
.dark-mode .priority-btn {
    background: #0f172a;
    border: 2px solid #334155;
    color: #94a3b8;
}
.priority-btn:hover {
    transform: translateY(-2px);
}
.priority-btn.active-quality {
    border-color: #10b981;
    color: #10b981;
}
.light-mode .priority-btn.active-quality { background: #ecfdf5; }
.dark-mode .priority-btn.active-quality { background: rgba(16, 185, 129, 0.1); }

.priority-btn.active-cost {
    border-color: #f59e0b;
    color: #f59e0b;
}
.light-mode .priority-btn.active-cost { background: #fffbeb; }
.dark-mode .priority-btn.active-cost { background: rgba(245, 158, 11, 0.1); }

.priority-btn.active-deadline {
    border-color: #3b82f6;
    color: #3b82f6;
}
.light-mode .priority-btn.active-deadline { background: #eff6ff; }
.dark-mode .priority-btn.active-deadline { background: rgba(59, 130, 246, 0.1); }

.priority-icon {
    font-size: 1.5rem;
}

/* ============================
   SIZE SELECTOR
   ============================ */
.size-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.size-btn {
    border-radius: 10px;
    padding: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
}
.light-mode .size-btn { background: #f8fafc; border: 2px solid #e2e8f0; color: #475569; }
.dark-mode .size-btn { background: #0f172a; border: 2px solid #334155; color: #94a3b8; }
.size-btn:hover { transform: translateY(-1px); }
.size-btn.active {
    border-color: #7c3aed;
    color: #7c3aed;
}
.light-mode .size-btn.active { background: #f5f3ff; }
.dark-mode .size-btn.active { background: rgba(124, 58, 237, 0.1); }

/* ============================
   DELIVERABLES (dynamic list)
   ============================ */
.deliverables-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.deliverable-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    animation: fadeSlideIn 0.25s ease forwards;
}
.deliverable-row .form-input { flex: 1; }
.deliverable-remove {
    width: 36px; height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.light-mode .deliverable-remove { background: #fee2e2; color: #ef4444; }
.dark-mode .deliverable-remove { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.deliverable-remove:hover { transform: scale(1.1); }
.add-deliverable-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.6rem;
    border-radius: 10px;
    border: 2px dashed;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    background: transparent;
    font-family: 'Inter', sans-serif;
}
.light-mode .add-deliverable-btn { border-color: #cbd5e1; color: #64748b; }
.dark-mode .add-deliverable-btn { border-color: #475569; color: #94a3b8; }
.add-deliverable-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
}

/* ============================
   PRIMARY BUTTON
   ============================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
    letter-spacing: 0.02em;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}
.btn-primary:active {
    transform: translateY(0);
}
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.82rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}
.btn-export-png {
    color: #7c3aed;
}
.light-mode .btn-export-png { background: #f5f3ff; }
.dark-mode .btn-export-png { background: rgba(124, 58, 237, 0.12); }
.btn-export-png:hover { transform: translateY(-1px); }

.btn-export-pdf {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}
.btn-export-pdf:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35); }

.btn-export-word {
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 0 2px 10px rgba(29, 78, 216, 0.25);
}
.btn-export-word:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(29, 78, 216, 0.35); }

.btn-export-pptx {
    color: #ffffff;
    background: linear-gradient(135deg, #ea580c, #f97316);
    box-shadow: 0 2px 10px rgba(234, 88, 12, 0.25);
}
.btn-export-pptx:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(234, 88, 12, 0.35); }

.btn-export-zip {
    color: #ffffff;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.25);
}
.btn-export-zip:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35); }

.btn-reset {
    color: #ef4444;
}
.light-mode .btn-reset { background: #fef2f2; border: 1px solid #fecaca; }
.dark-mode .btn-reset { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); }
.btn-reset:hover { transform: translateY(-1px); }

/* ============================
   RESULTS SECTION
   ============================ */
.results-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.results-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.75rem;
}
.light-mode .results-title { color: #1e293b; }
.dark-mode .results-title { color: #ffffff; }
.results-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .results-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================
   TRIANGLE SVG
   ============================ */
.triangle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    min-height: 320px;
}
.triangle-svg {
    max-width: 380px;
    width: 100%;
}

/* ============================
   SCORE DONUT
   ============================ */
.score-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
}
.donut-chart {
    position: relative;
    width: 160px;
    height: 160px;
}
.donut-chart-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    filter: drop-shadow(0px 4px 10px rgba(0, 0, 0, 0.08));
    overflow: visible;
}
.donut-chart-background {
    fill: none;
    stroke-width: 2.8;
}
.light-mode .donut-chart-background { stroke: #e2e8f0; }
.dark-mode .donut-chart-background { stroke: #334155; }
.donut-chart-foreground {
    fill: none;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 0 100;
    transition: stroke-dasharray 1.5s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s ease;
}
.donut-chart-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}
.score-label {
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
}

/* ============================
   DIAGNOSTIC / RESULT CARDS
   ============================ */
.result-card {
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
}
.light-mode .result-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}
.dark-mode .result-card {
    background: #1e293b;
    border: 1px solid #334155;
}
.result-card-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.result-card .export-btn-mini {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px; height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    opacity: 0.5;
}
.result-card:hover .export-btn-mini { opacity: 1; }
.light-mode .export-btn-mini { background: #f5f3ff; color: #7c3aed; }
.dark-mode .export-btn-mini { background: rgba(124, 58, 237, 0.12); color: #a78bfa; }
.export-btn-mini:hover { transform: scale(1.1); }

/* Editable content */
.editable-content {
    outline: none;
    border-radius: 8px;
    padding: 0.3rem;
    transition: all 0.2s ease;
    min-height: 1.5em;
}
.editable-content:hover {
    background: rgba(124, 58, 237, 0.04);
}
.editable-content:focus {
    background: rgba(124, 58, 237, 0.06);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}
.edit-hint {
    font-size: 0.7rem;
    font-style: italic;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.light-mode .edit-hint { color: #94a3b8; }
.dark-mode .edit-hint { color: #64748b; }

/* ============================
   DIAGNOSTIC ITEMS
   ============================ */
.diagnostic-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}
.light-mode .diagnostic-item { border-bottom: 1px solid #f1f5f9; }
.dark-mode .diagnostic-item { border-bottom: 1px solid #1e293b; }
.diagnostic-item:last-child { border-bottom: none; }
.diagnostic-icon {
    width: 28px; height: 28px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; flex-shrink: 0;
    margin-top: 0.1rem;
}

/* ============================
   ALERT BANNER
   ============================ */
.alert-banner {
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-left: 4px solid;
}
.alert-banner.alert-warning {
    border-left-color: #f59e0b;
}
.light-mode .alert-banner.alert-warning { background: #fffbeb; }
.dark-mode .alert-banner.alert-warning { background: rgba(245, 158, 11, 0.08); }
.alert-banner.alert-danger {
    border-left-color: #ef4444;
}
.light-mode .alert-banner.alert-danger { background: #fef2f2; }
.dark-mode .alert-banner.alert-danger { background: rgba(239, 68, 68, 0.08); }
.alert-banner-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}
.alert-banner.alert-warning .alert-banner-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.alert-banner.alert-danger .alert-banner-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.alert-banner-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}
.light-mode .alert-banner.alert-warning .alert-banner-title { color: #92400e; }
.dark-mode .alert-banner.alert-warning .alert-banner-title { color: #fbbf24; }
.light-mode .alert-banner.alert-danger .alert-banner-title { color: #991b1b; }
.dark-mode .alert-banner.alert-danger .alert-banner-title { color: #fca5a5; }
.alert-banner-text {
    font-size: 0.88rem;
    line-height: 1.5;
}
.light-mode .alert-banner.alert-warning .alert-banner-text { color: #78350f; }
.dark-mode .alert-banner.alert-warning .alert-banner-text { color: #fde68a; }
.light-mode .alert-banner.alert-danger .alert-banner-text { color: #7f1d1d; }
.dark-mode .alert-banner.alert-danger .alert-banner-text { color: #fecaca; }

/* ============================
   COMPROMISE CARDS
   ============================ */
.compromise-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) {
    .compromise-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
.compromise-card {
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}
.light-mode .compromise-card { background: #f8fafc; border: 1px solid #e2e8f0; }
.dark-mode .compromise-card { background: #0f172a; border: 1px solid #334155; }
.compromise-card:hover { transform: translateY(-2px); }
.compromise-number {
    width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.8rem; color: #ffffff;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    margin-bottom: 0.5rem;
}
.compromise-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}
.light-mode .compromise-title { color: #1e293b; }
.dark-mode .compromise-title { color: #f1f5f9; }
.compromise-desc {
    font-size: 0.85rem;
    line-height: 1.5;
}
.light-mode .compromise-desc { color: #64748b; }
.dark-mode .compromise-desc { color: #94a3b8; }
.compromise-impact {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.impact-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}
.impact-tag.positive { background: #ecfdf5; color: #059669; }
.dark-mode .impact-tag.positive { background: rgba(5, 150, 105, 0.12); color: #34d399; }
.impact-tag.negative { background: #fef2f2; color: #dc2626; }
.dark-mode .impact-tag.negative { background: rgba(220, 38, 38, 0.12); color: #f87171; }
.impact-tag.neutral { background: #f8fafc; color: #64748b; }
.dark-mode .impact-tag.neutral { background: rgba(100, 116, 139, 0.12); color: #94a3b8; }

/* ============================
   RECOMMENDATION CARD
   ============================ */
.reco-card {
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.reco-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7c3aed, #2563eb, #06b6d4);
}
.light-mode .reco-card { background: #ffffff; border: 1px solid #e2e8f0; }
.dark-mode .reco-card { background: #1e293b; border: 1px solid #334155; }
.reco-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(37, 99, 235, 0.1));
    color: #7c3aed;
    margin-bottom: 1rem;
}
.reco-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}
.light-mode .reco-title { color: #1e293b; }
.dark-mode .reco-title { color: #f1f5f9; }
.reco-text {
    font-size: 0.9rem;
    line-height: 1.65;
}
.light-mode .reco-text { color: #475569; }
.dark-mode .reco-text { color: #94a3b8; }

/* ============================
   SOURCES
   ============================ */
.sources-section {
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
}
.light-mode .sources-section { background: #f8fafc; border: 1px solid #e2e8f0; }
.dark-mode .sources-section { background: #0f172a; border: 1px solid #334155; }
.sources-title {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.light-mode .sources-title { color: #64748b; }
.dark-mode .sources-title { color: #94a3b8; }
.source-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    margin-right: 1.5rem;
    margin-bottom: 0.4rem;
}
.light-mode .source-link { color: #7c3aed; }
.dark-mode .source-link { color: #a78bfa; }
.source-link:hover { text-decoration: underline; }

/* ============================
   LOADING
   ============================ */
.loading-overlay {
    display: none;
    text-align: center;
    padding: 3rem;
}
.loading-overlay.visible { display: block; }
.loading-spinner {
    width: 48px; height: 48px;
    border: 4px solid rgba(124, 58, 237, 0.2);
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}
.loading-text {
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}
.light-mode .loading-text { color: #7c3aed; }
.dark-mode .loading-text { color: #a78bfa; }

/* ============================
   ANIMATIONS
   ============================ */
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.animate-fade-in {
    animation: fadeSlideIn 0.4s ease-out forwards;
}

/* ============================
   HIDDEN UTILITY
   ============================ */
.hidden { display: none !important; }

/* ============================
   PDF EXPORT HEADER
   ============================ */
.pdf-header {
    display: none;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}
.pdf-header.visible { display: flex; }
.pdf-header-logo {
    display: flex; align-items: center; gap: 0.75rem;
}
.pdf-header-logo-box {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: bold; font-size: 1rem;
}
.pdf-header-logo-text {
    font-family: 'Space Grotesk', monospace;
    font-weight: 800;
    font-size: 1.1rem;
    color: #1e293b;
    letter-spacing: 0.05em;
}
.pdf-header-logo-text span { color: #2563eb; }
.pdf-header-right {
    text-align: right;
    font-size: 0.82rem;
}
.pdf-header-right strong { color: #1e293b; }
.pdf-header-right a { color: #7c3aed; text-decoration: none; }

/* ============================
   RESPONSIVE FINAL
   ============================ */
@media (max-width: 480px) {
    .hero-title { font-size: 1.5rem; }
    .templates-grid { grid-template-columns: repeat(2, 1fr); }
    .priority-group { grid-template-columns: 1fr; }
    .results-header { flex-direction: column; align-items: flex-start; }
}
