/* =============================================
   Swimming Pool Maintenance Documentation
   Main Stylesheet
   ============================================= */

/* ----- CSS Variables ----- */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --sidebar-width: 280px;
    --header-height: 64px;
    --transition: all 0.3s ease;
}

/* ----- Reset & Base ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =============================================
   HEADER STYLES
   ============================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    color: var(--secondary);
}

.menu-toggle:hover {
    background: var(--light);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 480px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    background: var(--light);
    transition: var(--transition);
}

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

.search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-outline {
    background: white;
    border: 1px solid var(--border);
    color: var(--secondary);
}

.btn-outline:hover {
    background: var(--light);
    border-color: var(--primary);
    color: var(--primary);
}

/* =============================================
   SIDEBAR STYLES
   ============================================= */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: white;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    z-index: 900;
    transition: var(--transition);
}

.sidebar-section {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

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

.sidebar-title {
    padding: 8px 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary);
}

.nav-group {
    margin-bottom: 4px;
}

.nav-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-group-header:hover {
    background: var(--light);
}

.nav-group.active > .nav-group-header {
    background: var(--primary-light);
    border-left-color: var(--primary);
}

.nav-group-header span {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-group-header .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.nav-group-header .chevron {
    transition: var(--transition);
    color: var(--secondary);
}

.nav-group.open > .nav-group-header .chevron {
    transform: rotate(90deg);
}

.nav-items {
    display: none;
    padding: 4px 0;
}

.nav-group.open > .nav-items {
    display: block;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 8px 20px 8px 52px;
    font-size: 0.85rem;
    color: var(--secondary);
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--light);
    color: var(--dark);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 500;
}

/* =============================================
   MAIN CONTENT STYLES
   ============================================= */
.main {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 40px;
}

/* ----- Breadcrumb ----- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--secondary);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .current {
    color: var(--dark);
    font-weight: 500;
}

/* ----- Page Header ----- */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.page-header p {
    font-size: 1rem;
    color: var(--secondary);
}

.page-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--secondary);
}

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

/* ----- Sections ----- */
.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

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

/* =============================================
   CARD STYLES
   ============================================= */
.card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 .icon {
    font-size: 1.2rem;
}

.card-body {
    padding: 24px;
}

/* =============================================
   DIAGRAM STYLES
   ============================================= */
.diagram-container {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.diagram-container:hover {
    border-color: var(--primary);
}

.diagram-wrapper {
    overflow: hidden;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    max-height: 500px;
}

.diagram-wrapper img {
    max-width: 100%;
    max-height: 480px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.diagram-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.diagram-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--secondary);
    font-size: 1.1rem;
    font-weight: 600;
}

.diagram-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.diagram-btn:active {
    transform: scale(0.95);
}

.diagram-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.diagram-container:hover .diagram-hint {
    opacity: 1;
}

/* =============================================
   INFO BOX STYLES
   ============================================= */
.info-box {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
}

.info-box.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.info-box.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.info-box.warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.info-box .icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.info-box.info .icon {
    background: var(--primary);
    color: white;
}

.info-box.success .icon {
    background: var(--success);
    color: white;
}

.info-box.warning .icon {
    background: var(--warning);
    color: white;
}

.info-box-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.info-box-content p {
    font-size: 0.85rem;
    color: var(--secondary);
}

/* =============================================
   TABLE STYLES
   ============================================= */
.table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--light);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--secondary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--light);
}

td strong {
    color: var(--dark);
}

/* =============================================
   STEP LIST STYLES
   ============================================= */
.step-list {
    counter-reset: step;
}

.step-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

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

.step-number {
    counter-increment: step;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.step-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.step-content p {
    font-size: 0.85rem;
    color: var(--secondary);
}

.step-content .role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 8px;
}

