:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* Header responsive */
.main-header {
    background-color: var(--dark-color);
    color: white;
    padding: 10px 0;
}

.main-header .container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .main-header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
}

@media (min-width: 768px) {
    .logo h1 {
        font-size: 1.8rem;
        text-align: left;
    }
}

.logo span {
    color: var(--primary-color);
}

.main-nav {
    display: flex;
    justify-content: center;
}

@media (min-width: 768px) {
    .main-nav {
        justify-content: flex-end;
    }
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px;
    margin: 15px 0;
    overflow-x: auto; /* Para tablas en móvil */
}

@media (min-width: 768px) {
    .card {
        padding: 20px;
        margin: 20px 0;
    }
}

/* Login Container */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 150px);
    padding: 15px;
}

.login-container {
    width: 100%;
    max-width: 450px;
    margin: 20px 0;
}

.login-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    padding: 30px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

@media (min-width: 768px) {
    .login-card {
        padding: 40px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo {
    margin-bottom: 20px;
}

.login-logo .icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .login-logo .icon {
        font-size: 3.5rem;
    }
}

.login-title {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 5px;
}

@media (min-width: 768px) {
    .login-title {
        font-size: 1.8rem;
    }
}

.login-subtitle {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .login-subtitle {
        margin-bottom: 30px;
        font-size: 1rem;
    }
}

.divider {
    display: flex;
    align-items: center;
    margin: 15px 0;
    color: #999;
    font-size: 0.9rem;
}

.divider::before, .divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #eee;
}

.divider::before {
    margin-right: 10px;
}

.divider::after {
    margin-left: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s ease;
    border: 2px solid;
    width: 100%; /* Botones full width en móvil */
}

@media (min-width: 480px) {
    .btn {
        width: auto;
        padding: 12px 20px;
        font-size: 1rem;
    }
}

.btn:hover {
    background: var(--light-color);
    color: var(--primary-color);  
    border: 2px solid black;
    border-color: var(--primary-color);
}

.btn-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: darkgrey;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: not-allowed;
    text-decoration: none;
    font-size: 0.9rem;
    width: 100%;
}

@media (min-width: 480px) {
    .btn-disabled {
        width: auto;
        padding: 10px 20px;
        font-size: 1rem;
    }
}

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover{
    background: #FCC6BB;
    color: var(--danger-color);  
    border: 2px solid black;
    border-color: var(--danger-color);
}

.btn-success {
    background: var(--success-color);
}

.btn-light{
    background: var(--light-color);
    color: var(--primary-color);
    border: 2px solid black;
    border-color: var(--primary-color);
    width: 100%;
}

@media (min-width: 480px) {
    .btn-light {
        width: auto;
    }
}

.btn-light:hover{
    background: var(--primary-color);
    color: var(--light-color);  
    border: 2px solid black;
    border-color: var(--light-color);
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.main-footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;
}

.error-container, .success-container {
    border: 1px solid;
    margin: 10px 0;
    padding: 12px 10px 12px 50px;
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 25px;
    font-size: 0.9rem;
}

.error-container {
    color: #D8000C;
    background-color: #FFBABA;
    background-image: url('https://i.imgur.com/GnyDvKN.png');
}

.success-container {
    color: #4F8A10;
    background-color: #DFF2BF;
    background-image: url('https://i.imgur.com/Q9BGTuy.png');
}

/* Dashboard responsive */
.dashboard-grid {
    display: block;
    margin: 20px 15px 10px 15px;
}

@media (min-width: 1024px) {
    .dashboard-grid {
        display: grid;
        grid-template-columns: 250px 1fr;
        gap: 20px;
        margin: 30px 20px 10px 20px;
    }
}

.sidebar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
    height: auto;
}

@media (min-width: 1024px) {
    .sidebar {
        height: 390px;
        margin-bottom: 0;
    }
}

.sidebar-nav a {
    display: block;
    padding: 12px 0;
    color: var(--dark-color);
    text-decoration: none;
    border-bottom: 1px solid #eee;
    text-align: center;
}

@media (min-width: 1024px) {
    .sidebar-nav a {
        text-align: left;
        padding: 10px 0;
    }
}

.sidebar-nav a:hover {
    color: var(--primary-color);
}

.sidebar-nav a.active {
    font-weight: bold;
    color: var(--primary-color);
}

/* Tablas responsive */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    min-width: 600px; /* Mínimo ancho para tablas */
}

.table th, .table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .table th, .table td {
        padding: 12px 15px;
        font-size: 1rem;
    }
}

