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

:root {
    --bg-base: #021f14;
    --bg-surface: #032e1f;
    --bg-surface-glass: rgba(2, 31, 20, 0.75);
    --border-glass: rgba(187, 132, 38, 0.15);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    --brand-primary: #bb8426;
    --brand-accent: #e5b558;
    
    --color-champion: #10b981;
    --color-opportunity: #e5b558;
    --color-risk: #ef4444;
    --color-overhype: #f59e0b;
    
    --grad-champion: linear-gradient(135deg, #10b981, #059669);
    --grad-opportunity: linear-gradient(135deg, #e5b558, #bb8426);
    --grad-risk: linear-gradient(135deg, #ef4444, #dc2626);
    --grad-overhype: linear-gradient(135deg, #f59e0b, #d97706);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: radial-gradient(circle at top right, #053b27, var(--bg-base) 70%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

header {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(to right, var(--brand-accent), #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
    padding: 2px 6px;
    border-radius: 4px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), #8a621d);
    color: #fff;
    box-shadow: 0 4px 14px rgba(187, 132, 38, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(187, 132, 38, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background: var(--grad-risk);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-2px);
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphism Cards */
.card {
    background: rgba(3, 38, 25, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.08), 0 16px 32px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: rgba(187, 132, 38, 0.25);
    transform: translateY(-2px);
    box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.12), 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(187, 132, 38, 0.08);
}

/* Title & Headers */
h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

p.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* 2x2 Grid Visualization */
.matrix-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
    height: 380px;
    margin-bottom: 2rem;
}

.quadrant-card {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.quad-1 {
    background: rgba(16, 185, 129, 0.08);
    border-left: 4px solid var(--color-champion);
}
.quad-2 {
    background: rgba(187, 132, 38, 0.08);
    border-left: 4px solid var(--color-opportunity);
}
.quad-3 {
    background: rgba(239, 68, 68, 0.08);
    border-left: 4px solid var(--color-risk);
}
.quad-4 {
    background: rgba(245, 158, 11, 0.08);
    border-left: 4px solid var(--color-overhype);
}

.quadrant-card:hover {
    transform: scale(1.02);
}

.quadrant-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.quad-1 h3 { color: var(--color-champion); }
.quad-2 h3 { color: var(--color-opportunity); }
.quad-3 h3 { color: var(--color-risk); }
.quad-4 h3 { color: var(--color-overhype); }

.quadrant-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.quad-count {
    font-size: 2.2rem;
    font-weight: 700;
    align-self: flex-end;
}

/* Stats Row */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}

/* Table Style */
.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-glass);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 1rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Badge System */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-champion {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-champion);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-opportunity {
    background: rgba(187, 132, 38, 0.15);
    color: var(--color-opportunity);
    border: 1px solid rgba(187, 132, 38, 0.3);
}

.badge-risk {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-risk);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-overhype {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-overhype);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Score Pill */
.score-pill {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    display: inline-block;
}

.score-high { background: var(--grad-champion); }
.score-med { background: var(--grad-overhype); }
.score-low { background: var(--grad-risk); }

/* Form Control styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.7rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

select {
    color-scheme: dark;
}

select option {
    background-color: #032e1f !important;
    color: #f8fafc !important;
}

select option:hover, 
select option:focus, 
select option:active,
select option:checked {
    background-color: var(--brand-primary) !important;
    color: #021f14 !important;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 8px rgba(187, 132, 38, 0.3);
}

/* Evidence library search */
.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box input {
    padding-left: 2.5rem;
}

.search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

/* Grid layout for profile columns */
.profile-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
}

.profile-sidebar {
    position: sticky;
    top: 5rem;
    height: fit-content;
}

.sidebar-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-metric:last-child {
    border-bottom: none;
}

/* Interactive QA elements list */
.taxonomy-section {
    margin-bottom: 2rem;
}

.pillar-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--brand-primary);
    margin-bottom: 1rem;
}

.domain-section {
    margin-left: 1rem;
    margin-bottom: 1.5rem;
}

.domain-header {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--brand-accent);
    margin-bottom: 0.75rem;
}

.element-row {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: grid;
    grid-template-columns: 80px 1fr 120px 150px;
    gap: 1rem;
    align-items: center;
    transition: var(--transition-smooth);
}

.element-row:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.el-code {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-secondary);
}

.el-name {
    font-weight: 500;
}

.el-score-select {
    padding: 0.3rem 0.5rem;
    font-weight: 700;
    border-radius: 4px;
}

.el-status-select {
    padding: 0.3rem 0.5rem;
}

.el-details {
    grid-column: 2 / -1;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.04);
    display: none; /* toggled via JS */
}

.el-details.show {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-toggle-el {
    grid-column: 1 / -1;
    text-align: center;
    background: none;
    border: none;
    color: var(--brand-accent);
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
    .profile-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .matrix-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    .quadrant-card {
        min-height: 120px;
    }
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem 1rem;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .element-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .el-details.show {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    h1 {
        font-size: 1.8rem;
    }
}

/* Print Stylesheet overrides */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .no-print, header, footer, .btn, button, input, .search-box, select {
        display: none !important;
    }
    .card {
        background: #ffffff !important;
        color: #000000 !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    .profile-grid {
        display: block !important;
    }
    .profile-sidebar {
        width: 100% !important;
        margin-bottom: 2rem !important;
    }
    .evidence-table th, .evidence-table td {
        border-color: #cbd5e1 !important;
        color: #000000 !important;
    }
    h1, h2, h3, h4, span, p, div {
        color: #000000 !important;
    }
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}


