/* Reset e Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #1a202c;
    line-height: 1.6;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo i {
    font-size: 1.5rem;
    color: #2563eb;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
}

.nav {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #64748b;
}

.nav-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.nav-btn.active {
    background: #2563eb;
    color: white;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.section.active {
    display: block;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.875rem;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
}

.stat-content p {
    color: #64748b;
    font-size: 0.875rem;
}

/* Budgets Grid */
.budgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.budget-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.budget-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.budget-title {
    font-weight: 600;
    color: #1a202c;
}

.budget-date {
    font-size: 0.75rem;
    color: #64748b;
}

.budget-client {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.budget-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 1rem;
}

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

.btn-small {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* Form Styles */
.config-form, .budget-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Photo Upload */
.photo-upload {
    position: relative;
}

.photo-preview {
    width: 120px;
    height: 120px;
    border: 2px dashed #cbd5e1;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
    overflow: hidden;
}

.photo-preview:hover {
    border-color: #2563eb;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    text-align: center;
    color: #64748b;
}

.photo-placeholder i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

#designer-photo {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Additional Costs */
.additional-costs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.cost-item label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.cost-item input {
    padding: 0.5rem;
    font-size: 0.75rem;
}

/* Calculation Preview */
.calculation-preview {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.calculation-preview h3 {
    color: #374151;
    margin-bottom: 1rem;
}

.calc-display {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
}

.calc-item, .calc-result {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.calc-result {
    border-top: 2px solid #e5e7eb;
    margin-top: 0.5rem;
    font-weight: 600;
    color: #059669;
}

/* Services Table */
.services-section {
    margin-bottom: 2rem;
}

.services-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.services-filter input,
.services-filter select {
    flex: 1;
}

.services-table {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
}

tr:hover {
    background: #f8fafc;
}

.service-checkbox {
    width: auto;
    margin: 0;
}

.quantity-input {
    width: 60px;
    padding: 0.25rem;
    font-size: 0.75rem;
}

/* Selected Services */
.selected-services {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.selected-list {
    min-height: 100px;
}

.empty-selection {
    text-align: center;
    color: #64748b;
    padding: 2rem;
}

.empty-selection i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.selected-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.selected-item:last-child {
    margin-bottom: 0;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 500;
    color: #374151;
}

.item-details {
    font-size: 0.75rem;
    color: #64748b;
}

.item-price {
    font-weight: 600;
    color: #059669;
    margin-right: 1rem;
}

.remove-item {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
}

/* Budget Summary */
.budget-summary {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.summary-content {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-top: 2px solid #e5e7eb;
    margin-top: 0.5rem;
    font-weight: 700;
    font-size: 1.125rem;
    color: #059669;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    max-width: 800px;
    width: 90%;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* PDF Preview */
.pdf-preview {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 2rem;
    font-family: 'Inter', sans-serif;
}

.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

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

.pdf-logo img {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    object-fit: cover;
}

.pdf-designer-info h2 {
    font-size: 1.5rem;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.pdf-designer-info p {
    color: #64748b;
}

.pdf-client-info {
    text-align: right;
}

.pdf-client-info h3 {
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.pdf-date {
    color: #64748b;
    font-size: 0.875rem;
}

.pdf-services {
    margin-bottom: 2rem;
}

.pdf-services h3 {
    color: #1a202c;
    margin-bottom: 1rem;
}

.pdf-services-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.pdf-services-table th,
.pdf-services-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.pdf-services-table th {
    background: #f8fafc;
    font-weight: 600;
}

.pdf-total {
    text-align: right;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
}

.pdf-total-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.pdf-total-final {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.125rem;
    color: #059669;
    border-top: 2px solid #e5e7eb;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .services-filter {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .budgets-grid {
        grid-template-columns: 1fr;
    }
    
    .additional-costs {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .pdf-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pdf-client-info {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .services-table {
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}

