@import '../shared/document.css';

/* ============================================================
   ENGINEERING TITLE BLOCK & NIMIÖ (Unified Standard)
   ============================================================ */
.engineering-title-block,
.title-block-card {
    background: #ffffff;
    border: 2px solid #0f172a;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    box-sizing: border-box;
    margin-bottom: 0;
}

.engineering-title-block .title-block-main,
.title-block-card .title-block-main {
    padding: 10px 14px 8px 14px;
    border-bottom: 1.5px solid #0f172a;
    margin: 0;
    box-sizing: border-box;
}

.engineering-title-block.is-minimized,
.title-block-card.is-minimized {
    margin-bottom: 12px;
}

.engineering-title-block.is-minimized .title-block-main,
.title-block-card.is-minimized .title-block-main {
    border-bottom: none !important;
}

.engineering-title-block.is-minimized .title-block-grid,
.title-block-card.is-minimized .title-block-grid {
    display: none !important;
}

.engineering-title-block .title-block-grid,
.title-block-card .title-block-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-sizing: border-box;
}

.engineering-title-block .title-block-cell,
.title-block-card .title-block-cell {
    padding: 6px 10px;
    border-right: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
    background: #ffffff;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.engineering-title-block .title-block-cell:nth-child(4n),
.title-block-card .title-block-cell:nth-child(4n) {
    border-right: none;
}

.engineering-title-block .title-block-cell:nth-last-child(-n+4),
.title-block-card .title-block-cell:nth-last-child(-n+4) {
    border-bottom: none;
}

/* ============================================================
   RC COLUMN DESIGN SUITE SPECIFIC STYLING
   ============================================================ */

/* Section & Elevation Visualizer Cards */
.section-visualizer-card {
    background: #fdfdfc;
    border: 1px solid var(--color-border);
    padding: var(--sp-md);
    margin-bottom: var(--sp-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.visualizer-title {
    font-family: var(--font-serif);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: var(--sp-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 100%;
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: 4px;
}

.svg-container {
    width: 100%;
    max-width: 440px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svg-container--wide {
    max-width: 600px;
    height: 480px;
}

.svg-container--chart {
    max-width: 620px;
    height: 340px;
}

.svg-container--elevation {
    max-width: 580px;
    height: 380px;
}

.drawings-grid .svg-container {
    max-width: 100%;
    height: 330px;
}

.drawings-grid .svg-container--elevation {
    max-width: 100%;
    height: 330px;
}

.drawings-grid .svg-container--chart {
    max-width: 100%;
    height: 330px;
}

.svg-container svg {
    width: 100%;
    height: 100%;
}

/* Rebar & Stirrup / Tie Selection Tables */
.rebar-selection-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-top: var(--sp-sm);
    border: 1px solid var(--color-border);
}

.rebar-selection-table th {
    background: #f5f4f0;
    padding: 6px 10px;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--color-border);
    border-right: 1px solid var(--color-border-light);
    text-align: center;
}

.rebar-selection-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--color-border-light);
    border-right: 1px solid var(--color-border-light);
    text-align: center;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: background 0.15s;
}

.rebar-selection-table tr:hover td {
    background: var(--color-accent-light);
}

.rebar-selection-table tr.selected td {
    background: #e1edf8;
    font-weight: 700;
    color: var(--color-accent);
}

.rebar-badge-pass {
    display: inline-block;
    padding: 2px 6px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 2px;
}

.rebar-badge-fail {
    display: inline-block;
    padding: 2px 6px;
    background: #ffebee;
    color: #c62828;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 2px;
}

.rebar-badge-warn {
    display: inline-block;
    padding: 2px 6px;
    background: #fff8e1;
    color: #e65100;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 2px;
}

/* Utilization ratio gauge bar */
.utilization-wrapper {
    margin: var(--sp-md) 0;
}

.utilization-bar-container {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--color-border);
}

.utilization-bar-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease-out, background-color 0.3s;
    background-color: var(--color-success);
}

.utilization-bar-fill.warning {
    background-color: var(--color-warning);
}

.utilization-bar-fill.danger {
    background-color: var(--color-error);
}

.utilization-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--color-text-secondary);
    margin-top: 4px;
    font-family: var(--font-mono);
}

