/* 
   ORION COMMAND CENTER (OCC) - DESIGN SYSTEM V3
   Architecture: Command Center Layout (Sidebar + Main)
   Theme: Midnight Glassmorphism
*/

:root {
    --occ-bg: #0b0f19;
    --occ-sidebar-bg: #111827;
    --occ-card-bg: rgba(30, 41, 59, 0.5);
    --occ-border: rgba(255, 255, 255, 0.08);
    --occ-accent: #3b82f6;
    --occ-accent-glow: rgba(59, 130, 246, 0.4);
    --occ-text: #f8fafc;
    --occ-text-muted: #94a3b8;
    --occ-success: #10b981;
    --occ-warning: #f59e0b;
    --occ-danger: #ef4444;
}

/* --- BASE LAYOUT --- */
#view-taller {
    background: var(--occ-bg);
    height: 100vh;
    overflow: hidden;
    color: var(--occ-text);
    font-family: 'Inter', sans-serif;
}

.occ-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* --- SIDEBAR --- */
.occ-sidebar {
    width: 280px;
    background: var(--occ-sidebar-bg);
    border-right: 1px solid var(--occ-border);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
}

.occ-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 50px;
}

.occ-back-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--occ-border);
    color: var(--occ-text);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.occ-back-btn:hover { background: var(--occ-accent); border-color: var(--occ-accent); }

.occ-brand-text { display: flex; flex-direction: column; }
.occ-kicker { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.2em; color: var(--occ-accent); }
.occ-title { font-size: 1.2rem; font-weight: 900; letter-spacing: -0.02em; }

.occ-nav { flex: 1; display: flex; flex-direction: column; gap: 8px; }

.occ-nav-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--occ-text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.occ-nav-btn i { font-size: 1.1rem; width: 24px; text-align: center; }
.occ-nav-btn:hover { background: rgba(255, 255, 255, 0.03); color: var(--occ-text); }
.occ-nav-btn.active { 
    background: rgba(59, 130, 246, 0.1); 
    color: var(--occ-accent); 
    border-color: rgba(59, 130, 246, 0.2); 
}

.occ-sidebar-footer { margin-top: auto; }
.occ-search-wrapper {
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--occ-border);
    border-radius: 12px;
    padding: 0 15px;
    display: flex;
    align-items: center;
}

.occ-search-wrapper i { color: var(--occ-text-muted); font-size: 0.9rem; }
.occ-search-wrapper input {
    background: transparent;
    border: none;
    padding: 12px 10px;
    color: var(--occ-text);
    font-size: 0.85rem;
    width: 100%;
}

.occ-search-wrapper input:focus { outline: none; }

/* --- CONTENT AREA --- */
.occ-content-area {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.05), transparent);
}

/* --- KANBAN BOARD --- */
.occ-kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    height: 100%;
}

.occ-kanban-lane {
    display: flex;
    flex-direction: column;
    min-width: 320px;
}

.occ-lane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 5px;
}

.occ-lane-title { display: flex; align-items: center; gap: 10px; }
.occ-lane-title i { color: var(--occ-accent); font-size: 0.9rem; }
.occ-lane-title span { font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--occ-text-muted); }
.occ-lane-count { font-size: 0.7rem; background: rgba(255, 255, 255, 0.05); padding: 4px 10px; border-radius: 20px; font-weight: 700; }

.occ-lane-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

/* --- KANBAN CARD --- */
.occ-card {
    background: var(--occ-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--occ-border);
    border-radius: 18px;
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.occ-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; width: 4px;
    background: var(--priority-color, var(--occ-accent));
}

.occ-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

.occ-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.occ-card-plate { font-size: 1.1rem; font-weight: 900; color: var(--occ-accent); letter-spacing: -0.02em; }
.occ-card-time { font-size: 0.65rem; color: var(--occ-text-muted); font-weight: 600; }

.occ-card-client { font-size: 0.85rem; font-weight: 700; margin-bottom: 5px; }
.occ-card-problem { font-size: 0.75rem; color: var(--occ-text-muted); line-height: 1.4; }

.occ-card-progress { height: 4px; background: rgba(0,0,0,0.2); border-radius: 10px; margin: 15px 0; overflow: hidden; }
.occ-card-progress-fill { height: 100%; background: var(--occ-accent); border-radius: 10px; transition: width 0.6s ease; }

