/* Custom Properties - Event Management UI Inspired */
:root {
    --primary-blue: #8B5CF6;
    --primary-purple: #8B5CF6;
    --primary-pink: #EC4899;
    --primary-light: #A78BFA;
    --primary-dark: #7C3AED;
    --primary-subtle: #F3F4F6;
    --success-green: #10B981;
    --warning-orange: #F59E0B;
    --error-red: #EF4444;
    --bg-white: #FFFFFF;
    --bg-page: #F8F7FF;
    --bg-gray-light: #F9FAFB;
    --bg-gray: #F3F4F6;
    --text-dark: #1F2937;
    --text-gray: #6B7280;
    --text-light: #9CA3AF;
    --border-gray: #E5E7EB;
    --border-gray-dark: #D1D5DB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Phase backgrounds */
    --phase-audit: #F3F4F6;
    --phase-research: #EFF6FF;
    --phase-strategy: #FFFBEB;
    --phase-wireframes: #F9FAFB;
    --phase-ui: #FDF2F8;
    --phase-system: #F0FDF4;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-page);
}

/* Layout */
.app-container {
    display: grid;
    grid-template-columns: 60% 40%;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 100vh;
    gap: 1rem;
    padding: 0;
}

.left-column {
    background-color: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin: 1rem 0 1rem 1rem;
    padding: 2.5rem 2rem;
}

.left-content {
    max-width: 800px;
}

.right-column {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-white);
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2rem;
    margin: 0;
}

/* Title Section */
.title-section {
    margin-bottom: 2.5rem;
}

.title-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.title-section p {
    font-size: 1.125rem;
    color: var(--text-gray);
    font-weight: 400;
}

/* Project Settings */
.project-settings-container {
    margin-bottom: 2rem;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-gray-light);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.settings-header:hover {
    background: var(--bg-gray);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.settings-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chevron {
    transition: transform 0.2s;
}

.chevron.expanded {
    transform: rotate(180deg);
}

.settings-content {
    background: white;
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.settings-content.collapsed {
    display: none;
}

.settings-group {
    margin-bottom: 1.5rem;
}

.settings-group:last-child {
    margin-bottom: 0;
}

.settings-group h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.375rem;
}

.input-helper {
    display: block;
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-top: 0.25rem;
}

.input-group input[type="number"],
input[type="number"] {
    width: 100px;
    max-width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-gray-dark);
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    -moz-appearance: textfield; /* Firefox */
}

/* Hide number input arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-small {
    width: 60px !important;
}

.input-medium {
    width: 80px !important;
}

.input-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-gray-light);
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
}

.checkbox-group label {
    flex: 1;
    font-size: 0.875rem;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.checkbox-group input[type="number"] {
    width: 80px;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border-gray-dark);
    border-radius: 4px;
    font-size: 0.875rem;
}

/* Number Input with +/- Buttons */
.number-input-group {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-increment {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-gray);
    background: white;
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.btn-increment:hover {
    background: var(--bg-gray);
    border-color: var(--border-gray-dark);
    color: var(--text-dark);
}

.btn-increment:active {
    transform: scale(0.95);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #D1D5DB;
    transition: 0.2s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-blue);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(16px);
}

.toggle-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.toggle-line.disabled {
    opacity: 0.6;
    background: #FAFAFA;
}

.toggle-line.disabled input[type="number"],
.toggle-line.disabled .btn-increment {
    pointer-events: none;
    opacity: 0.5;
}

.toggle-line .config-label {
    font-size: 0.875rem;
    margin: 0;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.toggle-line .config-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* Hours Chip */
.hours-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    user-select: none;
}

.hours-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hours-chip.zero {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FCD34D;
}

.hours-chip.zero:hover {
    background: #FDE68A;
}

.hours-chip.positive {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.hours-chip.positive:hover {
    background: rgba(139, 92, 246, 0.15);
}

/* Warning Banner */
.warning-banner {
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #92400E;
    font-size: 0.875rem;
}

.warning-banner svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* Currency Selector */
.currency-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.currency-select {
    width: 80px;
    padding: 0.625rem 0.5rem;
    border: 1px solid var(--border-gray-dark);
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

/* Searchable Currency Selector */
.currency-selector {
    position: relative;
}

.currency-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border-gray-dark);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    min-width: 100px;
}

.currency-button:hover {
    border-color: var(--primary-purple);
    background: var(--bg-gray);
}

.currency-button.open {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.currency-code {
    font-weight: 600;
    color: var(--text-dark);
}

.currency-symbol {
    color: var(--text-gray);
    font-size: 0.875rem;
}

.chevron-icon {
    width: 16px;
    height: 16px;
    color: var(--text-gray);
    transition: transform 0.2s;
}

.currency-button.open .chevron-icon {
    transform: rotate(180deg);
}

.currency-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 1000;
    background: white;
    border: 1px solid var(--border-gray-dark);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 300px;
    max-height: 360px;
    display: flex;
    flex-direction: column;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.currency-search-wrapper {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-gray);
}

.currency-search {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-gray-dark);
    border-radius: 6px;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.currency-search:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.currency-list {
    overflow-y: auto;
    max-height: 280px;
}