.table th {
    background-color: var(--light-color);
    font-weight: 500;
}

.table tr:hover {
    background-color: #f9f9f9;
}

/* Para tablas en móvil - scroll horizontal */
.table-container {
    overflow-x: auto;
    margin: 15px 0;
}

/* Competiciones responsive */
.competition-header {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px solid #f0f0f0;
}

@media (min-width: 768px) {
    .competition-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        padding: 18px 20px 15px;
    }
}

.competition-details {
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 480px) {
    .competition-details {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        padding: 18px 20px;
        gap: 15px;
    }
}

.competition-details p {
    display: flex;
    align-items: center;
    margin: 0;
    color: #555;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .competition-details p {
        font-size: 0.95rem;
    }
}

.competition-details i {
    margin-right: 8px;
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

.competition-actions {
    padding: 12px 15px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    text-align: center;
}

@media (min-width: 768px) {
    .competition-actions {
        padding: 15px 20px;
        text-align: right;
    }
}

.competition-actions-lft {
    padding: 12px 15px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

@media (min-width: 768px) {
    .competition-actions-lft {
        padding: 15px 20px;
    }
}

.inscriptions-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #e8f4fd;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--primary-color);
    border: 1px solid #b8d9f5;
    margin: 5px 0;
}

@media (min-width: 768px) {
    .inscriptions-badge {
        justify-content: flex-start;
        margin-left: 10px;
        margin: 0;
        font-size: 0.8rem;
    }
}

.pending-inscriptions-count,
.registered-inscriptions-count {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: bold;
}

.pending-inscriptions-count {
    background-color: #f0ad4e;
    color: var(--dark-color);
}

.registered-inscriptions-count {
    background-color: var(--success-color);
    color: white;
}

.status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

@media (min-width: 768px) {
    .status {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

.status-succes {
    color: #e6f7ee;
    background-color: #5cb85c;
}

.status-pending {
    background-color: #f0ad4e;
    color: var(--dark-color);
}

.status-danger {
    background-color: #feeceb;
    color: var(--danger-color);
}

.status-inactive {
    background-color: #feeceb;
    color: var(--dark-color);
}

/* Mejoras específicas para móvil */
h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
}

/* Ajustes para elementos específicos en tablas móviles */
.table td:last-child {
    text-align: center;
}

@media (min-width: 768px) {
    .table td:last-child {
        text-align: left;
    }
}


/* Opción 1 - Diseño Mejorado */
.balance-warning {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.warning-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
}

.warning-header i {
    font-size: 24px;
}

.warning-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    align-items: center;
}

.balance-amount {
    text-align: center;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
}

.amount {
    display: block;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.label {
    font-size: 14px;
    opacity: 0.9;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 14px;
}

/* Opción 2 - Diseño Compacto */
.balance-alert {
    background: #e74c3c;
    color: white;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert-icon {
    font-size: 40px;
    opacity: 0.9;
}

.alert-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.alert-content p {
    margin: 0 0 10px 0;
    opacity: 0.9;
}

.contact-buttons {
    display: flex;
    gap: 10px;
}

.btn-contact {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    transition: background 0.3s;
}

.btn-contact:hover {
    background: rgba(255,255,255,0.3);
}

/* Opción 3 - Con WhatsApp */
.balance-urgent {
    background: linear-gradient(135deg, #e74c3c 0%, #d63031 100%);
    color: white;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.urgent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0,0,0,0.2);
}

.urgent-badge {
    background: #ff9ff3;
    color: #2d3436;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.urgent-content {
    padding: 20px;
}

.debt-info {
    text-align: center;
    margin-bottom: 20px;
}

.debt-amount {
    display: block;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.debt-message {
    opacity: 0.9;
    margin: 0;
}

.action-section {
    text-align: center;
}

.restriction {
    margin-bottom: 15px;
    font-weight: bold;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    transition: transform 0.2s;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    color: white;
}

/* Opción 4 - Con Pasos */
.balance-guide {
    background: linear-gradient(135deg, #e74c3c 0%, #e67e22 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
}

.guide-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.guide-header i {
    font-size: 24px;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.step-number {
    background: white;
    color: #e74c3c;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.negative-balance {
    color: #ffdd59;
    font-weight: bold;
    font-size: 18px;
}

.contact-options {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .warning-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .balance-alert {
        flex-direction: column;
        text-align: center;
    }
    
    .guide-steps {
        gap: 20px;
    }
}