.occ-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.occ-card-tech { font-size: 0.65rem; font-weight: 800; color: var(--occ-text-muted); text-transform: uppercase; }
.occ-card-badge { font-size: 0.6rem; background: rgba(16, 185, 129, 0.1); color: #10b981; padding: 4px 10px; border-radius: 20px; font-weight: 700; border: 1px solid rgba(16, 185, 129, 0.2); }

/* --- BAY VIEW --- */
.occ-bay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.occ-bay-card {
    background: var(--occ-card-bg);
    border: 1px solid var(--occ-border);
    border-radius: 22px;
    padding: 30px;
    text-align: center;
    transition: all 0.4s;
    position: relative;
}

.occ-bay-card:hover { border-color: var(--occ-accent); transform: scale(1.02); }

.occ-bay-status {
    position: absolute;
    top: 15px; right: 15px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--occ-success);
    box-shadow: 0 0 10px var(--occ-success);
}

.occ-bay-card.busy .occ-bay-status { background: var(--occ-danger); box-shadow: 0 0 10px var(--occ-danger); }

.occ-bay-name { font-size: 1.2rem; font-weight: 800; margin-bottom: 20px; }
.occ-bay-plate { font-size: 1.6rem; font-weight: 900; color: var(--occ-accent); margin-bottom: 5px; }
.occ-bay-client { font-size: 0.85rem; color: var(--occ-text-muted); margin-bottom: 20px; }
.occ-bay-btn { background: var(--occ-accent); border: none; color: white; padding: 12px 20px; border-radius: 12px; font-weight: 700; cursor: pointer; width: 100%; }

/* --- TECH VIEW --- */
.occ-tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.occ-tech-card {
    background: var(--occ-card-bg);
    border: 1px solid var(--occ-border);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.occ-tech-avatar {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--occ-accent), #1e40af);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 900;
}

.occ-tech-info h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.occ-tech-info p { margin: 4px 0 0; font-size: 0.75rem; color: var(--occ-text-muted); text-transform: uppercase; font-weight: 700; }
.occ-tech-status { margin-top: 10px; font-size: 0.8rem; font-weight: 600; color: var(--occ-success); }
.occ-tech-card.busy .occ-tech-status { color: var(--occ-warning); }

/* --- HUB / EXPEDIENTES --- */
.occ-hub-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    height: 100%;
}

.occ-hub-sidebar {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--occ-border);
    border-radius: 20px;
    display: flex; flex-direction: column;
    overflow: hidden;
}

.occ-hub-list { flex: 1; overflow-y: auto; padding: 15px; }

.occ-hub-item {
    padding: 15px;
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.occ-hub-item:hover { background: rgba(255, 255, 255, 0.04); }
.occ-hub-item.active { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.3); }

.occ-hub-item-plate { font-weight: 800; color: var(--occ-accent); display: block; }
.occ-hub-item-client { font-size: 0.75rem; color: var(--occ-text-muted); }

.occ-hub-main {
    background: var(--occ-card-bg);
    border: 1px solid var(--occ-border);
    border-radius: 30px;
    padding: 40px;
    overflow-y: auto;
}

/* Animations */
@keyframes occFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.occ-content-area > div { animation: occFadeIn 0.5s ease-out forwards; }

/* --- HUB DETAIL VIEW --- */
.occ-hub-detail-view {
    animation: occFadeIn 0.5s ease-out;
}

.occ-hub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.occ-hub-kicker { font-size: 0.7rem; font-weight: 800; color: var(--occ-accent); letter-spacing: 0.1em; }
.occ-hub-plate { font-size: 4rem; font-weight: 900; line-height: 1; margin: 10px 0; color: var(--occ-text); letter-spacing: -0.04em; }
.occ-hub-vehicle-desc { font-size: 1.4rem; color: var(--occ-text-muted); font-weight: 500; }

.occ-hub-status-badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--occ-accent);
    padding: 10px 25px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 800;
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: inline-block;
    margin-bottom: 15px;
}

.occ-hub-client-info { text-align: right; }
.occ-hub-client-info strong { display: block; font-size: 1.2rem; color: var(--occ-text); }
.occ-hub-client-info span { font-size: 0.85rem; color: var(--occ-text-muted); }

