/* =====================================================
   🎨 VARIABLES CSS - TEMA CLARO Y OSCURO
   ===================================================== */

:root {
    /* 🎨 Colores base (modo claro) */
    --primary-color: #1e4a82;
    --primary-color2: #3a2c8c;
    --accent-color: #3b6cb0;
    --secondary-color: #e6b422;

    --text-color: #000000;
    --text-color-in-black: #ffffff;
    --text-color-in-white: #000000;
    --text-light: #ffffff;
    --bg-color: #f8fafc;
    --container-bg: #ffffff;
    --input-bg: #ffffff;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.08);

    /* 🃏 Tarjetas - Nueva paleta armoniosa */
    --card-client: #2c5282;
    --card-config: #4a6fa5;
    --card-team: #5d8ac9;
    --card-points: #e6b422;

    /* ✅ Estados (light) */
    --success-bg: #f0fff4;
    --success-border: #38a169;
    --success-text: #22543d;
    --error-color: #e53e3e;
    --error-bg-light: #fef5f5;
    --error-border-light: #feb2b2;
    --error-text-light: #c53030;
    --warning-color: #d69e2e;

    /* ⚡ Tipografía y animación */
    --font-size: 14px;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --animation-duration: 0.3s;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.12);

    /* 📐 Sidebar */
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 60px;

    /* 📱 Breakpoints */
    --breakpoint-mobile: 768px;
    --breakpoint-tablet: 1024px;
    --breakpoint-desktop: 1200px;
    --breakpoint-small: 480px;
}

[data-theme="dark"] {
    /* 🎨 Colores base (modo oscuro) */
    --primary-color: #3b6cb0;
    --primary-color2: #5e4bba;
    --accent-color: #4a85cf;
    --secondary-color: #f5d061;

    --text-color: #e2e8f0;
    --text-color-in-white: #000000;
    --text-light: #f8fafc;
    --bg-color: #121826;
    --container-bg: #1a2438;
    --input-bg: #222f45;
    --border-color: #2d3748;
    --shadow-color: rgba(0, 0, 0, 0.4);

    /* ✅ Estados (dark) */
    --success-bg: #1c4532;
    --success-border: #38a169;
    --success-text: #9ae6b4;
    --error-color: #fc8181;
    --error-bg-dark: #3c1a1a;
    --error-border-dark: #742a2a;
    --error-text-dark: #fc8181;
    --warning-color: #f6e05e;

    /* 🃏 Tarjetas - Versión oscura */
    --card-client: #3b6cb0;
    --card-config: #4a85cf;
    --card-team: #5d8ac9;
    --card-points: #f5d061;
}

/* =====================================================
   🔧 RESET Y ESTILOS BASE
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
    font-size: var(--font-size);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color var(--animation-duration) ease, color var(--animation-duration) ease;
    min-height: 100vh;
    display: flex;
}

span {
    color: white;
}

/* =====================================================
   🚨 SISTEMA DE ALERTAS
   ===================================================== */

.alert {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn var(--animation-duration) ease-in-out;
    border: 1px solid transparent;
    box-shadow: 0 2px 6px var(--shadow-color);
}

.alert-success {
    background-color: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success-text);
}

.alert-error {
    background-color: var(--error-bg-light);
    border-color: var(--error-border-light);
    color: var(--error-text-light);
}

[data-theme="dark"] .alert-error {
    background-color: var(--error-bg-dark);
    border-color: var(--error-border-dark);
    color: var(--error-text-dark);
}

.alert i {
    font-size: var(--font-size);
}

.error-box {
    background-color: var(--error-bg-light);
    border: 1px solid var(--error-border-light);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    color: var(--error-text-light);
}

[data-theme="dark"] .error-box {
    background-color: var(--error-bg-dark);
    border-color: var(--error-border-dark);
    color: var(--error-text-dark);
}

.error-list {
    margin: 0;
    padding-left: 20px;
}

.error-list li {
    margin-bottom: 5px;
}

/* =====================================================
   📱 SIDEBAR Y NAVEGACIÓN
   ===================================================== */

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    color: white;
    height: 100vh;
    position: fixed;
    transition: all var(--animation-duration) ease;
    overflow: hidden;
    z-index: 1000;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-header span,
