/* De Souza Aranha CRM Frontend Styles */
* {
    box-sizing: border-box;
}

.dsa-crm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

/* Login Form Styles */
.dsa-login-form {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dsa-login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

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

.dsa-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.dsa-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.dsa-form-group input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 5px rgba(0,124,186,0.3);
}

.dsa-btn {
    background: #007cba;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.dsa-btn:hover {
    background: #005a87;
}

.dsa-btn-full {
    width: 100%;
}

.dsa-btn-danger {
    background: #dc3545;
}

.dsa-btn-danger:hover {
    background: #c82333;
}

.dsa-btn-success {
    background: #28a745;
}

.dsa-btn-success:hover {
    background: #218838;
}

/* Dashboard Styles */
.dsa-dashboard {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.dsa-user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.dsa-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dsa-stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.dsa-stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #007cba;
    margin-bottom: 10px;
}

.dsa-stat-label {
    color: #666;
    font-size: 14px;
}

.dsa-navigation {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Process List Styles */
.dsa-filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.dsa-filter-row {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.dsa-filter-group {
    flex: 1;
    min-width: 150px;
}

.dsa-process-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.dsa-process-table th {
    background: #007cba;
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-weight: bold;
}

.dsa-process-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
}

.dsa-process-table tr:nth-child(even) {
    background: #f8f9fa;
}

.dsa-process-table tr:hover {
    background: #e3f2fd;
}

.dsa-process-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.dsa-btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Import Styles */
.dsa-import-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.dsa-file-input {
    margin-bottom: 15px;
}

.dsa-file-input input[type="file"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

.dsa-progress {
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
    display: none;
}

.dsa-progress-bar {
    background: #007cba;
    height: 20px;
    transition: width 0.3s;
    color: white;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
}

/* Alert Messages */
.dsa-alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid;
}

.dsa-alert-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.dsa-alert-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.dsa-alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

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

.dsa-modal-content {
    background: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.dsa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.dsa-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading Spinner */
.dsa-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: dsa-spin 1s linear infinite;
}

@keyframes dsa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dsa-crm-container {
        padding: 10px;
    }

    .dsa-user-info {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .dsa-stats-grid {
        grid-template-columns: 1fr;
    }

    .dsa-navigation {
        flex-direction: column;
    }

    .dsa-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .dsa-process-table {
        font-size: 12px;
    }

    .dsa-process-table th,
    .dsa-process-table td {
        padding: 8px 5px;
    }

    .dsa-process-actions {
        flex-direction: column;
    }

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

@media (max-width: 480px) {
    .dsa-login-form {
        padding: 20px;
        margin: 20px auto;
    }

    .dsa-process-table {
        font-size: 10px;
    }

    .dsa-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .dsa-navigation,
    .dsa-btn,
    .dsa-process-actions {
        display: none;
    }

    .dsa-process-table {
        font-size: 10px;
    }

    .dsa-crm-container {
        padding: 0;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .dsa-process-table th {
        background: #000;
        color: #fff;
    }

    .dsa-btn {
        border: 2px solid #000;
    }
}
