:root {
    --bg-primary: #0a0b0d;
    --bg-secondary: #141519;
    --bg-tertiary: #1c1d22;
    --bg-card: #1e1f26;
    --border-color: #2a2b32;
    --text-primary: #e8e9ed;
    --text-secondary: #a0a1a7;
    --text-muted: #6b6c72;
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: rgba(59, 130, 246, 0.1);
    --compliant: #10b981;
    --partial: #f59e0b;
    --non-compliant: #ef4444;
    --not-assessed: #6b7280;
    --critical: #dc2626;
    --high: #ea580c;
    --medium: #d97706;
    --low: #65a30d;
}

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

body {
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.03"/></svg>');
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

/* Navigation */
.navbar {
    background: rgba(20, 21, 25, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* Burger Menu */
.burger-menu {
    position: relative;
}

.burger-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: all 0.3s;
    border-radius: 6px;
}

.burger-button:hover {
    background: var(--bg-card);
}

.burger-line {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
    border-radius: 2px;
}

.burger-button.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-button.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-button.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.menu-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.menu-item svg {
    flex-shrink: 0;
}

.menu-parent {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    cursor: default;
}

.menu-item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.menu-item-content:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.submenu-arrow {
    margin-left: auto;
    transition: transform 0.3s;
}

.menu-parent.active .submenu-arrow {
    transform: rotate(90deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--bg-secondary);
}

.menu-parent.active .submenu {
    max-height: 200px;
}

.submenu-item {
    display: block;
    padding: 0.75rem 1.25rem 0.75rem 3.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}

.submenu-item:last-child {
    border-bottom: none;
}

.submenu-item:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    padding-left: 3.75rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.nav-brand svg {
    color: var(--accent-primary);
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-back {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.btn-back {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
}

.btn-back:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 2;
}

.section {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Framework Grid */
.framework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.framework-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.framework-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), #8b5cf6);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.framework-card:hover::before {
    transform: scaleX(1);
}

.framework-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.framework-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.framework-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.framework-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.framework-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.meta-item svg {
    color: var(--accent-primary);
}

/* Assessment View */
.assessment-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.assessment-title {
    font-size: 2rem;
    font-weight: 700;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
}

.dashboard-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon.compliant {
    background: rgba(16, 185, 129, 0.1);
    color: var(--compliant);
}

.card-icon.partial {
    background: rgba(245, 158, 11, 0.1);
    color: var(--partial);
}

.card-icon.non-compliant {
    background: rgba(239, 68, 68, 0.1);
    color: var(--non-compliant);
}

.card-icon.not-assessed {
    background: rgba(107, 114, 128, 0.1);
    color: var(--not-assessed);
}

.card-content {
    flex: 1;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.card-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Progress Section */
.progress-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.progress-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.progress-percentage {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--accent-primary);
}

.progress-bar {
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), #8b5cf6);
    border-radius: 6px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Filters Section */
.filters-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-box svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Sora', sans-serif;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group select {
    padding: 0.875rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Sora', sans-serif;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 180px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* Category Sections */
.category-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.category-header {
    background: var(--bg-secondary);
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.category-header:hover {
    background: var(--bg-tertiary);
}

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-count {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.category-toggle {
    color: var(--text-muted);
    transition: transform 0.3s;
}

.category-toggle.open {
    transform: rotate(180deg);
}

.category-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.category-items.open {
    max-height: 5000px;
}

/* Item Cards */
.item-card {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.item-card:last-child {
    border-bottom: none;
}

.item-card:hover {
    background: var(--bg-tertiary);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.item-title-section {
    flex: 1;
}

.item-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.item-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.item-badges {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.status-badge, .priority-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.compliant {
    background: rgba(16, 185, 129, 0.1);
    color: var(--compliant);
}

.status-badge.partial {
    background: rgba(245, 158, 11, 0.1);
    color: var(--partial);
}

.status-badge.non-compliant {
    background: rgba(239, 68, 68, 0.1);
    color: var(--non-compliant);
}

.status-badge.not-assessed {
    background: rgba(107, 114, 128, 0.1);
    color: var(--not-assessed);
}

.priority-badge.critical {
    background: rgba(220, 38, 38, 0.1);
    color: var(--critical);
}

.priority-badge.high {
    background: rgba(234, 88, 12, 0.1);
    color: var(--high);
}

.priority-badge.medium {
    background: rgba(217, 119, 6, 0.1);
    color: var(--medium);
}

.priority-badge.low {
    background: rgba(101, 163, 13, 0.1);
    color: var(--low);
}

.item-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 11, 13, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Sora', sans-serif;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.info-section {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.info-section h4 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-section p {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.mappings-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mapping-tag {
    padding: 0.5rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

/* Export Options */
.export-options {
    display: grid;
    gap: 1rem;
}

.export-option {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: left;
}

.export-option:hover {
    border-color: var(--accent-primary);
    transform: translateX(8px);
}

.export-option svg {
    color: var(--accent-primary);
    flex-shrink: 0;
}

.export-option span {
    display: block;
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.export-option p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Import Area */
.import-area {
    padding: 2rem;
}

.import-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.import-label:hover {
    border-color: var(--accent-primary);
    background: var(--accent-light);
}

.import-label svg {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.import-label p {
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .framework-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .filters-section {
        flex-direction: column;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select {
        flex: 1;
        min-width: 0;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .menu-dropdown {
        left: 1rem;
        right: 1rem;
        min-width: auto;
    }
    
    .item-header {
        flex-direction: column;
    }
    
    .item-badges {
        align-self: flex-start;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