.sidebar.collapsed .sidebar-menu a span {
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-menu a {
    justify-content: center;
}

.sidebar.collapsed .sidebar-menu a i {
    margin-right: 0;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.sidebar-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-menu a i {
    margin-right: 15px;
    font-size: var(--font-size);
}

.sidebar-menu a span {
    transition: opacity var(--animation-duration) ease;
}

.toggle-btn {
    position: fixed;
    left: calc(var(--sidebar-width) - 30px);
    top: 20px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: all var(--animation-duration) ease;
}

.toggle-btn:hover {
    transform: scale(1.1);
}

.sidebar.collapsed~.toggle-btn {
    left: calc(var(--sidebar-collapsed-width) - 15px);
}

/* =====================================================
   📄 CONTENIDO PRINCIPAL (UNIFICADO)
   ===================================================== */

.main-content {
    margin-left: var(--sidebar-width);
    padding: 20px;
    flex: 1;
    transition: margin-left var(--animation-duration) ease;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar.collapsed~.main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* =====================================================
   📝 FORMULARIOS Y CONTROLES (UNIFICADO)
   ===================================================== */

.elegant-form {
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
    font-size: var(--font-size);
}

[data-theme="dark"] .form-label {
    color: var(--secondary-color);
}

.required {
    color: #e74c3c;
    font-size: var(--font-size);
}

.form-hint {
    font-size: calc(var(--font-size) - 2px);
    color: var(--text-color);
    margin-top: 0.25rem;
    font-style: italic;
}

.form-control {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: var(--font-size);
    border-radius: 8px;
    padding: 12px 15px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-button:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: white;
}

.additional-actions {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}

/* =====================================================
   📱 MODALES Y NOTIFICACIONES
   ===================================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--container-bg);
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-out;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 1.5rem;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.confirm-modal {
    background: var(--container-bg);
    border-radius: 15px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-out;
}

.confirm-icon {
    font-size: 3rem;
    color: var(--warning-color);
    margin-bottom: 1rem;
}

.confirm-title {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.confirm-message {
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    max-width: 350px;
    word-wrap: break-word;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    background: var(--container-bg);
    color: var(--text-color);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-left: 4px solid var(--primary-color);
    z-index: 2500;
    min-width: 280px;
    animation: slideInRight 0.4s ease-out forwards;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
    right: -400px;
}

.notification.info {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    border-left-color: var(--card-config);
}

.notification.info::before {
    content: '\f05a';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--card-config);
}

.notification.success {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    border-left-color: var(--success-border);
}

.notification.success::before {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--success-border);
}

.notification.warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border-left-color: var(--warning-color);
}

.notification.warning::before {
    content: '\f071';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--warning-color);
}

.notification.error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border-left-color: var(--error-color);
}

.notification.error::before {
    content: '\f06a';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--error-color);
}

/* =====================================================
   ⚙️ CONFIGURACIONES
   ===================================================== */

.settings-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.settings-content {
    flex: 1;
    display: grid;
    gap: 2rem;
}

.settings-panel {
    background: var(--container-bg);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 25px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.settings-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color));
    border-radius: 20px 20px 0 0;
}

.settings-panel:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.settings-panel:nth-child(2) {
    animation-delay: 0.2s;
}

.setting-group {
    margin-bottom: 2rem;
}

.setting-group h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.theme-option {
    position: relative;
}

.theme-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.theme-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.theme-option label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    opacity: 0;
    transition: var(--transition);
}

.theme-option:hover label::before {
    opacity: 1;
}

.theme-option input[type="radio"]:checked+label {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, var(--primary-color)10, var(--accent-color)10);
    transform: scale(1.02);
}

