/* --- APP MODULE WORKSPACE STANDARDS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #0a0603;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* --- BACKGROUND DESIGN UNDERLAYS --- */
.workspace-bg {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 1;
    background-image: 
        linear-gradient(rgba(255, 82, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 82, 0, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.ambient-glow {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 82, 0, 0.05) 0%, transparent 70%);
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
}

/* --- APP CONTAINMENT WRAPPER --- */
.app-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    z-index: 2;
    position: relative;
}

/* --- APPARATUS HEADER BRANDING --- */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 82, 0, 0.1);
    margin-bottom: 40px;
}

.brand-logo {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.brand-logo span {
    color: #FF5200;
}

.system-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 82, 0, 0.03);
    border: 1px solid rgba(255, 82, 0, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #FF5200;
    letter-spacing: 1px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: #FF5200;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 8px #FF5200;
    animation: pulseGlow 1.6s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 82, 0, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 82, 0, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 82, 0, 0); }
}

/* --- MAIN INTERACTION CARD WORKSPACE --- */
.workspace-card {
    background: #110e0c;
    border: 1px solid rgba(255, 82, 0, 0.15);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    margin-bottom: 40px;
}

.card-head h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #f3f4f6;
}

.card-head p {
    font-size: 0.95rem;
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* --- SELECTION INPUT DROPDOWN FIELD STYLING --- */
.model-selection-wrapper {
    margin-bottom: 25px;
}

.model-selection-wrapper .control-label {
    display: block; 
    font-size: 0.8rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
    color: #a1a1aa; 
    margin-bottom: 10px;
}

.model-selection-wrapper select {
    width: 100%; 
    background: #14110f; 
    border: 1px solid rgba(255, 82, 0, 0.3); 
    color: #ffffff; 
    padding: 14px 18px; 
    border-radius: 8px; 
    font-weight: 600; 
    outline: none; 
    transition: all 0.3s ease; 
    cursor: pointer;
    font-size: 0.95rem;
}

.model-selection-wrapper select:focus {
    border-color: #FF5200;
    box-shadow: 0 0 15px rgba(255, 82, 0, 0.15);
}

/* --- DXF OPTIMIZATION GUIDELINES CARD --- */
.dxf-guidelines-card {
    background: #181412;
    border: 1px solid rgba(255, 82, 0, 0.25);
    border-left: 4px solid #FF5200;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.guidelines-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.guidelines-icon {
    font-size: 1.2rem;
}

.guidelines-header h4 {
    color: #FF5200;
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.guidelines-list {
    margin: 0;
    padding-left: 20px;
    color: #c9c7c5;
    font-size: 0.85rem;
    line-height: 1.6;
}

.guidelines-list li {
    margin-bottom: 8px;
}

.guidelines-list li:last-child {
    margin-bottom: 0;
}

.guidelines-list code {
    background: #0e0c0b;
    color: #FF5200;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 82, 0, 0.2);
}

.guidelines-list strong {
    color: #ffffff;
}

/* --- DRAG & DROP ZONE DESIGN --- */
.drop-zone {
    width: 100%;
    min-height: 220px;
    border: 2px dashed rgba(255, 82, 0, 0.25);
    background: rgba(20, 17, 15, 0.6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.drop-zone:hover, .drop-zone.drag-active {
    border-color: #FF5200;
    background: rgba(255, 82, 0, 0.02);
    box-shadow: 0 0 20px rgba(255, 82, 0, 0.05);
}

.interactive-icon {
    font-size: 2.8rem;
    margin-bottom: 15px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.drop-zone:hover .interactive-icon {
    transform: translateY(-4px);
}

.drop-zone h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 6px;
}

.drop-zone p {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 12px;
}

.browse-highlight {
    color: #FF5200;
    font-weight: 600;
}

.file-spec-hint {
    font-size: 0.75rem;
    color: #6b7280;
    display: block;
}

#fileInput {
    display: none;
}

/* --- MONITOR PANEL STATE VIEW --- */
.file-monitor-panel {
    display: none;
    background: #181412;
    border: 1px solid rgba(255, 82, 0, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
}

.file-monitor-panel.panel-visible {
    display: block;
    animation: slideEmerge 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideEmerge {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.file-details {
    display: flex;
    align-items: center;
    gap: 14px;
}

.monitored-icon { font-size: 1.5rem; }

.file-details .meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.monitored-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f3f4f6;
}

.monitored-size {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* --- PROCESSING STATES VISUAL METRICS --- */
.processing-core-wrapper {
    padding: 30px 0;
    text-align: center;
}

.processing-gear {
    font-size: 3.5rem;
    display: inline-block;
    animation: spinGear 3s infinite linear;
}

@keyframes spinGear {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.processing-core-wrapper h3 {
    margin-top: 20px;
    font-size: 1.4rem;
    color: #f3f4f6;
}

.processing-core-wrapper p {
    color: #9ca3af;
    font-size: 0.95rem;
    margin-top: 8px;
}

.progress-container {
    margin-top: 35px;
    background: #181412;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 82, 0, 0.1);
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: #27211e;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #cc4200, #FF5200);
    border-radius: 4px;
}

.progress-meta-row {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

#timerCountdown { color: #6b7280; }
#pipelineProgressPercent { color: #FF5200; }

/* --- CUSTOMIZATION MATRIX GRID CANVAS CONFIGURATIONS --- */
#customizationZone {
    margin-top: 10px;
    border: 1px solid rgba(255, 82, 0, 0.25);
    border-radius: 12px;
    padding: 30px;
    background: rgba(20, 17, 15, 0.8);
    animation: slideEmerge 0.5s ease-out;
}

.customization-head h3 {
    font-size: 1.3rem;
    margin-bottom: 6px;
    color: #f3f4f6;
}

.customization-head p {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 25px;
    line-height: 1.5;
}

.room-input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: wrap;
    animation: slideEmerge 0.3s ease-out;
}

.room-input-row input {
    background: #1a1613;
    border: 1px solid rgba(255, 82, 0, 0.15);
    padding: 12px;
    border-radius: 6px;
    color: #ffffff;
    outline: none;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.room-input-row input:focus {
    border-color: #FF5200;
}

.room-field-name { flex: 2; min-width: 160px; }
.room-field-size { flex: 1; min-width: 100px; }
.room-field-points { flex: 1; min-width: 80px; }

.btn-remove-row {
    background: transparent;
    color: #f87171;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: transform 0.2s;
}

.btn-remove-row:hover {
    transform: scale(1.1);
    color: #ef4444;
}

.btn-append-row {
    background: transparent;
    color: #FF5200;
    border: 1px dashed #FF5200;
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.btn-append-row:hover {
    background: rgba(255, 82, 0, 0.03);
    box-shadow: 0 0 15px rgba(255, 82, 0, 0.1);
}

/* --- TRIGGER BUTTON CONTROLS --- */
.btn-process-submit {
    width: 100%;
    padding: 14px 28px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffffff;
    background: #FF5200;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 82, 0, 0.2);
}

.btn-process-submit:hover:not([disabled]) {
    background: transparent;
    color: #FF5200;
    border-color: #FF5200;
    box-shadow: 0 0 25px rgba(255, 82, 0, 0.4);
    transform: translateY(-1px);
}

.btn-process-submit:active:not([disabled]) {
    transform: translateY(1px);
}

.btn-process-submit[disabled] {
    background: #25201d;
    color: #524742;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- BANNERS AND FOOTERS INTERFACE --- */
.status-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.status-banner.success {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.banner-icon { font-weight: bold; font-size: 1.2rem; }
.completion-hint-text { color: #9ca3af; font-size: 0.9rem; margin-top: 15px; }

.app-footer {
    margin-top: auto;
    padding-top: 20px;
    font-size: 0.75rem;
    color: #4b5563;
    text-align: center;
    line-height: 1.5;
}

/* --- RESPONSIVE WORKSPACE TARGETS --- */
@media (max-width: 680px) {
    .workspace-card { padding: 25px 20px; }
    .card-head h2 { font-size: 1.5rem; }
    .app-header { flex-direction: column; gap: 15px; align-items: flex-start; }
    .room-input-row { gap: 10px; }
    .room-input-row input { flex: 1 1 100%; }
    .btn-remove-row { width: 100%; text-align: center; padding: 10px; border: 1px solid rgba(239, 68, 68, 0.2); border-radius: 6px; }
    .dxf-guidelines-card { padding: 15px; }
}