:root {
    --primary-red: #dc2626;
    --secondary-red: #ef4444;
    --accent-red: #f87171;
    --warning-red: #b91c1c;
    --success-green: #10b981;
    --neutral-gray: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;

    --primary-gradient: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    --secondary-gradient: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    --warning-gradient: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: #fbf9f8;
    min-height: 100vh;
    color: var(--mocha-dark);
    line-height: 1.6;
}

/* Professional Components with Red Theme */
.professional-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(164, 119, 100, 0.08);
    border: 1px solid var(--border-soft);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.professional-card:hover {
    box-shadow: 0 8px 30px rgba(164, 119, 100, 0.12);
    transform: translateY(-4px);
}

.tab-btn {
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 12px 12px 0 0;
    border: 1px solid var(--border-soft);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    background: #f4efed;
    color: var(--neutral-gray);
    margin-left: 2px;
}

.tab-btn.active {
    background: white;
    border-bottom-color: transparent;
    color: var(--mocha-main);
    font-weight: 700;
    box-shadow: 0 -4px 10px rgba(164, 119, 100, 0.05);
    border-top: 4px solid var(--mocha-main);
}

.tab-content {
    display: none;
    padding: 2.5rem;
    border: 1px solid var(--border-soft);
    border-radius: 0 0 16px 16px;
    background: white;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(164, 119, 100, 0.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content.active {
    display: block;
}

/* Impact Nodes */
.impact-node {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin: 0.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid;
}

.impact-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.15);
}

.rel-prerequisite {
    background: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
}

.rel-sequence {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.rel-depends {
    background: #dcfce7;
    color: #166534;
    border-color: #10b981;
}

.rel-supports {
    background: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
}

/* Draft Banner */
.draft-banner {
    background: var(--mocha-gradient);
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    border-bottom: 3px solid var(--mocha-dark);
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 4px 15px rgba(164, 119, 100, 0.3);
}

/* Path Steps */
.path-step {
    display: inline-flex;
    align-items: center;
    background: var(--mocha-light);
    color: var(--mocha-dark);
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-weight: 700;
    margin: 0.25rem;
    transition: all 0.2s ease;
    border: 2px solid var(--mocha-main);
}

.path-step:hover {
    background: #e2d3cd;
}

.path-step::before {
    content: "←";
    margin-left: 0.5rem;
    font-weight: 700;
    opacity: 0.7;
}

.path-step:first-child::before {
    content: "";
    margin-left: 0;
}

/* Control Badge */
.control-badge {
    display: inline-flex;
    align-items: center;
    background: var(--mocha-light);
    color: var(--mocha-main);
    padding: 0.25rem 0.85rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.875rem;
    border: 2px solid var(--mocha-main);
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--border-soft);
    background: white;
    color: var(--neutral-gray);
}

.filter-btn.active {
    background: var(--mocha-main);
    color: white;
    border-color: var(--mocha-main);
    box-shadow: 0 4px 10px rgba(164, 119, 100, 0.2);
}

/* Benefit Cards */
.benefit-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    border: 3px solid var(--mocha-main);
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(164, 119, 100, 0.15);
}

/* Section Introduction */
.section-intro {
    background: var(--mocha-light);
    border-radius: 16px;
    padding: 2.25rem;
    border-right: 5px solid var(--mocha-main);
    margin-bottom: 2.5rem;
}

/* Signature Section */
.signature-section {
    background: var(--mocha-light);
    border-radius: 16px;
    padding: 2.5rem;
    border-top: 4px solid var(--mocha-main);
}

.signature-line {
    font-family: 'Tajawal', sans-serif;
    color: var(--mocha-main);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: left;
    padding-top: 1.25rem;
    border-top: 2px solid var(--mocha-main);
    display: inline-block;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-soft);
    border-top: 4px solid var(--mocha-main);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 350px;
    background-color: #374151;
    color: white;
    text-align: right;
    border-radius: 6px;
    padding: 0.75rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    right: 50%;
    margin-right: -175px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
    font-weight: normal;
    line-height: 1.4;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Definition Card */
.definition-card {
    background: var(--mocha-light);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 0.75rem 0;
    border-right: 4px solid var(--mocha-main);
}

.definition-title {
    color: var(--mocha-dark);
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.definition-desc {
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .professional-card {
        margin: 0.5rem;
        padding: 1rem;
    }

    .section-intro {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    .draft-banner {
        display: none !important;
    }
}

/* Custom Scrollbar */
::webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::webkit-scrollbar-track {
    background: var(--mocha-light);
    border-radius: 5px;
}

::webkit-scrollbar-thumb {
    background: var(--mocha-main);
    border-radius: 5px;
}

::webkit-scrollbar-thumb:hover {
    background: var(--mocha-dark);
}

.fullscreen-mode {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0 !important;
    background-color: white !important;
    margin: 0 !important;
}

/* Maturity Assessment Styling */
.professional-card {
    border-radius: 0.5rem;
    overflow: hidden;
    background: white;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.professional-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Fullscreen New Window */
/* Adjustments handled in JS opening logic */