/* assets/css/frontend.css */

/* ===== RESET E BASE ===== */
.uam-container * {
    box-sizing: border-box;
}

.uam-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== COMPONENTES BÁSICOS ===== */

/* Botões */
.uam-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    min-width: 120px;
}

.uam-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.uam-btn:active {
    transform: translateY(0);
}

.uam-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.uam-btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

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

.uam-btn-secondary:hover {
    background: #5a6268;
}

.uam-btn-success {
    background: #28a745;
    color: white;
}

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

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

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

.uam-btn-warning {
    background: #ffc107;
    color: #212529;
}

.uam-btn-warning:hover {
    background: #e0a800;
}

.uam-btn-info {
    background: #17a2b8;
    color: white;
}

.uam-btn-info:hover {
    background: #138496;
}

.uam-btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.uam-btn-outline:hover {
    background: #667eea;
    color: white;
}

.uam-btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    min-width: 80px;
}

.uam-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Cards */
.uam-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e9ecef;
}

.uam-card h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

/* ===== ÁREA DE LOGIN ===== */
.uam-login-wrapper {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    padding: 40px;
    border: 1px solid #e9ecef;
}

.uam-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.uam-login-header h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

.uam-login-header p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.uam-login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.uam-login-footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.uam-login-footer a:hover {
    text-decoration: underline;
}

/* ===== FORMULÁRIOS ===== */
.uam-form {
    width: 100%;
}

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

.uam-form-row {
    display: flex;
    gap: 15px;
}

.uam-form-row .uam-form-group {
    flex: 1;
}

.uam-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

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

.uam-form-group input:focus,
.uam-form-group select:focus,
.uam-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.uam-checkbox-group {
    display: flex;
    align-items: center;
}

.uam-checkbox-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
}

.uam-checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.uam-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* ===== DASHBOARD DO USUÁRIO ===== */
.uam-dashboard {
    max-width: 1000px;
    margin: 0 auto;
}

.uam-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.uam-user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.uam-avatar-container {
    position: relative;
}

.uam-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.uam-avatar-overlay {
    position: absolute;
    bottom: -5px;
    right: -5px;
}

.uam-avatar-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.uam-avatar-btn:hover {
    background: white;
    transform: scale(1.05);
}

.uam-user-details h2 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
}

.uam-user-email {
    margin: 0 0 5px 0;
    opacity: 0.9;
    font-size: 14px;
}

.uam-member-since {
    margin: 0;
    opacity: 0.8;
    font-size: 12px;
}

.uam-dashboard-actions {
    display: flex;
    gap: 12px;
}

/* ===== EDIÇÃO DE PERFIL ===== */
.uam-edit-profile {
    margin-bottom: 30px;
}

.uam-edit-profile .uam-card {
    border-left: 4px solid #667eea;
}

/* ===== SISTEMA DE ABAS ===== */
.uam-tabs {
    margin-top: 30px;
}

.uam-tab-nav {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
    gap: 4px;
}

.uam-tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.uam-tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.uam-tab-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.uam-tab-content {
    display: none;
}

.uam-tab-content.active {
    display: block;
}

/* ===== LISTAS DE ATIVIDADES ===== */
.uam-activities-list {
    max-height: 400px;
    overflow-y: auto;
}

.uam-activity-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
}

.uam-activity-item:hover {
    background: #f8f9fa;
}

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

.uam-activity-icon {
    font-size: 24px;
    margin-right: 16px;
    width: 40px;
    text-align: center;
}

.uam-activity-content {
    flex: 1;
}

.uam-activity-title {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
}

.uam-activity-date {
    font-size: 12px;
    color: #6c757d;
}

/* ===== RESERVAS ===== */
.uam-reservations-list {
    display: grid;
    gap: 20px;
}

.uam-reservation-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.uam-reservation-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.uam-reservation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.uam-reservation-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.uam-reservation-details {
    margin-bottom: 16px;
    color: #6c757d;
    font-size: 14px;
}

.uam-reservation-details p {
    margin: 8px 0;
}

.uam-reservation-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ===== STATUS BADGES ===== */
.uam-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.uam-status-active {
    background: #d4edda;
    color: #155724;
}

.uam-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.uam-status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

/* ===== DOWNLOADS ===== */
.uam-downloads-list {
    max-height: 400px;
    overflow-y: auto;
}

.uam-download-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
}

.uam-download-item:hover {
    background: #f8f9fa;
}

.uam-download-icon {
    font-size: 24px;
    margin-right: 16px;
    width: 40px;
    text-align: center;
}

.uam-download-content {
    flex: 1;
}

.uam-download-name {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
}

.uam-download-details {
    font-size: 12px;
    color: #6c757d;
}

.uam-download-size {
    margin-left: 8px;
}

.uam-download-actions {
    margin-left: 16px;
}

/* ===== MENSAGENS ===== */
.uam-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 14px;
    font-weight: 500;
}

.uam-message.uam-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.uam-message.uam-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.uam-message.uam-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.uam-message.uam-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ===== LOADING SPINNER ===== */
.uam-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.uam-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: uam-spin 1s linear infinite;
}

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

/* ===== SEM DADOS ===== */
.uam-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

.uam-no-reservations {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.uam-no-data-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.uam-no-reservations h4 {
    margin: 16px 0 8px 0;
    color: #495057;
}

/* ===== MODAIS ===== */
.uam-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.uam-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: uam-modal-appear 0.3s ease;
}

@keyframes uam-modal-appear {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.uam-modal-header {
    padding: 24px 24px 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.uam-modal-header h2,
.uam-modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.uam-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.uam-modal-close:hover {
    background: #f8f9fa;
    color: #495057;
}

.uam-modal-body {
    padding: 24px;
}

.uam-modal-footer {
    padding: 0 24px 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .uam-container {
        padding: 15px;
    }
    
    .uam-dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .uam-user-info {
        flex-direction: column;
        text-align: center;
    }
    
    .uam-dashboard-actions {
        justify-content: center;
    }
    
    .uam-tab-nav {
        flex-direction: column;
    }
    
    .uam-form-row {
        flex-direction: column;
    }
    
    .uam-reservation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .uam-reservation-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .uam-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .uam-login-wrapper {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .uam-btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .uam-form-actions {
        flex-direction: column;
    }
    
    .uam-dashboard-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .uam-reservation-actions {
        flex-direction: column;
    }
    
    .uam-modal-footer {
        flex-direction: column;
    }
}

/* ===== GERENCIAMENTO DE RESERVAS ===== */
.uam-reservation-management {
    max-width: 1000px;
    margin: 0 auto;
}

.uam-reservation-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: end;
}

.uam-filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.uam-filter-group label {
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 4px;
}

.uam-filter-group select,
.uam-filter-group input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.uam-reservations-container {
    display: grid;
    gap: 20px;
}

.uam-reservation-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 24px;
    transition: all 0.3s ease;
}

.uam-reservation-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.uam-reservation-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.uam-reservation-title h4 {
    margin: 0;
    color: #2c3e50;
}

.uam-reservation-id {
    font-size: 12px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
}

.uam-reservation-status {
    margin-left: 16px;
}

.uam-status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.uam-reservation-body {
    margin: 16px 0;
}

.uam-reservation-info {
    display: grid;
    gap: 8px;
}

.uam-info-item {
    font-size: 14px;
    color: #495057;
}

.uam-info-item strong {
    color: #2c3e50;
}

.uam-reservation-additional {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.uam-reservation-additional h5 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 14px;
}

.uam-additional-info {
    display: grid;
    gap: 6px;
}