/* Multi-drawing grid on Summary Tab */
.drawings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
}

.drawings-grid--single {
    grid-template-columns: 1fr;
}

@media (max-width: 768px) {
    .drawings-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   PERSISTENT TOP VERDICT SCORECARD & GAUGES
   ============================================================ */
.column-verdict-scorecard {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: var(--sp-sm) var(--sp-md);
    margin-bottom: var(--sp-md);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.scorecard-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--color-border-light);
    padding-right: var(--sp-sm);
}

.scorecard-item:last-child {
    border-right: none;
    padding-right: 0;
}

.scorecard-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    font-family: var(--font-sans);
    margin-bottom: 2px;
}

.scorecard-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-heading);
}

.scorecard-subtext {
    font-size: 0.7rem;
    font-weight: 500;
    font-family: var(--font-sans);
    color: var(--color-text-secondary);
}

.score-subtext--pass {
    color: var(--color-success);
    font-weight: 600;
}

.score-subtext--warn {
    color: var(--color-warning);
    font-weight: 600;
}

.score-subtext--fail {
    color: var(--color-error);
    font-weight: 600;
}

.status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    font-family: var(--font-sans);
}

.status-pill--pass {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status-pill--fail {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Axial Stress Ratio Gauge */
.axial-stress-gauge-card {
    background: #fbfbfa;
    border: 1px solid var(--color-border-light);
    border-radius: 4px;
    padding: var(--sp-sm);
    margin-top: var(--sp-sm);
}

.gauge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    margin-bottom: 4px;
}

.gauge-title {
    color: var(--color-text-secondary);
    font-family: var(--font-sans);
}

.gauge-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-heading);
}

.gauge-bar-track {
    width: 100%;
    height: 6px;
    background: #e0ded8;
    border-radius: 3px;
    overflow: hidden;
}

.gauge-bar-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s;
    background-color: var(--color-success);
}

.gauge-bar-fill.warning {
    background-color: var(--color-warning);
}

.gauge-bar-fill.danger {
    background-color: var(--color-error);
}

.gauge-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    margin-top: 4px;
    color: var(--color-text-secondary);
}

.gauge-desc {
    font-weight: 600;
}

@media (max-width: 900px) {
    .column-verdict-scorecard {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 500px) {
    .column-verdict-scorecard {
        grid-template-columns: 1fr;
    }
}

/* Compact Hero Card for Column Slenderness / Actions */
.result-hero--compact {
    padding: var(--sp-md) var(--sp-lg);
    margin-bottom: var(--sp-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    gap: var(--sp-md);
    background: var(--color-surface-offset);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.result-hero--compact .result-hero-main {
    display: flex;
    flex-direction: column;
}

.result-hero--compact .result-hero-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 2px;
}

.result-hero--compact .result-hero-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-primary);
}

.result-hero--compact .result-hero-unit {
    font-size: 0.72rem;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

.result-hero--compact .result-hero-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.result-hero--compact .result-hero-sublabel {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-secondary);
    font-weight: 600;
    margin-bottom: 4px;
}

.result-hero--compact .result-hero-subvalue {
    font-size: 0.85rem;
    font-weight: 700;
}

@media (max-width: 600px) {
    .result-hero--compact {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .result-hero--compact .result-hero-meta {
        align-items: flex-start;
        text-align: left;
        margin-top: var(--sp-xs);
    }
}



/* ============================================================
   RC COLUMN DESIGN SUITE — STUDIO WORKSPACE & A4 SHEET STYLES
   Standardized Studio Command Dock, Member Drawer & A4 Sheet
   ============================================================ */

/* --- Workspace Wrapper (Centered Studio for Desktop) --- */
.workspace-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 16px;
    min-height: 100vh;
    box-sizing: border-box;
}

/* --- Left Sidebar Dock (Left-Hand Scrollbar) --- */
.app-sidebar-dock {
    width: 440px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--sp-md);
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    flex-shrink: 0;
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    z-index: 10;
    box-sizing: border-box;
    margin-bottom: 16px;

    /* Move scrollbar to the left for clean visual boundary */
    direction: rtl;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
}

.app-sidebar-dock > * {
    direction: ltr; /* Reset children to standard LTR text */
}

