/* Employee Time Manager Styles */
.etm-form-container {
    max-width: 600px;
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.etm-form-container h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.etm-field-group {
    margin-bottom: 20px;
}

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

.etm-field-group input,
.etm-field-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.etm-field-group input:focus,
.etm-field-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

.etm-field-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.etm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
    margin-right: 10px;
}

.etm-btn-primary {
    background-color: #0073aa;
    color: white;
}

.etm-btn-primary:hover {
    background-color: #005a87;
}

.etm-btn-approve {
    background-color: #28a745;
    color: white;
}

.etm-btn-approve:hover {
    background-color: #218838;
}

.etm-btn-reject {
    background-color: #dc3545;
    color: white;
}

.etm-btn-reject:hover {
    background-color: #c82333;
}

.etm-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.etm-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

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

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

.etm-balance {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
    margin: 20px 0;
}

.etm-balance h3 {
    margin-top: 0;
    color: #333;
}

.balance-hours {
    font-size: 18px;
    font-weight: bold;
    color: #0073aa;
    margin: 0;
}

.etm-balance-info {
    background: #e7f3ff;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.etm-balance-info p {
    margin: 0;
    color: #0073aa;
}

/* Contenedor de tablas responsivo */
.etm-requests-table {
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.etm-requests-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Ancho mínimo para mantener legibilidad */
}

.etm-requests-table th,
.etm-requests-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    word-wrap: break-word;
}

.etm-requests-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 10;
}

.etm-request-row:hover {
    background-color: #f8f9fa;
}

.etm-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.etm-status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.etm-status-approved {
    background-color: #d4edda;
    color: #155724;
}

.etm-status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

/* Admin Panel Styles */
.etm-admin-container {
    max-width: 1200px;
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.etm-admin-container h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.etm-admin-actions {
    margin-bottom: 20px;
}

.etm-admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    min-width: 800px;
}

.etm-admin-table th,
.etm-admin-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    word-wrap: break-word;
}

.etm-admin-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.etm-admin-table tr:hover {
    background-color: #f8f9fa;
}

/* Filtros de administrador */
.etm-admin-filters {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.etm-admin-filters label {
    font-weight: bold;
    margin-right: 5px;
}

.etm-admin-filters select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 15px;
}

/* Botones inline más pequeños */
.etm-approve-inline,
.etm-reject-inline {
    padding: 6px 12px;
    font-size: 12px;
    margin: 2px;
    white-space: nowrap;
}

/* Texto muted */
.etm-text-muted {
    color: #6c757d;
    font-style: italic;
}

/* Badges para tipos de solicitud */
.etm-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
    white-space: nowrap;
    display: inline-block;
}

.etm-badge-overtime {
    background-color: #17a2b8;
}

.etm-badge-timeoff {
    background-color: #6f42c1;
}

/* RESPONSIVE DESIGN */

/* Tablets */
@media (max-width: 1024px) {
    .etm-admin-container,
    .etm-form-container {
        margin: 10px;
        padding: 15px;
    }
    
    .etm-admin-filters {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .etm-admin-filters label,
    .etm-admin-filters select {
        margin: 5px 0;
        width: 100%;
        max-width: 200px;
    }
    
    .etm-admin-filters button {
        margin-top: 10px;
        width: 100%;
        max-width: 200px;
    }
    
    .etm-requests-table,
    .etm-admin-table {
        font-size: 14px;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .etm-form-container,
    .etm-admin-container {
        margin: 5px;
        padding: 10px;
    }
    
    .etm-form-container h3,
    .etm-admin-container h3 {
        font-size: 18px;
    }
    
    /* Convertir tablas a cards en móvil */
    .etm-requests-table table,
    .etm-admin-table {
        display: none;
    }
    
    .etm-mobile-cards {
        display: block;
    }
    
    .etm-mobile-card {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .etm-mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid #eee;
    }
    
    .etm-mobile-card-body {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .etm-mobile-card-row {
        margin-bottom: 8px;
        display: flex;
        justify-content: space-between;
    }
    
    .etm-mobile-card-label {
        font-weight: bold;
        color: #555;
        margin-right: 10px;
    }
    
    .etm-mobile-card-value {
        text-align: right;
        flex-grow: 1;
    }
    
    .etm-mobile-card-actions {
        margin-top: 15px;
        padding-top: 10px;
        border-top: 1px solid #eee;
        text-align: center;
    }
    
    .etm-mobile-card-actions .etm-btn {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
    
    .etm-btn {
        padding: 10px 16px;
        font-size: 14px;
        margin: 5px 0;
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .etm-approve-inline,
    .etm-reject-inline {
        display: inline-block;
        width: 48%;
        margin: 2px 1%;
    }
    
    .etm-admin-filters {
        text-align: center;
    }
    
    .etm-admin-filters label,
    .etm-admin-filters select,
    .etm-admin-filters button {
        width: 100%;
        max-width: none;
        margin: 5px 0;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .etm-form-container,
    .etm-admin-container {
        margin: 0;
        border-radius: 0;
    }
    
    .etm-mobile-card {
        padding: 10px;
    }
    
    .etm-mobile-card-row {
        flex-direction: column;
        margin-bottom: 5px;
    }
    
    .etm-mobile-card-label {
        margin-bottom: 2px;
    }
    
    .etm-mobile-card-value {
        text-align: left;
    }
    
    .etm-approve-inline,
    .etm-reject-inline {
        width: 100%;
        margin: 5px 0;
    }
    
    .etm-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* Utilidades para ocultar/mostrar en diferentes tamaños */
.etm-desktop-only {
    display: block;
}

.etm-mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .etm-desktop-only {
        display: none;
    }
    
    .etm-mobile-only {
        display: block;
    }
}