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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
}

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

/* Header Styles - Odoo-like */
.app-header {
    background: linear-gradient(135deg, #875a7b 0%, #6f4c93 100%);
    color: white;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    height: 60px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    color: #ffffff;
}

.logo-section h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-item {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(255,255,255,0.15);
    color: white;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.9);
}

.user-section i {
    font-size: 24px;
}

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

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: #6c757d;
    font-size: 14px;
}

.breadcrumb i {
    font-size: 12px;
}

/* Page Header */
.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.page-header h2 i {
    color: #e74c3c;
}

.page-description {
    color: #6c757d;
    font-size: 16px;
}

/* Card Styles */
.form-card,
.list-card,
.links-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.card-header {
    background: #f8f9fa;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Links Container */
.links-container {
    padding: 25px;
}

.link-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    margin-bottom: 15px;
}

.link-item:hover {
    background: #fff;
    border-color: #875a7b;
    box-shadow: 0 4px 15px rgba(135, 90, 123, 0.1);
    transform: translateY(-2px);
}

.link-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #875a7b 0%, #6f4c93 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.link-icon i {
    font-size: 24px;
    color: white;
}

.link-content {
    flex: 1;
}

.link-content h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.link-content p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

.link-arrow {
    color: #875a7b;
    font-size: 18px;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.link-item:hover .link-arrow {
    transform: translateX(5px);
}

/* Form Styles */
.error-form {
    padding: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #875a7b;
    box-shadow: 0 0 0 3px rgba(135, 90, 123, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.file-upload-area:hover {
    border-color: #875a7b;
    background-color: #f8f9fa;
}

.file-upload-area.dragover {
    border-color: #875a7b;
    background-color: rgba(135, 90, 123, 0.05);
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-content i {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 15px;
}

.file-upload-content p {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.file-upload-content small {
    color: #6c757d;
    font-size: 12px;
}

/* File List */
.file-list {
    margin-top: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-info i {
    color: #875a7b;
}

.remove-file {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.remove-file:hover {
    background-color: rgba(231, 76, 60, 0.1);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #875a7b 0%, #6f4c93 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(135, 90, 123, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid #875a7b;
    color: #875a7b;
}

.btn-outline:hover {
    background: #875a7b;
    color: white;
}

.btn-icon {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background-color: #f8f9fa;
    color: #875a7b;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-finance {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.badge-construction {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.badge-project {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.badge-sales {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Status */
.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background-color: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.status-resolved {
    background-color: rgba(40, 167, 69, 0.1);
    color: #155724;
}

.status-rejected {
    background-color: rgba(220, 53, 69, 0.1);
    color: #721c24;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.success-icon {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 15px;
}

.modal-header h3 {
    color: #2c3e50;
    font-size: 20px;
    margin: 0;
}

.modal-body {
    padding: 25px;
    text-align: center;
}

.modal-body p {
    color: #6c757d;
    font-size: 16px;
    line-height: 1.6;
}

.modal-actions {
    padding: 20px 25px;
    display: flex;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }

    .nav-menu {
        gap: 15px;
    }

    .nav-item {
        font-size: 14px;
        padding: 6px 12px;
    }

    .main-content {
        padding: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-actions {
        flex-direction: column;
    }

    .header-actions {
        flex-direction: column;
        gap: 8px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .page-header h2 {
        font-size: 24px;
    }

    .card-header {
        padding: 15px 20px;
    }

    .error-form {
        padding: 20px;
    }

    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Animation */
.success-animation {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