.app-sidebar-dock::-webkit-scrollbar {
    width: 5px;
}
.app-sidebar-dock::-webkit-scrollbar-track {
    background: transparent;
}
.app-sidebar-dock::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}
.app-sidebar-dock:hover::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.30);
}

/* --- Dock Sections & Elements --- */
.dock-section {
    background: #fafaf8;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    padding: var(--sp-sm) var(--sp-md);
    transition: all 0.15s ease;
}

.dock-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--sp-xs);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dock-section-title.collapsible {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.dock-section-title.collapsible:hover {
    color: var(--color-accent, #0055a3);
}

.dock-section .collapse-icon {
    font-size: 0.70rem;
    color: var(--color-text-secondary);
    transition: transform 0.2s ease;
    display: inline-block;
    line-height: 1;
}

.dock-section.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.dock-section.collapsed {
    padding-bottom: var(--sp-xs);
}

.dock-section.collapsed .dock-section-title {
    margin-bottom: 0;
}

.dock-section.collapsed .dock-section-body {
    display: none;
}

.dock-section-title .badge-tag {
    font-size: 0.68rem;
    padding: 2px 6px;
    background: #e2e8f0;
    color: #334155;
    border-radius: 3px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
}

/* Input Fields inside Dock */
.dock-meta-field {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 3px;
    margin-bottom: 6px;
    height: 100%;
}

.dock-meta-field label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    line-height: 1.25;
}

.dock-meta-field label .unit {
    font-family: var(--font-mono);
    color: var(--color-text-muted);
    font-size: 0.70rem;
    flex-shrink: 0;
    margin-left: 4px;
}

.dock-meta-field input,
.dock-meta-field select {
    width: 100%;
    margin-top: auto;
    padding: 5px 8px;
    font-size: 0.82rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: #ffffff;
    color: var(--color-heading);
    box-sizing: border-box;
}

.dock-meta-field input:focus,
.dock-meta-field select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-accent-light);
}

.dock-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 6px;
}

.dock-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-bottom: 6px;
}

/* Preset Selector Dropdown */
.dock-preset-select {
    width: 100%;
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid var(--color-accent);
    border-radius: 4px;
    background: var(--color-accent-bg);
    color: var(--color-accent);
    cursor: pointer;
    margin-bottom: 8px;
}

/* --- Utilization HUD / Scorecard in Left Dock --- */
.dock-hud-card {
    background: #ffffff;
    border: 1.5px solid var(--color-border);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 6px;
}

.hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--color-border-light);
}

.hud-title {
    font-size: 0.80rem;
    font-weight: 700;
    color: var(--color-heading);
    text-transform: uppercase;
}

.hud-verdict-pill {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.74rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.hud-verdict-pill.pass {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.hud-verdict-pill.fail {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.hud-meter-row {
    margin-bottom: 6px;
}

.hud-meter-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    margin-bottom: 2px;
}

.hud-meter-name {
    font-weight: 600;
    color: var(--color-heading);
}

.hud-meter-val {
    font-family: var(--font-mono);
    font-weight: 700;
}

.hud-progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.hud-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.hud-progress-fill.safe {
    background: #2e7d32;
}
.hud-progress-fill.warning {
    background: #e65100;
}
.hud-progress-fill.danger {
    background: #c62828;
}

/* --- Right Side Main Workspace --- */
.app-main-workspace {
    flex: 1;
    min-width: 0;
    max-width: 1020px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Attached Hub Nav Bar */
.app-main-workspace .top-hub-nav {
    width: 100%;
    background: #e9e6df;
    border: 1px solid var(--color-border);
    border-top: none;
    border-bottom: 1px solid var(--color-border);
    padding: 8px 16px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Attached Export Bar */
.app-main-workspace .doc-actions-bar {
    width: 100%;
    background: #fcfbfa;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    border-top: none;
    border-bottom: 1px solid var(--color-border-light);
    padding: 8px 16px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-md);
    flex-wrap: wrap;
}

/* Attached Tab Nav */
.app-main-workspace .tab-nav {
    width: 100%;
    box-sizing: border-box;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
}

/* --- True A4 Printable Document Sheet --- */
.app-main-workspace .page-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: #fafaf8;
    border: 1px solid var(--color-border);
    border-top: none;
    box-shadow: 0 4px 16px var(--color-paper-shadow);
    padding: 24px 32px;
    box-sizing: border-box;
}

/* Nav Actions & Member Drawer Styles */
.btn-toggle-drawer {
    background: var(--color-accent, #0055a3);
    color: #ffffff;
    border: 1px solid rgba(0,0,0,0.15);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.15s;
}
.btn-toggle-drawer:hover {
    background: #004482;
    transform: translateY(-1px);
}

.active-member-indicator {
    background: #ffffff;
    border: 1px solid var(--color-border);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--color-heading);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.active-member-indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2e7d32;
}

/* Collapsible Right-Side Member Drawer */
.member-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 330px;
    background: #ffffff;
    border-left: 1px solid var(--color-border);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1050;
}

.member-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    background: #f7f6f3;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-heading-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.drawer-heading {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.drawer-subheading {
    font-size: 0.70rem;
    color: var(--color-text-secondary);
}

