:root {
    --primary-color: #e41e25;
    --primary-light: #ff4d4d;
    --primary-dark: #c41920;
    --secondary-color: #2c3e50;
    --secondary-light: #34495e;
    --accent-color: #3498db;
    --background-color: #f8f9fa;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --gray-light: #ecf0f1;
    --gray: #bdc3c7;
    --success: #2ecc71;
    --warning: #f1c40f;
    --error: #e74c3c;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-light);
}

.navbar.scrolled {
    padding: 0.5rem 2rem;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
}

.logo img {
    width: 40px;
    height: 40px;
    transition: var(--transition);
}

.logo span {
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.login-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(228, 30, 37, 0.2);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(228, 30, 37, 0.3);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease 0.3s;
    animation-fill-mode: both;
    color: var(--gray-light);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Services Section */
.services {
    padding: 4rem 2rem;
    background-color: var(--background-color);
}

.plans-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Contact Section */
.contact {
    padding: 4rem 2rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.contact-form button {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

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

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

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

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

.btn-guardar {
    background-color: #4CAF50;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-guardar:hover {
    background-color: #45a049;
}

.btn-cancelar {
    background-color: #f44336;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-cancelar:hover {
    background-color: #da190b;
}

/* Admin Panel */
.admin-panel {
    display: flex;
    min-height: 100vh;
    padding-top: 60px;
}

.sidebar {
    width: 250px;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 2rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.admin-nav a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 4px;
}

.admin-nav a:hover {
    background-color: rgba(255,255,255,0.1);
}

.main-content {
    flex-grow: 1;
    padding: 2rem;
}

.hidden {
    display: none;
}

.user-info {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-info span {
    font-weight: 500;
}

.user-info .user-type {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: capitalize;
}

.clientes-table, .fichas-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.clientes-table th, .clientes-table td,
.fichas-table th, .fichas-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
}

.clientes-table th, .fichas-table th {
    background: var(--gray-light);
    color: var(--secondary-color);
    font-weight: 600;
}

.clientes-table tr:last-child td,
.fichas-table tr:last-child td {
    border-bottom: none;
}

.btn-estado, .btn-fichas {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

/* Estilos específicos para botones de pago */
.btn-pagar {
    background-color: var(--success);
    color: white;
}

.btn-pagar:hover {
    background-color: #27ae60;
}

.btn-pagado {
    background-color: var(--secondary-color);
    color: white;
    opacity: 0.8;
    cursor: default;
}

.btn-pagado:hover {
    transform: none;
    box-shadow: none;
    opacity: 0.8;
}

/* Estados de pago */
.estado-vencido {
    color: var(--error);
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    background-color: rgba(231, 76, 60, 0.1);
}

.estado-por-vencer {
    color: var(--warning);
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    background-color: rgba(241, 196, 15, 0.1);
}

.estado-al-dia {
    color: var(--success);
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    background-color: rgba(46, 204, 113, 0.1);
}

/* Estados de activo/inactivo */
.estado-activo {
    color: var(--success);
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    background-color: rgba(46, 204, 113, 0.1);
}

.estado-inactivo {
    color: var(--error);
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    background-color: rgba(231, 76, 60, 0.1);
}

/* Botones de acción */
.btn-agregar {
    background: var(--success);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
}

.btn-agregar:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: #27ae60;
}

.btn-editar {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
}

.btn-editar:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-eliminar {
    background: var(--error);
    color: var(--white);
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-eliminar:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Sección de administración */
.admin-only {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-only a {
    color: var(--white);
    text-decoration: none;
    padding: 0.8rem;
    border-radius: 4px;
    display: block;
    transition: all 0.2s ease;
}

.admin-only a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

/* Contenedor de tabla */
.table-container {
    margin-top: 1.5rem;
    overflow-x: auto;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

/* Ajustes para dispositivos móviles */
@media (max-width: 768px) {
    .btn-agregar {
        width: 100%;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .btn-editar,
    .btn-eliminar {
        width: 100%;
        margin: 0.3rem 0;
        text-align: center;
    }

    .table-container {
        margin: 0 -1rem;
        border-radius: 0;
    }
}

/* Utility Classes */
.section-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--secondary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.section-title h2 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.total-info {
    background: var(--white);
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--gray-light);
}

.total-label {
    font-weight: 600;
    color: var(--secondary-color);
}

.total-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.btn {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #c41920;
}

/* Security Enhancements */
#loginForm input[type="password"] {
    letter-spacing: 0.2em;
    font-family: monospace;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error States */
.error-message {
    background-color: var(--error);
    color: var(--white);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message::before {
    content: '⚠️';
}

/* Success States */
.success-message {
    background-color: var(--success);
    color: var(--white);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-message::before {
    content: '✅';
}

/* Session Timeout Warning */
.session-warning {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--warning);
    color: var(--text-color);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.session-warning::before {
    content: '⏰';
}

/* Disable Selection for Security */
.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Secure Input Container */
.secure-input-container {
    position: relative;
}

.secure-input-container .toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.secure-input-container .toggle-password:hover {
    color: var(--primary-color);
}

/* Plan Cards */
.plan-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.plan-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
}

.plan-header h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.2rem;
}

.plan-price .currency {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.plan-price .amount {
    font-size: 3rem;
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1;
}

.plan-price .period {
    color: var(--text-light);
    font-size: 1rem;
}

.plan-features {
    flex-grow: 1;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-color);
}

.plan-features li i {
    color: var(--success);
    font-size: 1.1rem;
}

.plan-footer {
    text-align: center;
}

.btn-contact {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(228, 30, 37, 0.2);
}

.no-plans {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
    font-size: 1.1rem;
}

/* Responsive Design for Dashboard and Navbar */
@media (max-width: 900px) {
    .admin-panel {
        flex-direction: column;
        padding-top: 56px;
    }
    .sidebar {
        width: 100%;
        border-radius: 0 0 12px 12px;
        padding: 1rem 0.5rem;
        min-width: unset;
        max-width: unset;
    }
    .main-content {
        margin: 0;
        border-radius: 0;
        min-height: 60vh;
        padding: 1rem 0.5rem;
    }
    .user-info {
        margin-bottom: 1rem;
        padding: 1rem 0.5rem;
    }
    .hamburger {
        display: block;
        position: absolute;
        right: 1rem;
        top: 1rem;
        z-index: 1201;
    }
    .close-menu {
        display: none;
        position: fixed;
        top: 1.2rem;
        right: 1.2rem;
        z-index: 2100;
        background: none;
        border: none;
        font-size: 2.5rem;
        color: var(--primary-color);
        cursor: pointer;
        padding: 0.2rem 0.5rem;
        border-radius: 50%;
        transition: background 0.2s;
    }
    .nav-links.active ~ .close-menu {
        display: block;
    }
    .close-menu:hover {
        background: var(--gray-light);
    }
    .nav-links {
        position: fixed;
        top: 0;
        left: -100vw;
        width: 100vw;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0;
        gap: 2.5rem;
        transition: left 0.3s cubic-bezier(0.77,0.2,0.05,1.0);
        box-shadow: 2px 0 15px rgba(44,62,80,0.08);
        z-index: 2000;
        font-size: 1.4rem;
        padding-top: 2.5rem;
    }
    .nav-links.active {
        left: 0;
    }
    .nav-links a {
        font-size: 1.3rem;
        padding: 1rem 2rem;
        text-align: center;
        width: 100%;
        border-radius: 12px;
        transition: background 0.2s, color 0.2s;
    }
    .nav-links a:hover {
        background: var(--primary-light);
        color: var(--white);
    }
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}
@media (min-width: 901px) {
    .close-menu {
        display: none;
    }
}
@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.7rem 1rem;
    }
    .logo img {
        width: 32px;
        height: 32px;
    }
    .logo span {
        font-size: 1.2rem;
    }
    .nav-links {
        gap: 1.2rem;
    }
    .sidebar {
        padding: 0.5rem 0.2rem;
    }
    .main-content {
        padding: 0.5rem 0.1rem;
    }
    .clientes-table, .fichas-table {
        font-size: 0.92rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
@media (max-width: 700px) {
    .clientes-table, .fichas-table {
        display: block;
        width: 100%;
        border: none;
        box-shadow: none;
        background: none;
    }
    .clientes-table thead, .fichas-table thead {
        display: none;
    }
    .clientes-table tbody, .fichas-table tbody {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .clientes-table tr, .fichas-table tr {
        display: flex;
        flex-direction: column;
        background: #fff;
        border-radius: 10px;
        box-shadow: var(--shadow-md);
        margin-bottom: 0.5rem;
        padding: 1rem 0.7rem;
        border: 1px solid var(--gray-light);
    }
    .clientes-table td, .fichas-table td {
        display: flex;
        align-items: center;
        padding: 0.4rem 0;
        border: none;
        font-size: 1rem;
        position: relative;
    }
    .clientes-table td:before, .fichas-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--primary-color);
        min-width: 120px;
        margin-right: 0.7rem;
        display: inline-block;
    }
    .acciones-fichas {
        gap: 0.5rem;
    }
    
    .info-fichas {
        font-size: 0.85rem;
    }
    
    .btn-estado {
        width: 100%;
        justify-content: center;
    }
}

.app-loader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #fff;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.app-loader .spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #eee;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Estilos para el botón de cerrar/regresar en historial */
.btn-cerrar {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
    margin: 1rem 0;
}

.btn-cerrar:hover {
    background: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-cerrar i {
    font-size: 1.1rem;
}

/* Ajuste para el contenedor del historial */
.dashboard-card {
    position: relative;
    padding: 1.5rem;
}

/* Ajuste para el título del historial */
.dashboard-card .section-title {
    margin-bottom: 1rem;
}

/* Estilos para el modal de corte de fichas */
.corte-fichas-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-bottom: 1rem;
}

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

.form-group label {
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group input {
    padding: 0.8rem;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(228, 30, 37, 0.1);
}

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

.btn-cancelar,
.btn-actualizar,
.btn-guardar {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.btn-cancelar {
    background-color: var(--gray);
    color: var(--white);
}

.btn-actualizar {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-guardar {
    background: var(--gradient-primary);
    color: var(--white);
}

.btn-cancelar:hover {
    background-color: var(--text-light);
}

.btn-actualizar:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.btn-guardar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(228, 30, 37, 0.2);
}

@media (max-width: 700px) {
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
        max-height: 85vh;
    }

    .form-actions {
        flex-direction: column;
    }
    
    .btn-cancelar,
    .btn-actualizar,
    .btn-guardar {
        width: 100%;
        margin: 0.3rem 0;
    }

    .form-group input {
        font-size: 16px; /* Previene zoom en iOS */
    }
}

@media (max-height: 700px) {
    .modal-content {
        margin: 2% auto;
        max-height: 96vh;
    }
}

/* Estilos para la columna de acciones de fichas */
.acciones-fichas {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.info-fichas {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.4;
}

/* Eliminar los estilos específicos del botón de corte ya que usará los estilos de btn-estado */
.btn-corte {
    display: none;
}

/* Responsive styles for modals */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Fondo degradado para el modal de login */
#loginModal .modal-content.login-modal-content {
    background: linear-gradient(135deg, #e41e25 0%, #2c3e50 100%);
    color: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(44,62,80,0.25);
    padding: 2.5rem 2rem 2rem 2rem;
    max-width: 370px;
    width: 90%;
    position: relative;
    text-align: center;
    animation: fadeInUp 0.7s;
}

#loginModal .close {
    color: #fff;
    position: absolute;
    right: 18px;
    top: 12px;
    font-size: 2rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}
#loginModal .close:hover {
    opacity: 1;
    color: #fff;
}

.login-avatar {
    font-size: 4.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
    opacity: 0.85;
}

.login-title {
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.login-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 0.2rem 0.8rem;
    transition: box-shadow 0.2s;
}

.login-input-group i {
    color: #fff;
    font-size: 1.2rem;
    margin-right: 0.7rem;
    opacity: 0.8;
}

.login-input-group input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 1.08rem;
    padding: 0.8rem 0.2rem;
    width: 100%;
    transition: color 0.2s;
}

.login-input-group input::placeholder {
    color: #f8f9fa;
    opacity: 0.7;
}

.login-input-group:focus-within {
    box-shadow: 0 0 0 2px #fff, 0 2px 8px #e41e2533;
}

.login-btn-full {
    background: #fff;
    color: #e41e25;
    font-weight: 700;
    border: none;
    border-radius: 25px;
    padding: 0.9rem 0;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(44,62,80,0.10);
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.login-btn-full:hover {
    background: #e41e25;
    color: #fff;
    transform: translateY(-2px) scale(1.03);
}

@media (max-width: 500px) {
    #loginModal .modal-content.login-modal-content {
        padding: 1.2rem 0.5rem 1.5rem 0.5rem;
        max-width: 98vw;
    }
    .login-title {
        font-size: 1.1rem;
    }
    .login-avatar {
        font-size: 3rem;
    }
}

/* Scroll interno para el modal de corte de fichas en móvil */
@media (max-width: 700px) {
    #corteFichasModal .modal-content {
        max-height: 85vh;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

@media (max-width: 700px) {
    #planModal .modal-content {
        max-width: 98vw;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
        max-height: 85vh;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    #planModal .form-group input,
    #planModal .form-group select,
    #planModal .form-group textarea {
        font-size: 1rem;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Estilos mejorados para el modal de planes */
#planModal .modal-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
}

/* Estilos específicos para la sección de características */
.caracteristica-item {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
}

.caracteristica-item .input-caracteristica {
    flex: 1;
    min-width: 0; /* Permite que el input se encoja */
    padding: 10px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    color: var(--text-color);
}

.caracteristica-item .btn-eliminar {
    padding: 10px 15px;
    white-space: nowrap;
    min-width: auto;
    flex-shrink: 0;
}

#caracteristicasContainer {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

#agregarCaracteristicaBtn {
    margin-top: 15px;
    width: auto;
    align-self: flex-start;
}

/* Ajustes responsivos para el modal de planes */
@media (max-width: 768px) {
    #planModal .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1.5rem;
    }

    .caracteristica-item {
        flex-direction: column;
        gap: 8px;
    }

    .caracteristica-item .input-caracteristica {
        width: 100%;
        font-size: 16px; /* Previene zoom en iOS */
    }

    .caracteristica-item .btn-eliminar {
        width: 100%;
        padding: 12px;
    }

    #agregarCaracteristicaBtn {
        width: 100%;
        margin-top: 10px;
    }
}

/* Estilos específicos para el modal de clientes */
#clienteModal .modal-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
}

#clienteModal .form-group {
    margin-bottom: 1.2rem;
}

#clienteModal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

#clienteModal .form-group input,
#clienteModal .form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    color: var(--text-color);
}

#clienteModal .form-group input:focus,
#clienteModal .form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(228, 30, 37, 0.1);
}

#clienteModal .form-actions {
    position: sticky;
    bottom: 0;
    background-color: #fff;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--gray-light);
}

/* Ajustes responsivos para el modal de clientes */
@media (max-width: 768px) {
    #clienteModal .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1.5rem;
    }

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

    #clienteModal .form-group input,
    #clienteModal .form-group select {
        font-size: 16px; /* Previene zoom en iOS */
    }
} 