*{margin:0;padding:0;box-sizing:border-box;}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;line-height:1.6;color:#333;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);min-height:100vh;}
.container{max-width:1500px;margin:0 auto;padding:20px;}

/* Header */
header{text-align:center;color:white;padding:40px 20px;margin-bottom:40px;}
header h1{font-size:3rem;margin-bottom:10px;text-shadow:2px 2px 4px rgba(0,0,0,.2);}
.subtitle{font-size:1.2rem;opacity:.9;}

/* Main card */
main{background:white;border-radius:20px;padding:40px;box-shadow:0 20px 60px rgba(0,0,0,.3);}
section{margin-bottom:50px;}
section h2{color:#667eea;margin-bottom:25px;font-size:2rem;border-bottom:3px solid #667eea;padding-bottom:10px;}

/* Upload */
.upload-container-single{display:flex;justify-content:center;margin-bottom:30px;}
.upload-box-large{border:2px dashed #667eea;border-radius:15px;padding:40px;text-align:center;transition:all .3s;width:100%;max-width:600px;}
.upload-box-large:hover{border-color:#764ba2;background:#f8f9ff;}
.upload-box-large.drag-active{border-color:#764ba2;border-style:solid;background:#f0f0ff;box-shadow:0 0 0 4px rgba(118,75,162,.18);transform:scale(1.01);}
.drop-hint{font-size:.82rem;color:#9ca3af;margin-top:8px;margin-bottom:0;}
.upload-box-large h3{color:#667eea;margin-bottom:20px;font-size:1.3rem;}
.upload-box-large input[type="file"]{display:none;}
.file-label{display:inline-block;padding:15px 30px;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:white;border-radius:10px;cursor:pointer;font-weight:600;transition:transform .2s;}
.file-label:hover{transform:translateY(-2px);box-shadow:0 5px 15px rgba(102,126,234,.4);}
.file-icon{font-size:1.5rem;margin-right:10px;}
.file-name{margin-top:15px;color:#666;font-size:.9rem;}

/* Buttons */
.btn-primary,.btn-secondary{padding:15px 40px;border:none;border-radius:10px;font-size:1.1rem;font-weight:600;cursor:pointer;transition:all .3s;}
.btn-primary{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:white;display:block;margin:0 auto;}
.btn-primary:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 10px 25px rgba(102,126,234,.4);}
.btn-primary:disabled{opacity:.5;cursor:not-allowed;}
.btn-secondary{background:white;color:#667eea;border:2px solid #667eea;margin:10px;}
.btn-secondary:hover{background:#667eea;color:white;}

/* Progress */
#progress-container{margin-top:30px;}
.progress-bar{width:100%;height:30px;background:#e0e0e0;border-radius:15px;overflow:hidden;margin-bottom:10px;}
.progress-fill{height:100%;background:linear-gradient(90deg,#667eea 0%,#764ba2 100%);width:0%;transition:width .3s;}
#progress-text{text-align:center;color:#666;font-weight:600;}

/* ── REJECTION BANNER ──────────────────────────────────────────────── */
.rejection-banner{
    border-radius:14px;padding:0;margin-bottom:32px;
    background:linear-gradient(135deg,#ff4757,#c0392b);
    box-shadow:0 6px 30px rgba(192,57,43,.35);
    overflow:hidden;
    animation:rejection-pulse 2s ease-in-out 3;
}
@keyframes rejection-pulse{
    0%,100%{box-shadow:0 6px 30px rgba(192,57,43,.35);}
    50%{box-shadow:0 6px 40px rgba(192,57,43,.7);}
}
.rejection-header{
    display:flex;align-items:center;gap:14px;flex-wrap:wrap;
    padding:20px 28px;
}
.rejection-icon{font-size:2.4rem;line-height:1;flex-shrink:0;}
.rejection-title{
    font-size:1.8rem;font-weight:900;letter-spacing:.06em;
    color:white;text-shadow:1px 1px 4px rgba(0,0,0,.3);
}
.rejection-subtitle{color:rgba(255,255,255,.9);font-size:.95rem;flex:1;min-width:200px;}
.rejection-reasons{
    list-style:none;background:rgba(0,0,0,.18);padding:16px 28px;margin:0;
}
.rejection-reasons li{
    color:white;padding:6px 0;font-size:.95rem;
}
.rejection-reasons li::before{content:"⚠ ";font-weight:bold;}
.rejection-note{
    padding:12px 28px;background:rgba(0,0,0,.12);
    color:rgba(255,255,255,.75);font-size:.85rem;font-style:italic;
}

/* Cage axis banner */
.cage-axis-banner{
    display:flex;align-items:center;gap:12px;flex-wrap:wrap;
    background:linear-gradient(135deg,#667eea10,#764ba220);
    border:1px solid #667eea40;border-radius:10px;
    padding:12px 20px;margin-bottom:28px;
}
.cage-axis-label{font-weight:600;color:#667eea;}
.cage-axis-value{
    font-weight:800;font-size:1.1rem;color:white;
    background:linear-gradient(135deg,#667eea,#764ba2);
    padding:3px 14px;border-radius:20px;
}
.cage-axis-note{font-size:.82rem;color:#888;margin-left:4px;}

/* Top stat cards */
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:20px;margin-bottom:40px;}
.stat-card{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:white;padding:25px;border-radius:15px;text-align:center;box-shadow:0 5px 15px rgba(102,126,234,.3);transition:all .3s;}
.stat-card h3{font-size:.95rem;opacity:.9;margin-bottom:8px;}
.stat-value{font-size:2.4rem;font-weight:bold;}
.stat-sublabel{font-size:.75rem;opacity:.8;margin-top:4px;}
/* Danger state for unknown/duplicate cards */
.stat-card.stat-card-danger{
    background:linear-gradient(135deg,#ff4757,#c0392b) !important;
    box-shadow:0 5px 20px rgba(192,57,43,.5) !important;
    animation:danger-pulse 2s ease-in-out 3;
}
@keyframes danger-pulse{
    0%,100%{transform:scale(1);}
    50%{transform:scale(1.04);}
}

/* Bar type distribution */
.bar-types-section{margin:40px 0;padding:30px;background:#f8f9ff;border-radius:15px;}
.bar-types-section h3{color:#667eea;margin-bottom:20px;text-align:center;}
.bar-types-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:15px;}
.bar-type-card{background:white;padding:20px;border-radius:10px;text-align:center;box-shadow:0 2px 10px rgba(0,0,0,.1);}
.bar-type-card.danger{background:#fff5f5;border:2px solid #ff4757;}
.bar-type-card .type-name{font-weight:600;color:#667eea;margin-bottom:10px;}
.bar-type-card.danger .type-name{color:#c0392b;}
.bar-type-card .type-count{font-size:2rem;font-weight:bold;color:#333;}

/* Analysis blocks */
.analysis-block{margin:40px 0;border-radius:16px;overflow:hidden;box-shadow:0 4px 20px rgba(102,126,234,.15);border:1px solid #e8ecff;}
.analysis-block-header{display:flex;align-items:flex-start;gap:16px;padding:24px 28px;background:linear-gradient(135deg,#667eea08,#764ba214);border-bottom:2px solid #e8ecff;}
.analysis-block-header .block-icon{font-size:2rem;line-height:1;flex-shrink:0;}
.analysis-block-header h3{color:#667eea;font-size:1.25rem;margin-bottom:4px;}
.block-desc{color:#666;font-size:.88rem;margin:0;line-height:1.5;}

/* Mesh stat cards */
.mesh-stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:16px;padding:24px;background:white;}
.mesh-stat-card{background:#f8f9ff;border:2px solid #e8ecff;border-radius:12px;padding:18px 14px;text-align:center;transition:all .25s;}
.mesh-stat-card:hover{border-color:#667eea;transform:translateY(-2px);box-shadow:0 6px 18px rgba(102,126,234,.18);}
.height-card{border-left:4px solid #764ba2;}
.mesh-layer-name{font-size:.8rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#764ba2;margin-bottom:8px;}
.mesh-stat-value{font-size:2.2rem;font-weight:800;color:#333;line-height:1;}
.mesh-stat-label{font-size:.75rem;color:#888;margin-top:4px;}
.mesh-stat-sub{font-size:.72rem;color:#999;margin-top:6px;}

/* Diameter pills */
.mesh-stat-dia{display:inline-block;margin-top:8px;padding:3px 10px;border-radius:20px;font-size:.76rem;font-weight:600;background:linear-gradient(135deg,#667eea,#764ba2);color:white;}
.mesh-dia-row{display:flex;flex-direction:column;gap:5px;align-items:center;margin-top:8px;}
.dia-horiz{background:linear-gradient(135deg,#4facfe,#00f2fe);color:white;}
.dia-vert {background:linear-gradient(135deg,#43e97b,#38f9d7);color:#1a5c30;}

.no-data{padding:24px;color:#999;font-style:italic;text-align:center;}

/* Layer weight table */
.layer-weight-table{width:100%;border-collapse:collapse;background:white;}
.layer-weight-table thead{background:linear-gradient(135deg,#667eea,#764ba2);color:white;}
.layer-weight-table th,.layer-weight-table td{padding:12px 16px;text-align:left;border-bottom:1px solid #e8ecff;}
.layer-weight-table th{font-size:.82rem;font-weight:700;text-transform:uppercase;letter-spacing:.5px;}
.layer-weight-table tbody tr:hover{background:#f8f9ff;}
.layer-weight-table tbody tr:nth-child(even){background:#fafbff;}
.layer-weight-table tbody tr.danger-row{background:#fff0f0 !important;}
.layer-weight-table tbody tr.danger-row:hover{background:#ffe5e5 !important;}
.layer-weight-table tbody tr.inferred-row{background:#fffbeb !important;}
.layer-weight-table tbody tr.inferred-row:hover{background:#fef3c7 !important;}
.inferred-badge{display:inline-block;background:#d97706;color:#fff;border-radius:8px;padding:1px 7px;font-size:.67rem;font-weight:700;margin-left:5px;vertical-align:middle;}
.total-row{background:linear-gradient(135deg,#667eea14,#764ba214) !important;}
.total-row td{border-top:2px solid #667eea !important;}
.weight-bar-wrap{position:relative;background:#eee;border-radius:8px;height:22px;overflow:hidden;min-width:80px;}
.weight-bar-fill{position:absolute;left:0;top:0;height:100%;background:linear-gradient(90deg,#667eea,#764ba2);border-radius:8px;transition:width .6s;}
.weight-bar-pct{position:relative;z-index:1;font-size:.75rem;font-weight:700;color:#333;padding:0 8px;line-height:22px;}

/* Data table */
.table-container{margin-top:20px;}
.table-controls{display:flex;gap:15px;margin-bottom:20px;flex-wrap:wrap;}
.search-input,.filter-select{padding:12px 20px;border:2px solid #e0e0e0;border-radius:10px;font-size:1rem;flex:1;min-width:200px;}
.search-input:focus,.filter-select:focus{outline:none;border-color:#667eea;}
.table-wrapper{overflow-x:auto;border-radius:10px;box-shadow:0 2px 10px rgba(0,0,0,.1);}
table#results-table{width:100%;border-collapse:collapse;background:white;}
table#results-table thead{background:linear-gradient(135deg,#667eea,#764ba2);color:white;}
table#results-table th,table#results-table td{padding:12px 15px;text-align:left;border-bottom:1px solid #e0e0e0;}
table#results-table th{font-weight:600;text-transform:uppercase;font-size:.8rem;letter-spacing:.5px;}
table#results-table tbody tr:hover{background:#f8f9ff;}
table#results-table tbody tr:nth-child(even){background:#fafafa;}
table#results-table tbody tr.danger-row{background:#fff0f0 !important;}
table#results-table tbody tr.danger-row:hover{background:#ffe5e5 !important;}

/* Export */
.export-section{text-align:center;padding:30px;background:#f8f9ff;border-radius:15px;}
.export-section h3{margin-bottom:8px;color:#667eea;}
.export-note{font-size:.85rem;color:#888;margin-bottom:16px;}

/* Documentation */
.doc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px;}
.doc-card{padding:25px;background:#f8f9ff;border-radius:15px;text-decoration:none;color:#333;transition:all .3s;border:2px solid transparent;}
.doc-card:hover{transform:translateY(-5px);box-shadow:0 10px 25px rgba(102,126,234,.2);border-color:#667eea;}
.doc-card h3{color:#667eea;margin-bottom:10px;}
.doc-card p{color:#666;font-size:.95rem;}

/* Footer */
footer{text-align:center;color:white;padding:30px 20px;margin-top:40px;}
footer a{color:white;text-decoration:none;border-bottom:2px solid white;}
footer a:hover{opacity:.8;}

/* Bar type badges */
.bar-type-badge{display:inline-block;padding:4px 10px;border-radius:12px;font-size:.8rem;font-weight:600;}
.bar-type-badge.mesh{background:#667eea;color:white;}
.bar-type-badge.link-bar{background:#f093fb;color:white;}
.bar-type-badge.loose-bar{background:#4facfe;color:white;}
.bar-type-badge.strut-bar{background:#43e97b;color:white;}
.bar-type-badge.preload-bar{background:#fa709a;color:white;}
.bar-type-badge.site-bar{background:#feca57;color:#333;}
.bar-type-badge.unknown,.bar-type-badge.other{background:#ff4757;color:white;}

/* ── CAGE DIMENSION BOXES ──────────────────────────────────────────── */
.dim-boxes-section {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin: 0 0 36px 0;
}
.dim-box {
    background: white;
    border: 2px solid #e8ecff;
    border-radius: 14px;
    padding: 20px 16px 18px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(102,126,234,.1);
    transition: transform .2s, box-shadow .2s;
}
.dim-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,.18);
}
.dim-box-tbd {
    border-style: dashed;
    opacity: .6;
}
.dim-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
    line-height: 1;
}
.dim-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #888;
    margin-bottom: 10px;
}
.dim-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #333;
    line-height: 1.1;
}
.dim-yes {
    color: #27ae60;
}
.dim-no {
    color: #e74c3c;
}
.dim-tbd {
    color: #bbb;
    font-weight: 600;
    font-size: 1rem;
}

/* ── COUPLER BADGE ──────────────────────────────────────────────────── */
.coupler-badge {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 7px;
    border-radius: 8px;
    font-size: .7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    vertical-align: middle;
    letter-spacing: .04em;
    cursor: default;
}

/* ── TABLE SEARCH CONTROLS ──────────────────────────────────────────── */
.search-wrap {
    position: relative;
    flex: 1;
    min-width: 280px;
    display: flex;
    align-items: center;
}
.search-icon {
    position: absolute;
    left: 14px;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}
.search-input {
    padding: 12px 20px 12px 40px !important;
    width: 100%;
}
.result-count {
    position: absolute;
    right: 14px;
    font-size: .78rem;
    font-weight: 600;
    color: #888;
    background: #f0f1ff;
    padding: 2px 10px;
    border-radius: 12px;
    white-space: nowrap;
}
.col-shape {
    white-space: nowrap;
}
.table-overflow-note {
    text-align: center;
    padding: 20px;
    background: #f8f9ff;
    color: #666;
    font-size: .9rem;
}

/* Responsive: stack dim boxes on small screens */
@media(max-width: 900px) {
    .dim-boxes-section { grid-template-columns: repeat(3, 1fr); }
}
@media(max-width: 600px) {
    .dim-boxes-section { grid-template-columns: repeat(2, 1fr); }
}

/* ── PAGINATION ──────────────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 0 8px;
}
.page-btn {
    padding: 8px 20px;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: white;
    color: #667eea;
    font-weight: 700;
    font-size: .88rem;
    cursor: pointer;
    transition: all .2s;
}
.page-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
}
.page-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
    border-color: #ccc;
    color: #ccc;
}
.page-info {
    font-size: .85rem;
    font-weight: 600;
    color: #555;
    min-width: 180px;
    text-align: center;
}

/* Utility */
.hidden{display:none !important;}

/* Responsive */
@media(max-width:768px){
    header h1{font-size:2rem;}
    main{padding:20px;}
    section h2{font-size:1.5rem;}
    .table-controls{flex-direction:column;}
    .mesh-stats-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));}
    .cage-axis-banner,.rejection-header{flex-direction:column;align-items:flex-start;gap:6px;}
    .rejection-title{font-size:1.4rem;}
}

/* ══════════════════════════════════════════════════════════════════════
   UPLOAD + 3D VIEWER LAYOUT
   ══════════════════════════════════════════════════════════════════════ */
.upload-and-viewer {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.upload-col {
    flex: 0 0 320px;
    min-width: 260px;
}
.viewer-col {
    flex: 1;
    min-width: 0;
    background: #0d0d1a;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #2a2a4a;
    box-shadow: 0 4px 24px rgba(0,0,0,.4);
}
.viewer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #1a1a2e;
    border-bottom: 1px solid #2a2a4a;
}
.viewer-title {
    font-weight: 700;
    color: #a0a8ff;
    font-size: .95rem;
}
.viewer-hint {
    font-size: .75rem;
    color: #666;
    margin-left: auto;
}
#threejs-container {
    width: 100%;
    height: 420px;
    display: block;
    position: relative;
}
#threejs-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}
.viewer-placeholder {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #555;
    font-size: .85rem;
    pointer-events: none;
    text-align: center;
    white-space: nowrap;
}
.viewer-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 8px 14px;
    background: #111128;
    border-top: 1px solid #2a2a4a;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .72rem;
    color: #aaa;
}
.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   C01 DETAIL CARDS
   ══════════════════════════════════════════════════════════════════════ */
.c01-cards-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.c01-card {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 18px 14px;
    border-radius: 14px;
    border: 2px solid transparent;
    text-align: center;
    position: relative;
    cursor: default;
    animation: c01-slide-in .35s ease both;
}
@keyframes c01-slide-in {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.c01-card--unknown {
    background: #fff5f5;
    border-color: #fc8181;
}
.c01-card--dup {
    background: #fffaf0;
    border-color: #f6ad55;
}
.c01-card--weight {
    background: #f0f4ff;
    border-color: #667eea;
}
.c01-card-icon { font-size: 1.8rem; line-height: 1; }
.c01-card-title {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #444;
}
.c01-card-count {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
    color: #c53030;
}
.c01-card--dup   .c01-card-count { color: #c05621; }
.c01-card--weight .c01-card-count { color: #434190; }
.c01-card-sub {
    font-size: .72rem;
    color: #718096;
    line-height: 1.3;
}
.c01-card-link {
    margin-top: 10px;
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 700;
    text-decoration: none;
    background: #c53030;
    color: white;
    transition: opacity .15s;
}
.c01-card--dup   .c01-card-link  { background: #c05621; }
.c01-card--weight .c01-card-link { background: #434190; }
.c01-card-link:hover { opacity: .82; }

/* ══════════════════════════════════════════════════════════════════════
   PAGINATION (already added, kept here for completeness reference)
   ══════════════════════════════════════════════════════════════════════ */

/* ── ViewCube buttons ─────────────────────────────────────────────────── */
.viewcube-wrap {
    display: flex;
    gap: 4px;
    margin-left: auto;
}
.viewcube-btn {
    padding: 3px 8px;
    border: 1px solid #3a3a5a;
    border-radius: 5px;
    background: #1a1a3a;
    color: #a0a8ff;
    font-size: .7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.viewcube-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* ── Layer filter toggle + panel ─────────────────────────────────────── */
.viewer-filter-toggle {
    padding: 3px 9px;
    border: 1px solid #3a3a5a;
    border-radius: 5px;
    background: #1a1a3a;
    color: #a0a8ff;
    font-size: .72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.viewer-filter-toggle:hover { background: #2a2a5a; }

.viewer-filter-panel {
    background: #111128;
    border-bottom: 1px solid #2a2a4a;
    padding: 8px 14px 10px;
}
.viewer-filter-panel.hidden { display: none; }

.viewer-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.viewer-filter-all {
    padding: 2px 8px;
    border: 1px solid #3a3a5a;
    border-radius: 4px;
    background: #1a1a3a;
    color: #a0a8ff;
    font-size: .7rem;
    cursor: pointer;
}
.viewer-filter-all:hover { background: #667eea; color: white; border-color: #667eea; }
.viewer-filter-hint {
    font-size: .68rem;
    color: #555;
}

.viewer-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}
.viewer-cb-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .73rem;
    color: #aaa;
    cursor: pointer;
    user-select: none;
}
.viewer-cb-label:hover { color: #ddd; }
.viewer-cb-label input[type="checkbox"] {
    accent-color: #667eea;
    width: 13px;
    height: 13px;
    cursor: pointer;
}
.viewer-cb-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}
.viewer-cb-label em {
    font-style: normal;
    color: #666;
    font-size: .68rem;
}

/* ══════════════════════════════════════════════════════════════════════
   SAMPLE FILES SECTION
   ══════════════════════════════════════════════════════════════════════ */
.samples-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e8eaf6;
}
.samples-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #3d4db7;
    margin-bottom: 6px;
}
.samples-desc {
    font-size: .85rem;
    color: #666;
    margin-bottom: 16px;
}
.samples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.sample-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fafbff;
    transition: box-shadow .2s;
}
.sample-card:hover { box-shadow: 0 4px 16px rgba(102,126,234,.15); }
.sample-icon { font-size: 1.4rem; flex-shrink: 0; }
.sample-info { flex: 1; min-width: 0; }
.sample-name { font-weight: 700; font-size: .88rem; color: #2d3748; }
.sample-meta { font-size: .72rem; color: #718096; margin: 2px 0; }
.sample-desc { font-size: .75rem; color: #a0aec0; }
.sample-dl-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: .75rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .15s;
}
.sample-dl-btn:hover { opacity: .85; }
.sample-dl-btn--rejected {
    background: linear-gradient(135deg, #fc8181, #e53e3e);
}
.sample-dl-all {
    width: 100%;
    justify-content: center;
    font-size: .9rem;
    padding: 12px;
}

/* ══════════════════════════════════════════════════════════════════════
   CLASH DETECTION & STEP DETECTION BLOCKS
   ══════════════════════════════════════════════════════════════════════ */
.run-analysis-btn {
    flex-shrink: 0;
    margin-left: auto;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    white-space: nowrap;
}
.run-analysis-btn:hover  { opacity: .88; }
.run-analysis-btn:active { transform: scale(.97); }
.run-analysis-btn:disabled { opacity: .5; cursor: default; }

.analysis-subblock {
    margin-top: 16px;
    animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

.clash-summary { margin-bottom: 12px; }
.clash-ok {
    padding: 12px 18px;
    border-radius: 10px;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #276749;
    font-weight: 600;
    font-size: .9rem;
}
.clash-fail {
    padding: 12px 18px;
    border-radius: 10px;
    background: #fff5f5;
    border: 1px solid #fc8181;
    color: #c53030;
    font-weight: 600;
    font-size: .9rem;
}
.clash-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: .72rem;
    font-weight: 700;
    color: white;
}
.ctb-mm { background: #e53e3e; }
.ctb-ms { background: #d69e2e; }
.clash-mm { background: #fff5f5; }
.clash-ms { background: #fffbeb; }
.clash-severe { color: #c53030; font-weight: 700; }
