/* PEXUM Official Identity Styles */

:root {
    /* Colors */
    --color-bg-deep: #0A0B10;
    /* Deep Space */
    --color-bg-surface: rgba(255, 255, 255, 0.03);
    --color-primary-cyan: #00F0FF;
    /* Electric Cyan */
    --color-primary-purple: #7000FF;
    /* Plasma Purple */
    --color-text-main: #FFFFFF;
    --color-text-muted: rgba(255, 255, 255, 0.7);
    --color-border: rgba(255, 255, 255, 0.1);

    /* Mappings for App Logic */
    --bg-dark: var(--color-bg-deep);
    --bg-card: var(--color-bg-surface);
    --primary: var(--color-primary-cyan);
    --text-main: var(--color-text-main);
    --text-muted: var(--color-text-muted);
    --border: var(--color-border);
    --sidebar-width: 260px;
    /* Reduced from 280px */

    /* Gradients */
    --grad-glow: radial-gradient(circle at center, rgba(0, 240, 255, 0.15) 0%, transparent 70%);
    --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', monospace;

    /* Effects */
    --blur-glass: 12px;
    --radius-sm: 4px;
    --radius-md: 12px;
    --shadow-glow: 0 0 20px rgba(0, 240, 255, 0.2);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    margin: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
    /* Desktop: Hidden, Mobile: Auto */
    line-height: 1.5;
    font-size: 0.95rem;
    /* Slightly smaller base font */
    /* Slightly smaller base font */
}

.app-container {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--color-bg-surface);
    backdrop-filter: blur(var(--blur-glass));
    -webkit-backdrop-filter: blur(var(--blur-glass));
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Increased visibility */
    border-radius: var(--radius-md);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    /* Add padding for internal content */
    margin-bottom: 2rem;
}

/* ... existing code ... */

.form-group input,
.form-group select {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    /* Slightly lighter background */
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Much more visible border */
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.2);
}

/* Fix for Select Options being white on white in Windows/Chrome */
option {
    background-color: var(--bg-dark);
    color: var(--text-main);
}

/* --- Layout --- */

/* Sidebar */
aside {
    width: var(--sidebar-width);
    background: rgba(10, 11, 16, 0.95);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    /* Reduced padding */
    position: relative;
    z-index: 10;
    overflow-y: auto;
    /* Allow scroll within sidebar if needed */
    flex-shrink: 0;
}

.sidebar-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

/* Responsive: Mobile/Tablet */
@media (max-width: 900px) {
    body {
        flex-direction: column;
        overflow: auto;
        /* Allow scroll on body for mobile */
        height: auto;
    }

    .app-container {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    aside {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 1rem;
    }

    .sidebar-header {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .sidebar-header img {
        margin: 0 !important;
        /* Override inline styles */
        height: 40px !important;
    }

    /* Flatten inputs for mobile header bar */
    .budget-tracker,
    .order-summary {
        flex: 1;
        margin-top: 0 !important;
    }

    .order-summary {
        display: none;
        /* Hide summary on mobile top bar to save space, maybe moving to bottom or toggle */
    }

    main {
        overflow: visible;
        height: auto;
    }
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--grad-glow) no-repeat center center;
    background-size: cover;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
}

.steps-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    cursor: default;
}

.step.active {
    color: var(--text-main);
}

.step.active .step-num {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.step-num {
    width: 30px;
    height: 30px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Budget Tracker */
.budget-tracker {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.budget-tracker label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.budget-tracker input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    font-family: inherit;
    font-weight: 600;
    width: 100%;
    outline: none;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.25rem;
    transition: border 0.3s;
}

.budget-tracker input:focus {
    border-color: var(--primary);
}

.budget-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.budget-bar .fill {
    height: 100%;
    background: var(--success);
    width: 0%;
    transition: width 0.5s ease;
}

.budget-status {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    /* Reduced from 3rem */
    overflow-y: auto;
    position: relative;
}

.panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-header {
    margin-bottom: 1.5rem;
    /* Reduced from 3rem */
    border-bottom: 1px solid var(--border);
    /* Add line to ground it */
    padding-bottom: 1rem;
}

.panel-header h2 {
    font-size: 1.8rem;
    /* Reduced from 2.5rem */
    margin-bottom: 0.25rem;
    color: var(--primary);
    /* Use brand color */
}

.panel-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 800px;
}

.full-width {
    grid-column: span 2;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Service Matrix */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.service-card.selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

.service-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    line-height: 1.4;
}

.service-card .price {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.2rem;
}

.service-card.selected::after {
    content: "✓";
    position: absolute;
    top: 10px;
    right: 15px;
    color: var(--primary);
    font-size: 1.5rem;
}

.addons-grid {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.addon-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    cursor: pointer;
    transition: border 0.2s;
}

.addon-card:hover {
    border-color: var(--text-muted);
}

/* Buttons */
.panel-actions {
    margin-top: 4rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: white;
    color: black;
}

.btn-success {
    background: var(--success);
    color: white;
}

/* Quote Preview */
.quote-preview {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.quote-line {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.quote-line.total {
    border-bottom: none;
    border-top: 2px solid var(--border);
    margin-top: 1rem;
    padding-top: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* --- Responsive Design Improvements --- */

/* Tablet & Mobile (Max Width 900px matched with existing sidebar query) */
@media (max-width: 900px) {

    /* Form Grid becomes single column */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .full-width {
        grid-column: span 1;
    }

    /* Addons Grid becomes vertical stack */
    .addons-grid {
        flex-direction: column;
        gap: 1rem;
    }

    /* Panel Actions stack */
    .panel-actions {
        flex-direction: column-reverse;
        /* Primary button on top implies logic, but standard column is fine too. Let's do column. */
        flex-direction: column;
        margin-top: 2rem;
    }

    .btn {
        width: 100%;
        padding: 1rem;
    }

    /* Adjust Panel Padding */
    .glass-panel {
        padding: 1.5rem;
    }

    .panel-header h2 {
        font-size: 1.5rem;
    }
}

/* Mobile-Specific (Phones < 600px) */
@media (max-width: 600px) {
    :root {
        --sidebar-width: 100%;
    }

    /* Sidebar adjustments for mobile were partly in the <=900px block, ensuring consistency here */
    .steps-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        width: 100%;
        gap: 1rem;
    }

    .step {
        flex-shrink: 0;
    }

    .step-text {
        display: none;
        /* Hide text steps on very small screens to save space */
    }

    /* Show active step text only */
    .step.active .step-text {
        display: inline-block;
    }

    /* Main Content adjustments */
    .main-content {
        padding: 1rem;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }

    /* Budget Tracker - maybe hide or minimize? Keep for now but ensure it fits */
}