.occ-hub-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.occ-quick-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--occ-border);
    padding: 25px 15px;
    border-radius: 20px;
    color: var(--occ-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.occ-quick-btn i { font-size: 1.8rem; color: var(--occ-accent); }
.occ-quick-btn span { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.05em; }
.occ-quick-btn:hover { background: rgba(59, 130, 246, 0.1); border-color: var(--occ-accent); transform: translateY(-5px); }

.occ-quick-btn.highlight { background: var(--occ-accent); color: white; border: none; }
.occ-quick-btn.highlight i { color: white; }

.occ-hub-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.occ-info-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--occ-border);
    border-radius: 24px;
    padding: 30px;
}

.occ-info-card h4 { margin: 0 0 20px; font-size: 0.8rem; font-weight: 800; color: var(--occ-text-muted); letter-spacing: 0.1em; }
.occ-info-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.9rem; }
.occ-info-row span { color: var(--occ-text-muted); }

.occ-problem-quote {
    margin-top: 25px;
    padding: 20px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 16px;
    border-left: 4px solid var(--occ-accent);
}

.occ-problem-quote i { color: var(--occ-accent); margin-bottom: 10px; }
.occ-problem-quote p { margin: 0; font-size: 0.85rem; font-style: italic; line-height: 1.5; }

.occ-doc-stack { display: flex; flex-direction: column; gap: 10px; }
.occ-doc-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--occ-border);
}

.occ-doc-item i { color: var(--occ-accent); }
.occ-doc-item span { flex: 1; font-size: 0.85rem; font-weight: 600; }
.occ-doc-view-btn { background: transparent; border: 1px solid var(--occ-accent); color: var(--occ-accent); padding: 4px 12px; border-radius: 8px; font-size: 0.7rem; font-weight: 800; cursor: pointer; }

.occ-hub-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 30px;
    border-top: 1px solid var(--occ-border);
}

.occ-btn-footer {
    padding: 15px 30px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
}

.occ-btn-footer.primary { background: var(--occ-success); color: white; border: none; }
.occ-btn-footer.secondary { background: rgba(255, 255, 255, 0.05); color: var(--occ-text); border: 1px solid var(--occ-border); }
.occ-btn-footer:hover { transform: translateY(-3px); filter: brightness(1.2); }

/* --- SIDE DRAWER (OCC) --- */
.occ-side-drawer {
    position: fixed;
    top: 0;
    right: -550px;
    width: 500px;
    height: 100vh;
    background: #0f172a; /* Solid dark for maximum contrast */
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
    z-index: 11000;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    color: #f8fafc;
}

.occ-side-drawer.open {
    right: 0;
}

.occ-drawer-header {
    padding: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.occ-drawer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.occ-drawer-title-group h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #3b82f6;
}

.occ-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-top: 8px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.occ-badge.pending { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border-color: rgba(245, 158, 11, 0.2); }
.occ-badge.paid { background: rgba(16, 185, 129, 0.1); color: #10b981; border-color: rgba(16, 185, 129, 0.2); }

.occ-drawer-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.occ-drawer-close:hover { background: rgba(239, 68, 68, 0.2); color: #ef4444; border-color: rgba(239, 68, 68, 0.3); }

.occ-drawer-minimize {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.occ-drawer-minimize:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.35);
}

.occ-side-drawer.minimized {
    top: auto;
    right: 14px;
    bottom: 14px;
    width: min(420px, calc(100vw - 28px));
    height: 88px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: -10px 0 24px rgba(0, 0, 0, 0.35);
}

.occ-side-drawer.minimized .occ-drawer-header {
    padding: 18px 20px;
    border-bottom: none;
}

.occ-side-drawer.minimized .occ-drawer-body,
.occ-side-drawer.minimized .occ-drawer-footer {
    display: none;
}

.occ-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.occ-drawer-footer {
    padding: 24px 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 15px;
}

/* OCC Utility Classes used in dynamic injection */
.occ-step-tracker {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    padding: 0 10px;
}

.occ-step-tracker::before {
    content: '';
    position: absolute;
    top: 6px; left: 20px; right: 20px; height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.occ-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.occ-step-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s;
}

.occ-step.active .occ-step-dot {
    background: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.occ-step.done .occ-step-dot {
    background: #10b981;
    border-color: #10b981;
}

.occ-step-label {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--occ-text-muted);
}

.occ-step.active .occ-step-label { color: #3b82f6; }

.occ-action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.occ-btn-action {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.occ-btn-action:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-3px);
}

.occ-btn-action i {
    font-size: 1.5rem;
    color: #3b82f6;
}