.currency-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    transition: background 0.15s;
}

.currency-option:hover,
.currency-option.highlighted {
    background: var(--bg-gray);
}

.currency-option.selected {
    background: rgba(139, 92, 246, 0.08);
    color: var(--primary-blue);
}

.currency-option.selected .currency-code-option {
    color: var(--primary-blue);
    font-weight: 600;
}

.currency-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.currency-code-option {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-dark);
    min-width: 40px;
}

.currency-name {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

.currency-symbol-option {
    font-size: 0.875rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* Phases Section */
.phases-section {
    margin-top: 2rem;
}

.phases-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.empty-state {
    background: var(--bg-gray-light);
    border: 2px dashed var(--border-gray);
    border-radius: 8px;
    padding: 0;
    text-align: center;
    margin-bottom: 1rem;
}

/* Phase Card */
/* Hours chip */
.hours-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.hours-chip.zero {
    background-color: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.hours-chip.positive {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--primary-purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.phase-card {
    background: white;
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.phase-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.phase-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-gray-light);
    cursor: pointer;
    transition: background 0.2s;
}

.phase-header:hover {
    background: var(--bg-gray);
}

.drag-handle {
    cursor: grab;
    color: var(--text-gray);
    font-size: 1.25rem;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.phase-icon {
    font-size: 1.5rem;
}

.phase-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.phase-hours {
    font-size: 0.875rem;
    color: var(--text-gray);
    font-weight: 500;
}

.phase-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-gray);
    transition: color 0.2s;
}

.btn-icon:hover {
    color: var(--text-dark);
}

.btn-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.btn-delete:hover {
    color: #EF4444;
}

.phase-body {
    padding: 1.25rem;
    max-height: 5000px;
    transition: max-height 0.2s ease-out;
    overflow: hidden;
}

.phase-body.collapsed {
    max-height: 0;
    padding: 0 1.25rem;
}

/* Config Block */
.config-block {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.config-block:nth-child(even) {
    background: var(--bg-gray-light);
}

.config-block:last-child {
    margin-bottom: 0;
}

.config-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.config-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    margin-left: auto;
}

.config-input input[type="number"] {
    width: 80px;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border-gray-dark);
    border-radius: 4px;
    font-size: 0.875rem;
}

.config-input input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.config-result {
    font-size: 0.875rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.radio-option:hover {
    background: var(--bg-gray-light);
}

.radio-option input[type="radio"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.radio-option label {
    flex: 1;
    font-size: 0.875rem;
    cursor: pointer;
}

.radio-option.selected {
    background: rgba(139, 92, 246, 0.05);
    border-color: var(--primary-blue);
}

/* Device Selector */
.device-selector {
    display: inline-flex;
    gap: 0.5rem;
}

/* Button Selector Group (for Style Exploration, System Scope) */
.button-selector-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.button-selector {
    flex: 1;
    min-width: 100px;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--border-gray);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.button-selector:hover {
    border-color: var(--primary-blue);
    background: rgba(139, 92, 246, 0.02);
}

.button-selector.selected {
    border-color: var(--primary-blue);
    background: rgba(139, 92, 246, 0.08);
}

.button-selector-title {
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.button-selector-subtitle {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

.device-btn {
    padding: 0.625rem 1rem;
    background: white;
    border: 1px solid var(--border-gray-dark);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-gray);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.device-btn:hover {
    background: var(--bg-gray-light);
    border-color: var(--primary-purple);
}

.device-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.device-btn svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* Phase Footer */
.phase-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-gray);
}

.phase-buffer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.phase-buffer label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
}

.phase-buffer input {
    width: 80px;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border-gray-dark);
    border-radius: 4px;
    font-size: 0.875rem;
}

.tooltip-icon {
    cursor: help;
    color: var(--text-gray);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tooltip-icon svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tooltip-icon:hover {
    color: var(--primary-blue);
    background-color: rgba(139, 92, 246, 0.1);
    transform: scale(1.1);
}

.tooltip-icon:hover svg {
    transform: scale(1.1);
}

.tooltip-icon:active {
    transform: scale(0.95);
}

.phase-total {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Add Phase */
.add-phase-section {
    position: relative;
    margin-top: 1rem;
}

.add-phase-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: white;
    border: 2px dashed var(--border-gray);
    border-radius: 12px;
    color: var(--text-gray);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.add-phase-btn:hover {
    border-color: var(--primary-purple);
    color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.02);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.phase-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 100;
    overflow: hidden;
}

.phase-dropdown.hidden {
    display: none;
}

.phase-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem;
    background: white;
    border: none;
    border-bottom: 1px solid var(--border-gray);
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.phase-option:last-child {
    border-bottom: none;
}

.phase-option:hover {
    background: var(--bg-gray-light);
}

/* Estimate Panel */
.estimate-panel {
    position: sticky;
    top: 0;
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.estimate-header {
    margin-bottom: 2rem;
}

.estimate-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.price-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.price-display.pulse {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.price-subtext {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.hours-display {
    font-size: 1.125rem;
    color: var(--primary-purple);
    margin-top: 0.5rem;
}

.estimate-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-gray);
}

.estimate-section:last-of-type {
    border-bottom: none;
}

.estimate-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.phase-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-gray-light);
    border-radius: 6px;
}

.phase-item-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
}