.role-badge.sales { background: #dbeafe; color: #1d4ed8; }
.role-badge.accountant { background: #fef3c7; color: #b45309; }
.role-badge.manager { background: #f3e8ff; color: #7c3aed; }
.role-badge.worker { background: #d1fae5; color: #047857; }
.role-badge.inventory { background: #fef9c3; color: #a16207; }
.role-badge.system { background: #e0f2fe; color: #0369a1; }

/* =============================================
   PHASE CARDS STYLES
   ============================================= */
.phase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.phase-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    transition: var(--transition);
}

.phase-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.phase-card .phase-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.phase-card.phase-1 .phase-icon { background: #dbeafe; }
.phase-card.phase-2 .phase-icon { background: #fef3c7; }
.phase-card.phase-3 .phase-icon { background: #f3e8ff; }
.phase-card.phase-4 .phase-icon { background: #d1fae5; }

.phase-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

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

/* =============================================
   COLOR LEGEND STYLES
   ============================================= */
.color-legend {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--light);
    border-radius: 8px;
    font-size: 0.85rem;
}

.color-box {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    flex-shrink: 0;
}

/* ----- Implementation Legend ----- */
.impl-legend {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.impl-legend-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--light);
    border-radius: 12px;
}

.impl-color-box {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
}

.impl-legend-content {
    flex: 1;
}

.impl-legend-content strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--dark);
}

.impl-legend-content p {
    font-size: 0.875rem;
    color: var(--secondary);
    margin: 0;
}

/* =============================================
   OVERVIEW GRID STYLES
   ============================================= */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.overview-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.overview-card .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.overview-card .label {
    font-size: 0.85rem;
    color: var(--secondary);
    margin-top: 4px;
}

/* =============================================
   PROGRESS BAR STYLES
   ============================================= */
.progress-bar {
    position: fixed;
    top: var(--header-height);
    left: var(--sidebar-width);
    right: 0;
    height: 3px;
    background: var(--border);
    z-index: 100;
}

.progress-bar .progress {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* =============================================
   LANGUAGE SWITCHER STYLES
   ============================================= */
.lang-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dark);
    transition: var(--transition);
}

.lang-btn:hover {
    background: var(--light);
    border-color: var(--primary);
}

.lang-btn .flag {
    font-size: 1.1rem;
}

.lang-btn .chevron {
    margin-left: 4px;
    transition: transform 0.2s ease;
    color: var(--secondary);
}

.lang-switcher.open .lang-btn .chevron {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1100;
    overflow: hidden;
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
    color: var(--dark);
}

.lang-option:hover {
    background: var(--light);
}

.lang-option.active {
    background: var(--primary-light);
    color: var(--primary);
}

.lang-option .flag {
    font-size: 1.2rem;
}

.lang-option .lang-name {
    flex: 1;
    font-weight: 500;
}

.lang-option .check {
    color: var(--primary);
    opacity: 0;
}

.lang-option.active .check {
    opacity: 1;
}

/* =============================================
   FOOTER STYLES
   ============================================= */
.footer {
    margin-top: 48px;
    padding: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--secondary);
    font-size: 0.85rem;
}

/* =============================================
   RESPONSIVE STYLES
   ============================================= */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
    }

    .progress-bar {
        left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .content-wrapper {
        padding: 24px 20px;
    }
}

@media (max-width: 768px) {
    .header-center {
        display: none;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .phase-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   REVISED WORKFLOW STYLES (v2.0)
   Highlighting for new/changed steps
   ============================================= */

/* Status badges for revised workflow */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.new {
    background: #FF9800;
    color: #000;
}

.status-badge.changed {
    background: #FFC107;
    color: #000;
}

.status-badge.existing {
    background: #e3f2fd;
    color: #1976D2;
}

.status-badge.removed {
    background: #FFEBEE;
    color: #C62828;
}

/* Revised step items with color indicators */
.step-item.new-step {
    border-left: 4px solid #FF9800;
    background: linear-gradient(90deg, rgba(255,152,0,0.1) 0%, transparent 100%);
}

.step-item.changed-step {
    border-left: 4px solid #FFC107;
    background: linear-gradient(90deg, rgba(255,193,7,0.1) 0%, transparent 100%);
}

.step-item.existing-step {
    border-left: 4px solid #1976D2;
}

/* Step number styling for revised workflow */
.step-item.new-step .step-number {
    background: #FF9800;
    color: #000;
}

.step-item.changed-step .step-number {
    background: #FFC107;
    color: #000;
}

/* Revised workflow legend */
.revision-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
    background: var(--light);
    border-radius: 12px;
    margin-bottom: 24px;
}

.revision-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.revision-legend-item .indicator {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.revision-legend-item .indicator.new {
    background: #FF9800;
    color: #000;
}

.revision-legend-item .indicator.changed {
    background: #FFC107;
    color: #000;
}

.revision-legend-item .indicator.existing {
    background: #e3f2fd;
    color: #1976D2;
}

/* Phase cards for revised workflow */
.phase-card.phase-new {
    border: 2px solid #FF9800;
}

.phase-card.phase-new .phase-icon {
    background: #FFF3E0;
}

.phase-card.phase-changed .phase-icon {
    background: #FFF8E1;
}

/* Alert box for revision notes */
.revision-alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border: 1px solid #FF9800;
    border-radius: 12px;
    margin-bottom: 24px;
}

.revision-alert .icon {
    width: 40px;
    height: 40px;
    background: #FF9800;
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.revision-alert .content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #E65100;
}

.revision-alert .content p {
    font-size: 0.9rem;
    color: #BF360C;
}

/* Role cards with new indicator */
.role-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
}

.role-card.new-role {
    border: 2px solid #FF9800;
}

.role-card.new-role::before {
    content: 'NEW';
    position: absolute;
    top: -10px;
    right: 16px;
    background: #FF9800;
    color: #000;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.role-card.changed-role {
    border: 2px solid #FFC107;
}

.role-card.changed-role::before {
    content: 'UPDATED';
    position: absolute;
    top: -10px;
    right: 16px;
    background: #FFC107;
    color: #000;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Role grid layout */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.role-card .role-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.role-card .role-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.role-card .role-arabic {
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 12px;
}

.role-card .role-tasks {
    list-style: none;
    padding: 0;
    margin: 0;
}

.role-card .role-tasks li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.role-card .role-tasks li:last-child {
    border-bottom: none;
}

.role-card .role-tasks li::before {
    content: '→';
    color: var(--primary);
}

/* Comparison table styling */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    background: var(--dark);
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}

.comparison-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.comparison-table tr:hover td {
    background: var(--light);
}

.comparison-table .old-way {
    background: #FFEBEE;
}

.comparison-table .new-way {
    background: #E8F5E9;
}

@media print {
    /* Hide non-printable elements */
    .sidebar,
    .header,
    .progress-bar,
    .diagram-controls,
    .diagram-hint,
    .modal-overlay,
    .lang-switcher {
        display: none !important;
    }

    /* Reset body and main layout */
    body {
        background: white !important;
    }

    .main {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        padding: 20px !important;
        width: 100% !important;
    }

    /* Show all sections for printing */
    .section {
        display: block !important;
        page-break-inside: avoid;
        margin-bottom: 30px;
    }

    /* Cards print styling */
    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        margin-bottom: 20px;
    }

    /* Diagram print styling */
    .diagram-container {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ddd !important;
        background: white !important;
    }

    .diagram-wrapper {
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .diagram-wrapper img {
        max-width: 100% !important;
        max-height: none !important;
        height: auto !important;
    }

    /* Step list print styling */
    .step-item {
        break-inside: avoid;
    }

    /* Info box print styling */
    .info-box {
        break-inside: avoid;
        background: #f5f5f5 !important;
    }

    /* Breadcrumb hide in print */
    .breadcrumb {
        display: none !important;
    }

    /* Page meta hide in print */
    .page-meta {
        display: none !important;
    }

    /* Footer print styling */
    .footer {
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid #ddd;
    }

    /* Ensure proper page breaks */
    h1, h2, h3, h4 {
        page-break-after: avoid;
    }

    /* Tables */
    table {
        break-inside: avoid;
    }

    /* Links - don't show URL in print */
    a[href]:after {
        content: none !important;
    }
}
