:root {
    --bg-body: #0a0e14;
    --bg-sidebar: #111827;
    --bg-panel: #111827;
    --bg-card: #1f2937;
    --text-muted: #94a3b8;
    --orange-active: #ffb400;
    --btn-blue: #0d6efd;
    --btn-dark: #334155;
    --error-red: #ef4444;
    --btn-red: #991b1b;
    --btn-orange: #92400e;
}

body {
    font-family: 'Pretendard', sans-serif;
    background-color: var(--bg-body);
    color: #f1f5f9;
    margin: 0;
    overflow: hidden;
    height: 100vh;
}

.layout-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Top Navigation */
.top-nav {
    height: 60px;
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
}

.brand-section {
    display: flex;
    align-items: center;
    width: 260px;
    flex-shrink: 0;
}

.logo-box {
    background-color: #334155;
    color: white;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 4px;
    margin-right: 12px;
}

.brand-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.1;
}

.project-info-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-stats-section {
    display: flex;
    align-items: center;
    gap: 25px;
    min-width: 450px;
    justify-content: flex-end;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Main Wrapper with 3 columns */
.main-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr 320px;
    flex-grow: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid #1e293b;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.step-item {
    background-color: #1a232e;
    border: 1px solid #2d3748;
    border-radius: 4px;
    padding: 14px 18px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.step-item:hover {
    background-color: #242f3d;
    border-color: #3e4a5d;
}

.step-item.done {
    background-color: #f8fafc;
    color: #334155;
    border: none;
    box-shadow: none;
    opacity: 1;
}

.step-item.done i {
    color: #10b981;
    font-size: 1.1rem;
}

.step-item.active {
    background-color: #ffb400;
    color: #1a202c;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.sub-task-box {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-top: 15px;
}

.sub-task-item {
    display: flex;
    align-items: center;
    padding: 12px 5px;
    font-size: 0.85rem;
    color: #cbd5e1;
    border-top: 1px solid #1e293b;
    cursor: pointer;
    position: relative;
}

.sub-task-item:last-child {
    border-bottom: 1px solid #1e293b;
}

.sub-task-item.active {
    color: #f1f5f9;
}

.sub-task-item i {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sub-task-item i.bi-record-circle { color: #f59e0b; }
.sub-task-item i.bi-info-circle { color: #10b981; }
.sub-task-item i.bi-slash-circle { color: #3b82f6; }
.sub-task-item i.bi-gear-wide-connected { color: #3b82f6; }

.badge-pos {
    background-color: #242f3d;
    color: #f59e0b;
    border: 1px solid #4a5568;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: auto;
}

/* Middle (Main Dashboard Content) */
.middle-content {
    display: flex;
    flex-direction: column;
    background-color: #0b111a;
    padding: 15px;
    gap: 15px;
    overflow-y: auto;
}

.middle-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: var(--bg-sidebar);
    border: 1px solid #1e293b;
    border-radius: 8px;
    flex-shrink: 0;
}

.cad-view {
    flex-grow: 1;
    background-color: #0d141d;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    border: 1px solid #1e293b;
    border-radius: 8px;
    position: relative;
    min-height: 500px;
}

.project-badge {
    background-color: #0d6efd;
    padding: 6px 15px;
    border-radius: 6px;
    font-weight: 600;
    margin-right: 15px;
}

.progress-container {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.header-progress-bar {
    width: 200px;
    height: 6px;
    background-color: #1e293b;
    border-radius: 3px;
    margin: 0 10px;
    overflow: hidden;
}

.header-progress-fill {
    height: 100%;
    background-color: #3b82f6;
    width: 72%;
}

.status-badge {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-left: 15px;
}

.icon-group {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 20px;
    padding: 2px 8px;
    display: flex;
    align-items: center;
}

.icon-group .btn {
    background-color: transparent;
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
}

.icon-group .btn:hover {
    color: white;
    background-color: rgba(255,255,255,0.05);
}

/* Floating Action Modal */
.bottom-modal {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    background-color: #1a202c;
    border: 1px solid #2d3748;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.8);
}

.danger-icon {
    background-color: var(--error-red);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.choice-btn {
    background-color: #0f172a;
    border: 2px solid #2d3748;
    color: #94a3b8;
    border-radius: 10px;
    padding: 12px 20px;
    margin-right: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.choice-btn.active {
    border-color: #3b82f6;
    color: white;
}

.custom-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #475569;
    border-radius: 50%;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.choice-btn.active .custom-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #3b82f6;
    border-radius: 50%;
}

.confirm-btn {
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0 40px;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Right Panel */
.right-panel {
    background-color: var(--bg-panel);
    border-left: 1px solid #1e293b;
    padding: 20px;
    overflow-y: auto;
}

.panel-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.status-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-red { background-color: #991b1b; color: #fecaca; }
.btn-orange { background-color: #92400e; color: #ffedd5; }
.btn-gray { background-color: #1a202c; color: #cbd5e1; border: 1px solid #2d3748; }

.inventory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 0.9rem;
}

.inventory-badges {
    display: flex;
    align-items: center;
    gap: 10px;
}

.conf-badge {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.error-card {
    background-color: #1a202c;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 4px solid var(--orange-active);
}

.error-card.red { border-left-color: var(--error-red); }

.more-dots {
    color: var(--text-muted);
    cursor: pointer;
}

/* Bottom Buttons Sidebar */
.btn-blue-pill {
    background: linear-gradient(to bottom, #3b82f6, #2563eb);
    color: white;
    border: 1px solid #1d4ed8;
    border-radius: 6px;
    padding: 10px;
    width: 100%;
    margin-bottom: 10px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.btn-gray-pill {
    background-color: #1e293b;
    color: #cbd5e1;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 10px;
    width: 100%;
    margin-bottom: 25px;
    font-weight: 600;
}

.sidebar-bottom {
    margin-top: auto;
    padding-bottom: 10px;
}

.btn-dark-sidebar {
    background-color: #1a202c;
    color: #e2e8f0;
    border: 1px solid #2d3748;
    border-radius: 6px;
    padding: 12px;
    width: 100%;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-dark-sidebar:hover {
    background-color: #2d3748;
}
