:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --text-color: #333;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
}

#listaCupones{
    padding: 0px;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

header {
    position: relative;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    height: 40px;
    width: auto;
}

h1 {
    margin: 0;
    font-size: 1.5rem;
}

h2, h3 {
    margin-bottom: 1rem;
}

#loginContainer {
    max-width: 300px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#loginForm input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

button:disabled {
    background-color: var(--secondary-color);
    cursor: not-allowed;
}

#mainNav {
    display: flex;
    justify-content: space-around;
    background-color: white;
    padding: 0.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#mainNav button {
    background-color: transparent;
    color: var(--primary-color);
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: none;
}

#mainNav button i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

#content {
    max-width: 800px;
    margin: 1rem auto;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#filtros {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

#filtros button {
    flex: 1;
    margin: 0 0.25rem;
    white-space: nowrap;
}

.cupon-item, .sorteo-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.3s ease;
}

.cupon-item:hover, .sorteo-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.cupon-item h3, .sorteo-item h3 {
    color: var(--primary-color);
}

.cupon-item.approved {
    border-left: 5px solid var(--success-color);
}

.cupon-item.rejected {
    border-left: 5px solid var(--danger-color);
}

.cupon-item.pending {
    border-left: 5px solid var(--warning-color);
}

.offer-actions, .sorteo-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.offer-actions button, .sorteo-actions button {
    margin-left: 0.5rem;
}

#logoutBtn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: transparent;
    color: white;
    border: 1px solid white;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#logoutBtn:hover {
    background-color: white;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

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

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

#nuevoSorteoForm button[type="submit"] {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#nuevoSorteoForm button[type="submit"]:hover {
    background-color: #0056b3;
}

.winner-info {
    background-color: #e9ecef;
    border-left: 5px solid #28a745;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 4px;
}

.winner-info h4 {
    color: #28a745;
    margin-bottom: 0.5rem;
}

.winner-info p {
    margin: 0.25rem 0;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-controls button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.calendar-controls input[type="date"] {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.oferta-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.oferta-item h4 {
    color: var(--primary-color);
    margin-top: 0;
}

.business-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.business-item.disabled {
    opacity: 0.7;
    border-left: 5px solid var(--danger-color);
}

.business-item.enabled {
    border-left: 5px solid var(--success-color);
}

.business-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.business-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.business-status.enabled {
    background-color: var(--success-color);
    color: white;
}

.business-status.disabled {
    background-color: var(--danger-color);
    color: white;
}

.business-details {
    margin: 1rem 0;
}

.business-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.business-actions button {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.business-actions .edit-btn {
    background-color: var(--primary-color);
}

.business-actions .toggle-btn {
    background-color: var(--warning-color);
}

.business-actions .delete-btn {
    background-color: var(--danger-color);
}

.admin-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.admin-businesses {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 3px solid var(--primary-color);
}

.admin-business-item {
    background: #f8f9fa;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 6px;
}

.admin-business-item h4 {
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
}

.admin-business-item p {
    margin: 0.25rem 0;
    font-size: 0.9em;
    color: #666;
}

.admin-business-item i {
    width: 20px;
    color: var(--primary-color);
}

.business-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.business-item-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-business-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    gap: 4px;
}

.edit-business-btn i {
    color: white;
}

.toggle-business-btn {
    background: var(--warning-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8em;
}

.toggle-business-btn i {
    color: white;
}

.business-status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.business-status-badge.enabled {
    background-color: var(--success-color);
    color: white;
}

.business-status-badge.disabled {
    background-color: var(--danger-color);
    color: white;
}

.business-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-business-item.disabled {
    opacity: 0.7;
    border-left: 3px solid var(--danger-color);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.save-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.cancel-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.delete-business-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8em;
}

.delete-business-btn i {
    color: white;
}

.user-limits {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 3px solid var(--primary-color);
}

.user-limits h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
}

.user-limits p {
    margin: 0.25rem 0;
    font-size: 0.9em;
}

.user-limits i {
    width: 20px;
    color: var(--primary-color);
}

input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 0.25rem;
}

.cupon-dates {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin: 0.5rem 0;
    border-left: 3px solid var(--primary-color);
}

.cupon-dates p {
    margin: 0.25rem 0;
}

.edit-dates-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.edit-dates-btn i {
    color: white;
}

/* Estilos para el modal de SweetAlert2 */
.swal2-popup .form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.swal2-popup .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
}

.swal2-popup input[type="datetime-local"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 0.25rem;
}

.notifications-panel {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.notification-form {
    max-width: 600px;
    margin: 0 auto;
}

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

.notification-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.notification-form input,
.notification-form select,
.notification-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.notification-form textarea {
    height: 120px;
    resize: vertical;
}

.notification-status {
    margin-top: 20px;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

/* Estilos para el formulario de usuario */
.user-form-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    z-index: 1000;
}

.user-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.gender-selector {
    display: flex;
    gap: 0.5rem;
}

.gender-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gender-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.form-actions button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary {
    background: #007bff;
    color: white;
}

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

@media (max-width: 480px) {
    .gender-selector {
        flex-direction: column;
    }
}

/* Estilos para el panel de negocios */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.panel-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn i {
    font-size: 1rem;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

@media (max-width: 768px) {
    .panel-header {
        flex-direction: column;
        gap: 1rem;
    }

    .panel-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

.businesses-panel {
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.image-upload-container {
    margin-top: 10px;
}

.image-input {
    margin-bottom: 10px;
}

.image-preview-container {
    position: relative;
    width: 200px;
    height: 200px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.image-preview-container.has-image {
    border-style: solid;
}

.image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.remove-image-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

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

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close-btn:hover {
    color: #333;
}