.btn-drawer-close {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.btn-drawer-close:hover {
    background: #e9e6df;
    color: var(--color-heading);
}

.drawer-toolbar {
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-border-light);
    background: #fafaf8;
    display: flex;
    gap: 6px;
}

.btn-drawer-action {
    background: #ffffff;
    border: 1px solid var(--color-border);
    color: var(--color-heading);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s, border-color 0.15s;
}
.btn-drawer-action:hover {
    background: #f0ede8;
    border-color: var(--color-accent);
}
.btn-drawer-action--primary {
    background: var(--color-accent-bg, #e8f0fa);
    border-color: var(--color-accent-border, #bcd3ed);
    color: var(--color-accent, #0055a3);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-card {
    background: #fafaf8;
    border: 1px solid var(--color-border-light);
    border-radius: 5px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}
.drawer-card:hover {
    border-color: var(--color-accent);
    background: #f4f7fb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.drawer-card.active {
    background: #eef4fc;
    border-color: var(--color-accent);
    border-left: 4px solid var(--color-accent);
    box-shadow: 0 2px 8px rgba(0, 85, 163, 0.08);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-tag {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-heading);
}

.card-pill {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
}
.pill-pass {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}
.pill-fail {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.card-details {
    font-size: 0.70rem;
    color: var(--color-text-secondary);
    font-family: var(--font-mono);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.drawer-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--color-border);
    background: #f7f6f3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.74rem;
    color: var(--color-text-secondary);
}

/* Bottom Simulation Bar */
.test-sim-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a2744;
    color: #ffffff;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
}
.sim-btn-group {
    display: flex;
    gap: 8px;
}
.btn-sim {
    background: #2a3d66;
    color: #fff;
    border: 1px solid #3d568c;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.72rem;
    cursor: pointer;
}
.btn-sim:hover {
    background: #0055a3;
}

/* Adjust page-container margin so simulation bar doesn't cover footer */
.app-main-workspace .page-container {
    margin-bottom: 60px !important;
}

/* ============================================================
   STRICT PRINT STYLING (A4 SHEET ONLY)
   ============================================================ */
@media print {
    /* Hide all workspace non-printable chrome */
    .app-sidebar-dock,
    .top-hub-nav,
    .doc-actions-bar,
    .tab-nav,
    .btn-calculate,
    .member-drawer,
    .test-sim-bar,
    .print-hide {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .workspace-wrapper {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .app-main-workspace {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .app-main-workspace .page-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: #ffffff !important;
    }

    .calc-step,
    .section-visualizer-card {
        box-shadow: none !important;
        border: 1px solid #bbb !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* Print mode handling: full document vs active tab only */
    body:not(.print-active-tab-only) .tab-panel {
        display: block !important;
    }

    body.print-active-tab-only .tab-panel.active {
        display: block !important;
    }

    body.print-active-tab-only .tab-panel:not(.active) {
        display: none !important;
    }

    /* Always expand collapsible step bodies during print */
    .calc-step .step-body {
        display: block !important;
    }

    /* Clean Title Block inputs on print */
    .title-block-input,
    input.title-block-input {
        border: none !important;
        background: transparent !important;
        color: #000000 !important;
        box-shadow: none !important;
        font-weight: 600 !important;
        padding: 0 !important;
        margin: 0 !important;
        outline: none !important;
    }

    /* Publication-grade Column Properties & Reinforcement Summary Card */
    .column-properties-summary-card {
        background: #f8fafc !important;
        border: 1.5px solid #334155 !important;
        border-radius: 4px !important;
        padding: 10px 14px !important;
        margin-bottom: 14px !important;
        page-break-inside: avoid;
        break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .column-properties-summary-card strong {
        color: #0f172a !important;
    }

    .column-properties-summary-card .scorecard-pill {
        border: 1px solid #0f172a !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Print-optimized Load Breakdown Table */
    .load-breakdown-table {
        width: 100% !important;
        border: 1px solid #64748b !important;
        border-collapse: collapse !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .load-breakdown-table th {
        background: #f1f5f9 !important;
        color: #0f172a !important;
        border: 1px solid #94a3b8 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .load-breakdown-table td {
        border: 1px solid #cbd5e1 !important;
        color: #1e293b !important;
    }

    .load-breakdown-table .row-total {
        background: #e2e8f0 !important;
        color: #0f172a !important;
        border-top: 2px solid #475569 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Print Rebar Table: Only display chosen reinforcement row, hide candidates & radio buttons */
    #col-rebar-table th:first-child,
    #col-rebar-table td:first-child {
        display: none !important;
    }

    #col-rebar-tbody tr:not(.selected) {
        display: none !important;
    }

    #col-rebar-tbody tr.selected {
        background: #f8fafc !important;
        font-weight: 600 !important;
    }

    #col-rebar-tbody tr.selected td {
        border: 1.5px solid #475569 !important;
        padding: 8px 10px !important;
    }

    /* Selective section print omissions */
    body.print-omit-signoff #print-signoff-block { display: none !important; }
    .front-page-collapsible-content {
        display: block !important;
    }
    .btn-minimize-front {
        display: none !important;
    }
    body.print-omit-loads #print-sec-load-breakdown { display: none !important; }
    body.print-omit-slender #panel-slenderness { display: none !important; }
    body.print-omit-elevation #col-slenderness-visualizer-card { display: none !important; }
    body.print-omit-resistance #panel-resistance { display: none !important; }
    body.print-omit-section-svg #sec-col-drawings-card { display: none !important; }
    body.print-omit-detailing #panel-detailing { display: none !important; }
    body.print-omit-matrix #panel-summary { display: none !important; }

    .print-page-break {
        page-break-before: always !important;
        break-before: page !important;
    }
}

/* ============================================================
   FRONT PAGE COLLAPSIBLE & TITLE BLOCK MINIMIZATION
   ============================================================ */
.front-page-collapsible-content {
    transition: opacity 0.2s ease, max-height 0.2s ease;
}

.front-page-collapsible-content.minimized {
    display: none !important;
}

.btn-minimize-front {
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-minimize-front:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* ============================================================
   COLUMN MEMBER DRAWER & TOP NAV EXTENSIONS (v2.2.0)
   ============================================================ */

/* Top Navigation Controls */

.top-hub-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.suite-badge {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--color-heading);
    background: #f0f4fa;
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid var(--color-accent-border);
    white-space: nowrap;
}

.std-ref {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    white-space: nowrap;
}

.std-ref--na {
    background: #fef9c3;
    color: #854d0e;
    border-color: #fde047;
    white-space: nowrap;
}

.active-member-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.active-member-indicator .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2e7d32;
    animation: pulse-dot 2s infinite;
}

.btn-toggle-drawer {
    background: var(--color-accent-bg, #e8f0fa);
    border: 1px solid var(--color-accent-border, #bcd3ed);
    color: var(--color-accent, #0055a3);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}
.btn-toggle-drawer:hover {
    background: var(--color-accent, #0055a3);
    color: #ffffff;
}

/* ============================================================
   COLLAPSIBLE COLUMN MEMBER DRAWER
   ============================================================ */
.col-member-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 340px;
    max-width: 90vw;
    background: #ffffff;
    border-left: 1px solid var(--color-border);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1050;
}
.col-member-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    background: #f7f6f3;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-heading-block {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.drawer-heading {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-heading);
    display: flex;
    align-items: center;
    gap: 6px;
}

.drawer-subheading {
    font-size: 0.72rem;
    color: var(--color-text-secondary);
}

.btn-drawer-close {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.15s;
}
.btn-drawer-close:hover {
    background: #e9e6df;
    color: var(--color-heading);
}

.drawer-toolbar {
    padding: 8px 12px;
    background: #fafaf8;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    gap: 6px;
}

.btn-drawer-action {
    background: #ffffff;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.12s;
}
.btn-drawer-action:hover {
    background: #f0ede8;
    border-color: var(--color-accent);
}
.btn-drawer-action--primary {
    background: var(--color-accent-bg, #e8f0fa);
    border-color: var(--color-accent-border, #bcd3ed);
    color: var(--color-accent, #0055a3);
}
.btn-drawer-action--primary:hover {
    background: var(--color-accent, #0055a3);
    color: #ffffff;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-card {
    background: #fafaf8;
    border: 1px solid var(--color-border-light);
    border-radius: 5px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
}
.drawer-card:hover {
    border-color: var(--color-accent);
    background: #f4f7fb;
    transform: translateY(-1px);
}
.drawer-card.active {
    background: #f0f7ff;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-accent-border);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-tag {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--color-heading);
}
.card-pill {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
}
.pill-pass { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.pill-fail { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.pill-stale { background: #fff8e1; color: #b78103; border: 1px solid #ffe082; }

.card-details {
    font-size: 0.74rem;
    color: #4b5563;
    font-family: var(--font-mono);
    line-height: 1.35;
    background: #f3f1ec;
    padding: 3px 6px;
    border-radius: 3px;
    margin: 2px 0;
    display: flex;
    justify-content: space-between;
    gap: 4px;
}

.drawer-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--color-border);
    background: #f7f6f3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

/* ============================================================
   PRINT CONFIGURATOR MODAL & WIREFRAME PREVIEW
   ============================================================ */
.modal-print-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.22);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.print-modal-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
    padding: 16px;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .print-modal-grid {
        grid-template-columns: 1fr;
    }
}

.btn-print-preset {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #334155;
}

.btn-print-preset:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.btn-print-preset.active {
    background: #0284c7;
    border-color: #0369a1;
    color: #ffffff;
}

.print-sections-checklist {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 8px 12px;
}

.print-check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 2px 0;
}

.print-check-row input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* Live Wireframe Preview Panel */
.print-modal-preview {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.print-preview-wireframe {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 380px;
    padding-right: 4px;
}

.preview-page-sheet {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    font-size: 0.70rem;
}

.preview-sheet-header {
    border-bottom: 1.5px solid #0284c7;
    padding-bottom: 4px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: #0f172a;
}

.preview-sheet-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 2px;
}

.preview-section-item {
    background: #f8fafc;
    border-left: 3px solid #0284c7;
    padding: 4px 6px;
    margin-bottom: 4px;
    border-radius: 2px;
    font-size: 0.68rem;
    color: #334155;
    display: flex;
    justify-content: space-between;
}

/* Kuormituserittely Table Styling */
.load-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    margin-top: 6px;
}

.load-breakdown-table th {
    background: #f1f5f9;
    color: #1e293b;
    font-weight: 700;
    text-align: left;
    padding: 5px 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.72rem;
    text-transform: uppercase;
}

.load-breakdown-table td {
    padding: 5px 8px;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.load-breakdown-table tr:nth-child(even) {
    background: #f8fafc;
}

.load-breakdown-table .row-total {
    background: #e0f2fe !important;
    font-weight: 700;
    color: #0369a1;
    border-top: 2px solid #0284c7;
}

.load-breakdown-table .num {
    text-align: right;
    font-family: var(--font-mono);
}

/* Suite Badge Spacing Standard */
.suite-badge {
    margin-left: 10px;
}

/* Dock & Drawer Member Locking Standard */
.dock-locked-banner {
    display: none;
    align-items: center;
    gap: 6px;
    background: #fff8e6;
    border: 1px solid #ffe082;
    padding: 7px 10px;
    border-radius: 4px;
    margin-top: 8px;
    font-size: 0.74rem;
    color: #856404;
    font-weight: 600;
}

.dock-is-locked {
    border-left: 4px solid #f59e0b !important;
}

.card-lock-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 4px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    line-height: 1;
}

.card-lock-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.card-pill.locked {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    font-weight: 700;
}