.theme-option input[type="radio"]:checked+label::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.theme-preview {
    width: 50px;
    height: 30px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.theme-light .theme-preview {
    background: linear-gradient(45deg, #ffffff 50%, #f8fafc 50%);
}

.theme-dark .theme-preview {
    background: linear-gradient(45deg, #1a2438 50%, #121826 50%);
}

.theme-auto .theme-preview {
    background: linear-gradient(45deg, #ffffff 25%, #1a2438 25%, #1a2438 50%, #ffffff 50%, #ffffff 75%, #1a2438 75%);
    background-size: 10px 10px;
}

.theme-label {
    font-weight: 600;
    color: var(--text-color);
}

.font-size-selector {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid var(--border-color);
}

.dots-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dot::before {
    content: 'A';
    font-weight: bold;
    color: var(--text-color);
    transition: var(--transition);
}

.dot[data-size="12"] {
    width: 16px;
    height: 16px;
}

.dot[data-size="12"]::before {
    font-size: 10px;
}

.dot[data-size="14"] {
    width: 18px;
    height: 18px;
}

.dot[data-size="14"]::before {
    font-size: 12px;
}

.dot[data-size="16"] {
    width: 20px;
    height: 20px;
}

.dot[data-size="16"]::before {
    font-size: 14px;
}

.dot[data-size="18"] {
    width: 22px;
    height: 22px;
}

.dot[data-size="18"]::before {
    font-size: 16px;
}

.dot[data-size="20"] {
    width: 24px;
    height: 24px;
}

.dot[data-size="20"]::before {
    font-size: 18px;
}

.dot.active {
    background: var(--accent-color);
    color: white;
    transform: scale(1.2);
}

.dot.active::before {
    color: white;
}

.dot:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.dot:hover::before {
    color: white;
}

.font-size-input {
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    color: var(--text-color);
    width: 80px;
    text-align: center;
    font-weight: 600;
    transition: var(--transition);
}

.font-size-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 108, 176, 0.2);
}

.apply-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
    margin-top: 1rem;
}

.apply-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.apply-btn:active {
    transform: translateY(-1px);
}

/* =====================================================
   🏠 MARCADORES DE MAPA PERSONALIZADOS
   ===================================================== */

.house-marker {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.house-roof {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid currentColor;
    margin-bottom: -2px;
}

.house-body {
    width: 12px;
    height: 8px;
    background: currentColor;
    position: relative;
    border-radius: 0 0 2px 2px;
}

.door {
    width: 3px;
    height: 5px;
    background: white;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 1px;
}

.pin-dot {
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%;
    margin-top: 2px;
}

.popup-content {
    text-align: center;
    padding: 0.5rem;
}

.popup-title {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-size: 1.1em;
    color: #333;
    margin-bottom: 4px;
}

.popup-status {
    font-size: 0.8rem;
    color: var(--text-color);
    text-transform: capitalize;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 4px;
}

/* =====================================================
   📱 RESPONSIVE DESIGN UNIFICADO
   ===================================================== */

/* Tablets y pantallas medianas */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .panel-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* Tablets pequeñas */
@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .inline-form {
        flex-wrap: wrap;
    }

    .table-responsive .table1 {
        min-width: 500px;
    }
}

/* Móviles grandes y tablets */
@media (max-width: 768px) {
    :root {
        --sidebar-collapsed-width: 0px;
    }

    /* Layout general */
    body {
        min-height: 100vh;
        overflow-x: hidden;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .sidebar {
        transition: transform var(--animation-duration) ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .toggle-btn {
        left: 10px;
    }

    /* Headers */
    .ronda-header,
    .cliente-header,
    .settings-header {
        padding: 1.5rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .ronda-title,
    .cliente-titulo,
    .settings-title {
        font-size: 1.5rem;
        flex-direction: column;
    }

    .cliente-nome {
        font-size: 2rem;
    }

    .ronda-meta,
    .cliente-meta {
        flex-direction: column;
        gap: 1rem;
        justify-content: center;
    }

    .cliente-stats {
        justify-content: center;
    }

    /* Paneles */
    .panel-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .panel-body {
        padding: 1rem;
    }

    /* Formularios */
    .elegant-form {
        padding: 1.5rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 16px;
        /* Evita el zoom en iOS */
    }

    .form-actions {
        flex-direction: column;
    }

    /* Botones */
    .action-buttons {
        flex-direction: column;
        padding: 1rem;
    }

    .additional-actions {
        width: 100%;
        justify-content: center;
        flex-direction: column;
        gap: 0.8rem;
    }

    .additional-actions .btn {
        width: 100%;
        padding: 0.8rem;
    }

    .back-button {
        width: 100%;
        justify-content: center;
    }

    /* Tablas responsivas */
    .table-responsive .table1 {
        min-width: 400px;
    }

    .table1 th,
    .table1 td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    /* Rondas específicas */
    .ronda-details {
        grid-template-columns: 1fr;
    }

    /* Modales */
    .modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 85vh;
        border-radius: 12px;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-title {
        font-size: 1rem;
    }

    .confirm-modal {
        width: 95%;
        padding: 1.2rem;
        margin: 1rem;
    }

    .confirm-icon {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }

    .confirm-title {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .confirm-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    /* Notificaciones */
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        margin: 0 10px;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        top: 10px;
        min-width: unset;
    }

    /* Mapa y controles móviles */
    .header {
        padding: 0.8rem;
        text-align: center;
    }

    .header h1 {
        font-size: 1.3rem;
        margin-bottom: 0.3rem;
    }

    .map-container {
        height: 250px;
        margin: 0.8rem;
        border-radius: 10px;
    }

    .point-item {
        min-width: 100px;
        padding: 8px;
    }

    .point-clave {
        font-size: 0.8rem;
    }

    .point-estado {
        font-size: 0.7rem;
    }

    .point-nombre {
        font-size: 0.7rem;
    }

    .controls-panel {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        margin: 0.8rem;
    }

    .control-btn {
        padding: 0.8rem 0.5rem;
        font-size: 0.85rem;
        border-radius: 12px;
    }

    .btn-icon {
        font-size: 1.1rem;
    }

    .control-btn span {
        font-size: 0.8rem;
    }

    /* Status indicators móviles */
    .ronda-status {
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .status-indicator {
        top: 8px;
        right: 8px;
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .status-dot {
        width: 6px;
        height: 6px;
    }

    /* Configuraciones móviles */
    .settings-container {
        padding: 1rem;
    }

    .settings-panel {
        padding: 1.5rem;
    }

    .theme-options {
        grid-template-columns: 1fr;
    }

    .font-size-selector {
        flex-direction: column;
        gap: 1rem;
    }

    /* Eventos móviles */
    .event-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .event-item {
        flex-direction: column;
    }

    .event-icon {
        align-self: center;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .main-content {
        padding: 0.5rem;
    }

    .header h1 {
        font-size: 1.1rem;
    }

    .controls-panel {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
        margin: 0.6rem;
    }

    .control-btn {
        padding: 0.7rem 0.4rem;
        font-size: 0.8rem;
    }

    .control-btn span {
        font-size: 0.7rem;
    }

    .btn-icon {
        font-size: 1rem;
    }

    .map-container {
        height: 220px;
        margin: 0.6rem;
    }

    .point-item {
        min-width: 90px;
        padding: 6px;
    }

    .table-responsive .table1 {
        min-width: 320px;
    }

    .table1 th,
    .table1 td {
        padding: 0.25rem;
        font-size: 0.8rem;
    }

    .form-control {
        padding: 8px 10px;
    }

    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* =====================================================
   🎬 ANIMACIONES UNIFICADAS
   ===================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes visitedPulse {
    0% {
        background-color: #e8f5e8;
    }

    50% {
        background-color: #c8e6c9;
    }

    100% {
        background-color: inherit;
    }
}

/* Aplicar animaciones escalonadas */
.panel:nth-child(1) {
    animation-delay: 0.1s;
}

.panel:nth-child(2) {
    animation-delay: 0.2s;
}

.panel:nth-child(3) {
    animation-delay: 0.3s;
}

.panel:nth-child(4) {
    animation-delay: 0.4s;
}

.panel:nth-child(5) {
    animation-delay: 0.5s;
}

/* =====================================================
   🖨️ ESTILOS PARA IMPRESIÓN
   ===================================================== */

@media print {

    .action-buttons,
    .map-controls,
    .sidebar,
    .toggle-btn,
    .notification,
    .modal-overlay {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .panel {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        margin-bottom: 1rem;
    }

    .ronda-header,
    .cliente-header,
    .settings-header {
        background: #f5f5f5 !important;
        color: #333 !important;
    }

    .panel-header {
        background: #f0f0f0 !important;
        color: #333 !important;
    }

    .table1 {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* =====================================================
   🎨 UTILIDADES FINALES
   ===================================================== */

.text-green-500 {
    color: #38a169;
}

.text-blue-500 {
    color: #4299e1;
}

.text-red-500 {
    color: #e53e3e;
}

.text-gray-600 {
    color: #718096;
}

.text-gray-400 {
    color: #a0aec0;
}

/* Clases de ayuda para ocultar/mostrar elementos */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.d-grid {
    display: grid !important;
}

/* Clases de spacing */
.m-0 {
    margin: 0 !important;
}

.p-0 {
    padding: 0 !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.p-1 {
    padding: 0.25rem !important;
}

/* Clases de alineación */
.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

/* Clases de flexbox */
.justify-center {
    justify-content: center !important;
}

.align-center {
    align-items: center !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.flex-nowrap {
    flex-wrap: nowrap !important;
}

/* Estados hover y focus unificados */
.hover-shadow:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.focus-visible:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Scrollbars personalizados para navegadores webkit */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Optimización para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {

    .btn:hover,
    .panel:hover,
    .info-item:hover,
    .point-item:hover {
        transform: none;
    }

    .control-btn:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
}

/* Soporte para modo de alto contraste */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --shadow-color: rgba(0, 0, 0, 0.3);
    }

    [data-theme="dark"] {
        --border-color: #ffffff;
        --text-color: #ffffff;
    }
}

/* Soporte para reducción de movimiento */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .status-dot {
        animation: none;
    }

    .header-decoration {
        animation: none;
    }
}

/* Mejoras para lectores de pantalla */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Estados de carga y skeleton */
.skeleton {
    background: linear-gradient(90deg,
            var(--border-color) 25%,
            transparent 37%,
            var(--border-color) 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: -100% 50%;
    }
}

/* Fix para subpixel rendering */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Asegurar que las variables CSS se apliquen correctamente */
html {
    color-scheme: light dark;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

/* Fallbacks para navegadores que no soportan CSS Grid */
@supports not (display: grid) {

    .panel-grid,
    .content-grid,
    .form-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .panel-grid>*,
    .content-grid>*,
    .form-grid>* {
        flex: 1;
        min-width: 300px;
    }
}

/* Optimización final para carga */
.panel,
.form-control,
.btn {
    will-change: transform;
}

/* Estados de validación de formularios */
.form-control:invalid {
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.2);
}

.form-control:valid {
    border-color: var(--success-border);
}

/* Estados disabled */
.btn:disabled,
.form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Mejoras para la accesibilidad del teclado */
.btn:focus-visible,
.form-control:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Indicadores de estado activo */
.btn:active {
    transform: translateY(1px);
}

.point-item:active,
.member-card:active,
.ronda-card:active {
    transform: scale(0.98);
}

/* Contenedores principales responsivos */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-fluid {
    width: 100%;
    padding: 0 1rem;
}

/* Grid system simple */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.5rem;
}

.col {
    flex: 1;
    padding: 0.5rem;
}

.col-6 {
    flex: 0 0 50%;
    padding: 0.5rem;
}

.col-4 {
    flex: 0 0 33.333333%;
    padding: 0.5rem;
}

.col-3 {
    flex: 0 0 25%;
    padding: 0.5rem;
}

/* Estados especiales para elementos críticos */
.priority-high {
    border-left: 4px solid var(--error-color) !important;
}

.priority-medium {
    border-left: 4px solid var(--warning-color) !important;
}

.priority-low {
    border-left: 4px solid var(--success-border) !important;
}

/* Overlays y capas */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.overlay.show {
    display: block;
}

/* Últimas optimizaciones responsive para elementos específicos */
@media (max-width: 768px) {

    .col-6,
    .col-4,
    .col-3 {
        flex: 0 0 100%;
    }

    .form-actions {
        position: sticky;
        bottom: 0;
        background: var(--container-bg);
        border-top: 1px solid var(--border-color);
        padding: 1rem;
        margin: 0 -1rem;
    }
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.15);
    outline: none;
}

.form-control:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.select-wrapper {
    position: relative;
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--border-color);
    pointer-events: none;
}

select.form-control {
    appearance: none;
    padding-right: 2.5rem;
}

.inline-form {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
}

.inline-form .row {
    flex-wrap: nowrap;
    margin: 0 !important;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-right: -15px;
    margin-left: -15px;
}

[class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
}

.col-md-3 {
    flex: 1;
    min-width: 0;
    margin-bottom: 0 !important;
}

.radio-option input[type="radio"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option input[type="radio"]:checked {
    border-color: var(--accent-color);
}

.radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    background: #f7fafc;
    transition: all 0.3s ease;
}

.file-input-display:hover {
    border-color: var(--primary-color2);
    background: #edf2f7;
}

/* =====================================================
   🔘 SISTEMA DE BOTONES (UNIFICADO)
   ===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    font-size: var(--font-size);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #000;
}

.btn-secondary:hover {
    background-color: #c9a227;
    color: #000;
}

.btn-outline-secondary {
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    background: transparent;
}

.btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    color: #000;
}

.btn-success {
    background-color: #28a745;
    color: #fff;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    color: white;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    color: #212529;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    color: white;
}

.btn-edit {
    background: var(--secondary-color);
    color: #000;
}

.btn-edit:hover {
    background: #c9a227;
    transform: translateY(-2px);
    color: #000;
}

.btn-create {
    background: var(--success-border);
    color: white;
}

.btn-create:hover {
    background: #2f855a;
    transform: translateY(-2px);
    color: white;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: calc(var(--font-size) - 1px);
}

.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.control-btn {
    background: linear-gradient(45deg, var(--card-team), var(--card-points));
    color: white;
    border: none;
    border-radius: 15px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-iniciar {
    background: linear-gradient(45deg, var(--success-border), #48bb78);
}

.btn-detener {
    background: linear-gradient(45deg, var(--error-color), #fc8181);
}

.btn-reporte {
    background: linear-gradient(45deg, var(--warning-color), var(--secondary-color));
}

.btn-punto {
    background: linear-gradient(45deg, var(--primary-color2), var(--accent-color));
}

.btn-icon {
    font-size: 1.5rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-submit {
    background-color: var(--primary-color);
    color: white;
}

.btn-submit:hover {
    background-color: var(--accent-color);
}

.btn-cancel {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-cancel:hover {
    background-color: rgba(26, 62, 114, 0.1);
}

[data-theme="dark"] .btn-cancel {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

[data-theme="dark"] .btn-cancel:hover {
    background-color: rgba(212, 175, 55, 0.1);
}

/* =====================================================
   📊 TABLAS RESPONSIVAS (OPTIMIZADO)
   ===================================================== */

.table1 {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    box-shadow: 0 2px 10px var(--shadow-color);
    border-radius: 8px;
    overflow: hidden;
    display: table;
}

.table1 thead {
    background-color: var(--primary-color);
    color: white;
}

.table1 th {
    padding: 1rem;
    text-align: left;
    font-weight: 500;
}

.table1 td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table1 tbody tr {
    transition: background-color 0.2s ease;
    background-color: var(--container-bg);
}

.table1 tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .table1 tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.table1 tbody tr td[colspan] {
    text-align: center;
    padding: 2rem;
    color: var(--text-color);
    opacity: 0.7;
}

/* Wrapper responsivo para tablas */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.table-responsive .table1 {
    min-width: 600px;
    margin-top: 0;
    box-shadow: none;
    border-radius: 0;
}

/* =====================================================
   🏷️ BADGES Y ELEMENTOS ESPECIALES
   ===================================================== */

.badge {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    font-size: var(--font-size);
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    margin-right: 0.3rem;
    margin-bottom: 0.3rem;
}

.text-muted {
    color: var(--border-color);
    font-style: italic;
}

.status-badge {
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-activo {
    background: var(--success-bg);
    color: var(--success-text);
}

.status-inactivo {
    background: #fef5f5;
    color: #c53030;
}

/* =====================================================
   🏠 PÁGINA DE LOGIN
   ===================================================== */

.version-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 99%;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    text-align: center;
    box-shadow: 0 2px 5px var(--shadow-color);
    z-index: 1000;
    transition: all var(--animation-duration) ease;
}

.login-container {
    background-color: var(--container-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-color);
    width: 350px;
    padding: 30px;
    text-align: center;
    margin-top: 20px;
    transition: all var(--animation-duration) ease;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out forwards;
}

.logo {
    margin-bottom: 25px;
    transition: all var(--animation-duration) ease;
}

.logo h1 {
    color: var(--primary-color);
    font-size: calc(var(--font-size) * 2);
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 1px;
    transition: all var(--animation-duration) ease;
}

.logo p {
    color: var(--secondary-color);
    font-size: calc(var(--font-size) + 2px);
    font-weight: 600;
    margin-top: 0;
    letter-spacing: 0.5px;
    transition: all var(--animation-duration) ease;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
    transition: all var(--animation-duration) ease;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
    font-size: calc(var(--font-size) + 1px);
    transition: all var(--animation-duration) ease;
}

.input-group input:not([type="color"]) {
    width: 90%;
    padding: 12px 15px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: var(--font-size);
    transition: all var(--animation-duration) ease;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.input-group input:not([type="color"]):hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.input-group input:not([type="color"]):focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 62, 114, 0.2);
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    transition: all var(--animation-duration) ease;
}

.remember-me input {
    margin-right: 10px;
}

.remember-me label {
    color: var(--text-color);
    font-size: var(--font-size);
    transition: all var(--animation-duration) ease;
}

.login-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    width: 100%;
    font-size: calc(var(--font-size) + 2px);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--animation-duration) ease;
}

.login-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.login-btn:active {
    transform: translateY(0);
}

.settings-link {
    display: block;
    margin-top: 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: calc(var(--font-size) - 1px);
    transition: all var(--animation-duration) ease;
    cursor: pointer;
}

.settings-link:hover {
    text-decoration: underline;
    color: var(--accent-color);
}

/* =====================================================
   🎮 APLICACIÓN MÓVIL / MAPA
   ===================================================== */

.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    color: var(--text-color);
}

#user-info {
    color: var(--text-color);
    opacity: 0.9;
}

.map-container {
    position: relative;
    height: 300px;
    margin: 1rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-color);
    background: var(--bg-color);
}

.map-container.enhanced {
    position: relative;
    height: 350px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-color);
}