.phase-item-hours {
    font-size: 0.875rem;
    color: var(--primary-purple);
}

.adjustment-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.estimate-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary:hover:not(:disabled) {
    background: #7C3AED;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-primary:disabled {
    background: var(--border-gray);
    cursor: not-allowed;
}

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

.btn-secondary:hover {
    background: var(--bg-gray-light);
    border-color: var(--border-gray-dark);
}

/* Buy Me a Coffee */
.buy-coffee-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #1F2937;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s;
    z-index: 1000;
    color: white;
}

.buy-coffee-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(31, 41, 55, 0.4);
}

.buy-coffee-btn:hover::after {
    content: "Buy me a coffee";
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #1F2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    margin-right: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1001;
}

/* Tooltips */
[title] {
    position: relative;
}

/* Focus States */
*:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Mobile Responsive */
/* Desktop-only responsive adjustments */
@media (max-width: 1200px) {
    .app-container {
        max-width: 1400px;
    }
}

@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0;
    }
    
    .left-column {
        position: relative;
        height: auto;
        margin: 0.5rem;
        padding-bottom: 400px;
    }
    
    .right-column {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: auto;
        max-height: 60vh;
        border-radius: 0;
        padding: 1.5rem;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
        margin: 0;
    }
    
    .buy-coffee-btn {
        width: 48px;
        height: 48px;
        bottom: 16px;
        right: 16px;
        border-radius: 50%;
    }
}

/* Mobile Message */
.mobile-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
}

.mobile-content {
    text-align: center;
    color: white;
    max-width: 400px;
}

.mobile-icon {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.mobile-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.mobile-text {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    opacity: 0.9;
}

.mobile-cta {
    margin-top: 2rem;
}

.mobile-btn {
    display: inline-block;
    background: white;
    color: #8B5CF6;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mobile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: #7C3AED;
}

/* Utility Classes */
.hidden {
    display: none;
}


/* Modal Component */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-backdrop.modal-open {
    opacity: 1;
}

.modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 90vw;
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.modal-open .modal-container {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-gray);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-gray);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}

/* Phase Selection Modal */
.phase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 0 0 1rem 0;
}

.phase-option {
    padding: 1rem;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 72px;
}

.phase-option:hover {
    border-color: var(--primary-blue);
    background: var(--bg-gray);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.phase-option-icon {
    font-size: 1.75rem;
}

.phase-option-info {
    flex: 1;
}

.phase-option-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.phase-option-desc {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

/* NEW MODAL STYLES - Fixed Height Approach */
.modal-backdrop-new {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 2rem;
}

.modal-backdrop-new.modal-open {
    opacity: 1;
}

.modal-container-new {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 750px;
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.modal-open .modal-container-new {
    transform: scale(1);
}

.modal-header-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-gray);
    flex-shrink: 0;
}

.modal-title-new {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.modal-close-btn-new {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-gray);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn-new:hover {
    color: var(--text-dark);
}

.modal-body-new {
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}

/* Phase Selection Modal - New Grid */
.phase-grid-new {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 0 0 1rem 0;
}

.phase-option-new {
    padding: 1rem;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 72px;
}

.phase-option-new:hover {
    border-color: var(--primary-blue);
    background: var(--bg-gray);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.phase-option-icon-new {
    font-size: 1.75rem;
}

.phase-option-info-new {
    flex: 1;
}

.phase-option-name-new {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.phase-option-desc-new {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

/* Icon Container */
.icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    color: var(--primary-purple);
    flex-shrink: 0;
}

/* Empty State Icons */
.empty-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    margin-bottom: 1rem;
}

.empty-state-icon-large {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    margin-bottom: 1.5rem;
}


/* Phase Icons - Standardized for both panels */
.phase-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 6px;
    color: var(--primary-purple);
    flex-shrink: 0;
    margin-right: 0.5rem;
}

/* Hours Breakdown Modal */
.breakdown-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.breakdown-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.breakdown-item:first-child {
    padding-top: 0.5rem;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-label {
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.5;
    flex: 1;
}

.breakdown-value {
    color: var(--text-gray);
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}

.breakdown-multiplier {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-purple);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.breakdown-total {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-gray-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Confirmation Modal specific styles */
.btn-cancel {
    padding: 0.75rem 1.5rem;
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-cancel:hover {
    background: #E5E7EB;
    border-color: #9CA3AF;
}

.btn-confirm {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-confirm.btn-primary {
    background: var(--primary-purple);
    border: 1px solid var(--primary-purple);
}

.btn-confirm.btn-primary:hover {
    background: #7C3AED;
    border-color: #7C3AED;
}

.btn-confirm.btn-danger {
    background: #EF4444;
    border: 1px solid #EF4444;
}

.btn-confirm.btn-danger:hover {
    background: #DC2626;
    border-color: #DC2626;
}
