/* assets/css/style.css */

:root {
    --primary-color: #000080;
    --primary-dark: #000060;
    --primary-light: #0000a0;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --border-color: #e0e0e0;
    --text-dark: #333333;
    --text-light: #666666;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --shadow: 0 2px 10px rgba(0, 0, 128, 0.1);
    --shadow-lg: 0 5px 25px rgba(0, 0, 128, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

/* Header & Navigation */
.navbar {
    background: var(--primary-color);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.navbar-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.navbar-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.card-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 128, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 1.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

table thead {
    background: var(--primary-color);
    color: var(--white);
}

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table tbody tr {
    transition: all 0.3s ease;
}

table tbody tr:hover {
    background: var(--light-gray);
    transform: scale(1.01);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-pending {
    background: var(--warning);
    color: var(--text-dark);
}

.badge-approved {
    background: var(--success);
    color: var(--white);
}

.badge-rejected {
    background: var(--danger);
    color: var(--white);
}

.badge-confirmed {
    background: var(--primary-color);
    color: var(--white);
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Estimation Builder */
.estimation-wizard {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.wizard-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.wizard-step.active .step-circle {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    animation: pulse 1s infinite;
}

.wizard-step.completed .step-circle {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

.step-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.wizard-step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Playground */
.playground-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.playground {
    background: var(--light-gray);
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    min-height: 500px;
}

.playground-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.module-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.module-tab {
    padding: 0.5rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.module-tab.active,
.module-tab:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.product-item {
    background: var(--white);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.product-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.product-price {
    color: var(--primary-color);
    font-weight: 700;
}

/* Room Items */
.room-section {
    background: var(--white);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--light-gray);
    border-radius: 5px;
    margin-bottom: 1rem;
    cursor: pointer;
}

.room-header h4 {
    color: var(--primary-color);
    margin: 0;
}

.selected-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--light-gray);
    border-radius: 5px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.selected-item:hover {
    background: var(--border-color);
    transform: translateX(5px);
}

.item-delete {
    background: var(--danger);
    color: var(--white);
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.item-delete:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Room Input */
.room-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.room-input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.room-input-group input {
    flex: 1;
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.5rem;
}

/* Summary */
.summary-table {
    margin: 2rem 0;
}

.summary-total {
    background: var(--primary-color);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.summary-total h3 {
    margin: 0 0 1rem 0;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.margin-adjuster {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.margin-slider {
    width: 100%;
    margin: 1rem 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideInRight 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    animation: slideInLeft 0.3s ease;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning);
}

/* Loading Spinner */
.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .playground-container {
        grid-template-columns: 1fr;
    }
    
    .navbar-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .wizard-steps {
        flex-wrap: wrap;
    }
}

/* Transitions */
.fade-enter {
    opacity: 0;
}

.fade-enter-active {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.fade-exit {
    opacity: 1;
}

.fade-exit-active {
    opacity: 0;
    transition: opacity 0.3s ease;
}