#map {
    height: 100%;
    width: 100%;
}

.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-color);
    opacity: 0.6;
}

.map-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.status-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    position: relative;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--error-color);
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: var(--success-border);
}

.status-dot.offline {
    background: var(--error-color);
}

.status-indicator.gps-excellent .status-dot {
    background-color: #4caf50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

.status-indicator.gps-good .status-dot {
    background-color: #ff9800;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.3);
}

.status-indicator.gps-poor .status-dot {
    background-color: #f44336;
    box-shadow: 0 0 8px rgba(244, 67, 54, 0.3);
}

.map-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1000;
}

.map-control-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.map-control-btn:hover {
    background: white;
    transform: scale(1.1);
}

.points-horizontal-panel {
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.points-scroll-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.point-item {
    min-width: 120px;
    background: var(--bg-color);
    border-radius: 10px;
    padding: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.point-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: var(--bg-color);
    transform: translateX(10px);
}

.point-item:last-child {
    border-bottom: none;
}

.point-item.active {
    border-color: var(--primary-color2);
    background: linear-gradient(45deg, var(--primary-color2), var(--accent-color));
    color: var(--text-color-in-black);
}

.point-item.invalid-point {
    opacity: 0.6;
    background-color: #f5f5f5;
    border-left: 3px solid #ccc;
}

.point-item.invalid-point .point-info {
    color: #999;
}

.point-item.invalid-point .point-estado {
    color: #d32f2f;
    font-style: italic;
}

.point-item.recently-visited {
    animation: visitedPulse 2s ease-out;
}

.point-item.visited {
    background: linear-gradient(90deg, #e8f5e8 0%, transparent 100%);
    border-left: 4px solid #4caf50;
}

.point-item.visited .point-clave::after {
    content: '✓';
    color: #4caf50;
    margin-left: 8px;
    font-weight: bold;
}

.point-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-bottom: 8px;
}

.point-marker {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.point-clave {
    font-weight: bold;
    font-size: 0.9rem;
    background: rgba(44, 82, 130, 0.1);
    border-radius: 10px;
}

.point-estado {
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: capitalize;
}

.point-nombre {
    font-size: 0.75rem;
    margin-top: 2px;
    font-style: italic;
}

.point-details {
    flex: 1;
}

.point-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.point-name {
    font-weight: 600;
    color: var(--text-color);
}

.point-status {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
}

.point-status.activo {
    background: var(--success-bg);
    color: var(--success-text);
}

.point-status.inactivo {
    background: var(--error-bg-light);
    color: var(--error-text-light);
}

.point-coords {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
    font-family: monospace;
}

.point-action {
    color: var(--border-color);
    opacity: 0;
    transition: all 0.3s ease;
}

.point-item:hover .point-action {
    opacity: 1;
}

.points-list.enhanced {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.controls-panel {
    justify-content: center;
    flex-wrap: wrap;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem;
    padding: 0 0.5rem;
}

/* =====================================================
   📑 PANELES Y TARJETAS (UNIFICADO)
   ===================================================== */

.ronda-header,
.cliente-header,
.settings-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
}

.header-decoration {
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.header-decoration::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.title-icon,
.cliente-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    font-size: 2rem;
}

.ronda-title,
.cliente-titulo,
.settings-title {
    color: var(--text-color-in-black);
    font-size: calc(var(--font-size) * 1.8);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}

.cliente-nome,
.settings-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    margin-bottom: 0.5rem;
}

.cliente-subtitulo,
.settings-subtitle {
    opacity: 0.9;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.ronda-meta,
.cliente-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.ronda-key {
    font-weight: bold;
    font-family: monospace;
    font-size: 1.1em;
}

.cliente-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.cliente-stats {
    display: flex;
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    min-width: 80px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.panel-grid,
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.content-grid {
    grid-template-columns: 2fr 1fr;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.panel {
    background: var(--container-bg);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 25px;
    animation: fadeIn 0.6s ease-out forwards;
}

.panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.panel-header {
    position: relative;
    padding: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}

.panel-header::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.card-client .panel-header,
.rondas-panel .panel-header {
    background: linear-gradient(135deg, var(--card-client), #3a6fa5);
}

.card-config .panel-header,
.info-panel .panel-header {
    background: linear-gradient(135deg, var(--card-config), #5d8ac9);
}

.card-team .panel-header {
    background: linear-gradient(135deg, var(--card-team), #7ba3d3);
}

.card-points .panel-header,
.ubicacion-panel .panel-header {
    background: linear-gradient(135deg, var(--card-points), #f4c430);
}

.card-events .panel-header,
.actividad-panel .panel-header {
    background: linear-gradient(135deg, #8e44ad, #a569bd);
}

.panel-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.8rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    font-size: 1.5rem;
}

.panel-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.panel-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 2;
}

.panel-decorator {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.panel-actions {
    display: flex;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0.6rem;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    background: var(--bg-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.panel-body {
    padding: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 10px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.info-item:hover {
    background: rgba(0, 0, 0, 0.02);
    transform: translateX(5px);
}

.info-item.featured {
    background: linear-gradient(135deg, rgba(44, 82, 130, 0.1), rgba(59, 108, 176, 0.05));
    border: 1px solid rgba(44, 82, 130, 0.2);
}

.info-icon {
    background: var(--primary-color);
    color: white;
    padding: 0.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

.info-content {
    flex: 1;
}

.info-label {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0.2rem;
    font-weight: 500;
    opacity: 0.8;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.info-grid {
    display: grid;
    gap: 1rem;
}

.full-width {
    grid-column: 1 / -1;
}

.days-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.day-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.elegant-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.elegant-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider-text {
    background: var(--container-bg);
    padding: 0 1rem;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.team-members {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.member-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.member-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.member-avatar,
.supervisor-avatar {
    background: var(--card-team);
    color: white;
    padding: 0.8rem;
    border-radius: 50%;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.3rem;
}

.member-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--border-color);
    font-size: 0.9rem;
}

.member-status {
    color: var(--success-border);
    font-size: 1.2rem;
}

/* Rondas específicas */
.rondas-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ronda-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
}

.ronda-card:hover {
    background: linear-gradient(135deg, rgba(44, 82, 130, 0.05), rgba(59, 108, 176, 0.03));
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.ronda-horario {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
}

.ronda-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.ronda-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem;
    background: rgba(59, 108, 176, 0.05);
    border-radius: 10px;
}

.detail-icon {
    color: var(--accent-color);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.detail-label {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

.detail-value {
    font-weight: 700;
    color: var(--text-color);
    margin-left: auto;
}

.ronda-supervisor {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(93, 138, 201, 0.1);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.ronda-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--error-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ronda-status.active {
    display: flex;
    background: var(--success-border);
}

.ronda-status i {
    animation: pulse 2s infinite;
}

/* Eventos */
.event-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
}

.event-item:hover {
    transform: translateX(5px);
}

.event-timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 20px;
}

.event-dot {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--container-bg);
    z-index: 2;
}

.event-line {
    width: 2px;
    flex: 1;
    background: var(--border-color);
    margin-top: 5px;
}

.event-item:last-child .event-line {
    display: none;
}

.event-content {
    flex: 1;
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 10px;
}

.event-type-badge,
.event-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    font-size: 18px;
    font-weight: 600;
}

.event-timestamp {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.event-details>div,
.event-user,
.event-description,
.event-location,
.event-multimedia {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 15px;
}

.event-user i,
.event-description i,
.event-location i,
.event-multimedia i {
    color: var(--accent-color);
    width: 16px;
}

.event-icon {
    font-size: 24px;
    display: flex;
    align-items: flex-start;
    padding-top: 3px;
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.event-fecha {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
}

.multimedia-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    color: var(--card-points);
    font-weight: 500;
}

.multimedia-link:hover {
    text-decoration: underline;
    color: var(--accent-color);
    color: var(--primary-color);
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.actividad-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.evento-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
}

.evento-item:hover {
    background: rgba(59, 108, 176, 0.05);
    transform: translateX(5px);
}

.evento-icon {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.evento-content {
    flex: 1;
}

.evento-tipo {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.evento-descripcion {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.evento-fecha {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
}

.no-data,
.no-events {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
    font-style: italic;
    padding: 3rem;
    color: var(--text-color);
    opacity: 0.6;
}

.no-events-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-events-text h6 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.no-events-text p {
    color: var(--border-color);
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 8px;
}

.pagination a,
.pagination span {
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.pagination a {
    background: var(--container-bg);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.pagination a:hover {
    background: var(--primary-color);
    color: var(--text-light);
}

.pagination .current {
    background: var(--primary-color);
    color: var(--text-light);
    border: 1px solid var(--primary-color);
}

/* Botones de acción principales */
.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: var(--container-bg);
    border-radius: 20px;
    box-shadow: 0 8px 25px var(--shadow-color);
    border: 1px solid var(--border-color);
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
}

.back-button {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s
}

.user-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    color: var(--text-color);
}

.user-header {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 2rem;
    min-height: 200px;
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
    flex-wrap: wrap;
}

.user-avatar {
    position: relative;
    flex-shrink: 0;
}

.avatar-circle {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    backdrop-filter: blur(10px);
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.avatar-status {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 25px;
    height: 25px;
    background: var(--success-border);
    border-radius: 50%;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.user-info {
    flex: 1;
    min-width: 300px;
}

.user-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.user-meta {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

.meta-item i {
    width: 20px;
    opacity: 0.8;
}

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-shrink: 0;
}

.user-actions .action-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    backdrop-filter: blur(10px);
    min-width: 140px;
    justify-content: center;
}

.user-actions .action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Paneles específicos para usuario */
.card-info .panel-header {
    background: linear-gradient(135deg, #2c5282, #3a6fa5);
}

.card-stats .panel-header {
    background: linear-gradient(135deg, #4a6fa5, #5d8ac9);
}

.card-supervision .panel-header {
    background: linear-gradient(135deg, #5d8ac9, #7ba3d3);
}

.card-assignments .panel-header {
    background: linear-gradient(135deg, #e6b422, #f4c430);
}

.card-activity .panel-header {
    background: linear-gradient(135deg, #8e44ad, #a569bd);
}

/* Estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.rondas {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.stat-icon.equipos {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.stat-icon.activas {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.stat-icon.puntos {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.stat-content {
    text-align: left;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-top: 0.3rem;
}

/* Tarjetas de ronda */
.ronda-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.ronda-card:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ronda-info {
    flex: 1;
}

.ronda-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ronda-clave {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: monospace;
}

.ronda-status {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.ronda-status.active {
    background: var(--success-bg);
    color: var(--success-text);
}

.ronda-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

.detail-item i {
    width: 16px;
    color: var(--accent-color);
}

.view-btn {
    background: var(--primary-color);
    color: white;
    padding: 0.8rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    background: var(--accent-color);
    transform: scale(1.1);
    color: white;
}

/* Asignaciones */
.assignment-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    background: var(--bg-color);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.assignment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.assignment-icon {
    background: var(--card-assignments);
    color: white;
    padding: 0.8rem;
    border-radius: 50%;
    font-size: 1.2rem;
}

.assignment-info {
    flex: 1;
}

.assignment-ronda {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: monospace;
}

.assignment-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.8;
}

.detail i {
    width: 14px;
    color: var(--accent-color);
}

.assignment-status {
    display: flex;
    align-items: center;
}

.status-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.status-badge.active {
    background: var(--success-bg);
    color: var(--success-border);
}

/* Timeline de actividad */
.activity-timeline {
    position: relative;
}

.activity-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    z-index: 2;
    position: relative;
}

.activity-icon.success {
    background: var(--success-border);
}

.activity-icon.info {
    background: var(--card-config);
}

.activity-icon.warning {
    background: var(--warning-color);
}

.activity-content {
    flex: 1;
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.activity-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--border-color);
}

.loading-state {
    text-align: center;
    padding: 2rem;
    color: var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.uuid-text {
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

/* Responsivo */
@media (max-width: 768px) {
    .user-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .user-title {
        font-size: 2rem;
    }

    .user-actions {
        flex-direction: row;
        justify-content: center;
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}
