/* ===== Variables ===== */
:root {
    --primary: #0066cc;
    --primary-dark: #004d99;
    --primary-light: #e6f0ff;
    --secondary: #6c757d;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --purple: #9c27b0;
    --orange: #ff9800;

    --bg-primary: #f5f7fa;
    --bg-white: #ffffff;
    --bg-dark: #1a1f36;

    --text-primary: #1a1f36;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;

    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);

    --sidebar-width: 260px;
    --header-height: 70px;
    --radius: 12px;
    --radius-md: 10px;
    --radius-sm: 8px;
}

/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    font-family: inherit;
}

input, select, textarea {
    font-family: inherit;
}

/* ===== Screens ===== */
.screen {
    display: none !important;
}

#login-screen.active {
    display: flex !important;
}

#app-screen.active {
    display: flex !important;
}

/* ===== Login Screen ===== */
#login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

/* Login Wrapper - Two column layout */
.login-wrapper {
    display: flex;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    width: 80vw;
    max-width: 1400px;
    min-height: 600px;
}

.login-image {
    flex: 3;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-container {
    flex: 1;
    background: var(--bg-white);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 320px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.logo-img {
    max-width: 280px;
    height: auto;
}

.logo-img-sidebar {
    max-width: 180px;
    height: auto;
    filter: brightness(0) invert(1);
}

.logo-img-credential {
    max-width: 120px;
    height: auto;
    filter: brightness(0) invert(1);
}

.login-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 16px;
    transition: all 0.3s;
}

.login-form input:focus,
.login-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.login-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.login-links a {
    color: var(--primary);
    font-size: 14px;
}

.login-links a:hover {
    text-decoration: underline;
}

/* Login Developer Credit */
.login-developer {
    margin-top: auto;
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-top: 1px solid var(--border-color);
}

.login-developer span {
    font-size: 12px;
    color: var(--text-muted);
}

.developer-logos {
    display: flex;
    align-items: center;
    gap: 20px;
}

.login-developer a {
    display: flex;
    align-items: center;
    transition: opacity 0.3s;
}

.login-developer a:hover {
    opacity: 0.8;
}

.login-developer img {
    height: 44px;
    width: auto;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    border: none;
    transition: all 0.3s;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-dark);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width 0.3s ease;
}

/* Sidebar Collapsed State */
.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .sidebar-header .logo-img-sidebar {
    display: none;
}

.sidebar.collapsed .sidebar-header .role-badge {
    display: none;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 14px;
}

.sidebar.collapsed .nav-item i {
    width: auto;
    font-size: 18px;
}

.sidebar.collapsed .sidebar-footer .nav-item span {
    display: none;
}

/* Tooltips for collapsed sidebar */
.sidebar.collapsed .nav-item {
    position: relative;
}

.sidebar.collapsed .nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-dark);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    margin-left: 10px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.sidebar.collapsed .nav-item:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: 2px solid var(--bg-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 101;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.sidebar-toggle:hover {
    background: var(--primary-dark);
}

.sidebar.collapsed .sidebar-toggle {
    transform: translateY(-50%) rotate(180deg);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header .logo i {
    font-size: 28px;
    color: var(--primary);
}

.sidebar-header .logo span {
    font-size: 20px;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Main Content ===== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    flex: 1;
    transition: margin-left 0.3s ease;
}

/* Main content when sidebar is collapsed */
.sidebar.collapsed ~ .main-content {
    margin-left: 70px;
}

/* ===== Header ===== */
.header {
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 30px;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-primary);
}

.header-title {
    flex: 1;
}

.header-title h2 {
    font-size: 20px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    padding: 8px;
}

.icon-btn .badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-menu img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-menu span {
    font-weight: 500;
}

/* ===== Content ===== */
.content {
    padding: 30px;
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h3 {
    font-size: 24px;
    font-weight: 600;
}

/* ===== Dashboard ===== */
.welcome-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 30px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.welcome-text h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.welcome-text p {
    opacity: 0.9;
}

.welcome-icon {
    font-size: 64px;
    opacity: 0.3;
}

.quick-actions {
    margin-bottom: 30px;
}

.quick-actions h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.action-card {
    background: var(--bg-white);
    border: none;
    padding: 24px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.action-card i {
    font-size: 32px;
    color: var(--primary);
}

.action-card span {
    font-weight: 500;
    color: var(--text-primary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: #e8f5e9; color: var(--success); }
.stat-icon.orange { background: #fff3e0; color: var(--orange); }
.stat-icon.purple { background: #f3e5f5; color: var(--purple); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.recent-activity h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.activity-list {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.activity-icon.green { background: var(--success); }
.activity-icon.blue { background: var(--primary); }
.activity-icon.orange { background: var(--orange); }

.activity-info {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    display: block;
}

.activity-desc {
    color: var(--text-secondary);
    font-size: 14px;
}

.activity-time {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
}

/* ===== Family Grid ===== */
.family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.family-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    transition: transform 0.3s;
}

.family-card:hover {
    transform: translateY(-4px);
}

.family-card.titular {
    border: 2px solid var(--primary);
}

.family-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.family-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 16px;
}

.family-card h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.family-dni {
    color: var(--text-secondary);
    font-size: 14px;
}

.family-relation {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.family-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.family-status.active {
    background: #e8f5e9;
    color: var(--success);
}

.family-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

/* ===== Credentials ===== */
.credentials-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
}

.credential-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.credential-front {
    background: linear-gradient(135deg, #1a1f36 0%, #2d3250 100%);
    color: white;
    padding: 24px;
}

.credential-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.credential-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.credential-logo i {
    font-size: 24px;
    color: var(--primary);
}

.credential-logo span {
    font-size: 18px;
    font-weight: 700;
}

.credential-type {
    background: var(--primary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.credential-body {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.credential-photo img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.credential-info h4 {
    font-size: 20px;
    margin-bottom: 12px;
}

.credential-info p {
    font-size: 14px;
    margin-bottom: 6px;
    opacity: 0.9;
}

.credential-qr {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 16px;
}

.qr-placeholder {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-placeholder i {
    font-size: 60px;
    color: var(--text-primary);
}

.credential-qr span {
    font-size: 14px;
    opacity: 0.8;
}

.credential-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.credential-validity {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    opacity: 0.8;
}

.credential-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.credential-status.valid {
    background: var(--success);
}

.credential-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
}

.credential-actions .btn {
    flex: 1;
}

.credential-selector {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.credential-selector h4 {
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.selector-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selector-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
}

.selector-item:hover {
    background: var(--primary-light);
}

.selector-item.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.selector-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.selector-item span {
    font-size: 14px;
    font-weight: 500;
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.tab {
    padding: 12px 24px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ===== Appointments ===== */
.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.appointment-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
}

.appointment-card.past {
    opacity: 0.7;
}

.appointment-date {
    width: 70px;
    text-align: center;
    padding: 12px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
}

.appointment-date .day {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.appointment-date .month {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
}

.appointment-info {
    flex: 1;
}

.appointment-info h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.appointment-info p {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.appointment-info p i {
    width: 16px;
    color: var(--text-muted);
}

.appointment-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.appointment-status.confirmed {
    background: #e8f5e9;
    color: var(--success);
}

.appointment-status.pending {
    background: #fff3e0;
    color: var(--orange);
}

.appointment-status.completed {
    background: var(--primary-light);
    color: var(--primary);
}

.appointment-actions {
    display: flex;
    gap: 8px;
}

/* ===== Orders ===== */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.order-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.order-number {
    font-weight: 600;
    color: var(--text-secondary);
}

.order-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.order-status.approved {
    background: #e8f5e9;
    color: var(--success);
}

.order-status.used {
    background: var(--primary-light);
    color: var(--primary);
}

.order-body h4 {
    font-size: 16px;
    margin-bottom: 12px;
}

.order-body p {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.order-body p i {
    width: 16px;
    color: var(--text-muted);
}

.order-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.order-detail-item {
    background: var(--bg-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
}

.order-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* ===== Authorizations ===== */
.auth-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow);
}

.auth-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.auth-icon.approved {
    background: #e8f5e9;
    color: var(--success);
}

.auth-icon.pending {
    background: #fff3e0;
    color: var(--orange);
}

.auth-icon.rejected {
    background: #ffebee;
    color: var(--danger);
}

.auth-info {
    flex: 1;
}

.auth-info h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.auth-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.auth-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-info > p {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.auth-progress {
    margin-top: 12px;
}

.progress-bar {
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
}

.auth-progress span {
    font-size: 12px;
    color: var(--text-muted);
}

.auth-rejection-reason {
    margin-top: 8px;
    padding: 8px 12px;
    background: #ffebee;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--danger);
}

.auth-status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-status-badge.approved {
    background: #e8f5e9;
    color: var(--success);
}

.auth-status-badge.pending {
    background: #fff3e0;
    color: var(--orange);
}

.auth-status-badge.rejected {
    background: #ffebee;
    color: var(--danger);
}

.auth-actions {
    display: flex;
    gap: 8px;
}

/* ===== Reimbursements ===== */
.reimbursement-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}

.summary-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.summary-icon.blue { background: var(--primary-light); color: var(--primary); }
.summary-icon.green { background: #e8f5e9; color: var(--success); }
.summary-icon.purple { background: #f3e5f5; color: var(--purple); }

.summary-info {
    display: flex;
    flex-direction: column;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
}

.summary-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== CBU Summary Card with Dropdown ===== */
.summary-card-cbu {
    position: relative;
    cursor: pointer;
}

.summary-card-cbu.highlighted {
    background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(26, 82, 118, 0.3);
}

.summary-card-cbu.highlighted:hover {
    background: linear-gradient(135deg, #154360 0%, #2471a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 82, 118, 0.4);
}

.summary-card-cbu.highlighted .summary-info .summary-value,
.summary-card-cbu.highlighted .summary-info .summary-label {
    color: white;
}

.summary-card-cbu.highlighted .cbu-arrow {
    color: rgba(255, 255, 255, 0.8);
}

.summary-icon.cbu-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.cbu-arrow {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.2s;
}

.summary-card-cbu.open .cbu-arrow {
    transform: rotate(180deg);
}

.cbu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 320px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
    overflow: hidden;
}

.summary-card-cbu.open .cbu-dropdown {
    display: block;
    animation: fadeIn 0.2s ease;
}

.cbu-dropdown-content {
    padding: 16px;
}

.cbu-dropdown-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.cbu-dropdown-row:last-child {
    border-bottom: none;
}

.cbu-dropdown-label {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 50px;
}

.cbu-dropdown-value {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-primary);
    flex: 1;
}

.cbu-dropdown-row:last-child .cbu-dropdown-value {
    font-family: inherit;
}

.cbu-dropdown-footer {
    padding: 12px 16px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.btn-icon-sm {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon-sm:hover {
    background: var(--bg-primary);
    color: var(--primary);
}

.cbu-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.cbu-badge.default {
    background: var(--primary-light);
    color: var(--primary);
}

/* ===== CBU Selector en Modal ===== */
.cbu-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cbu-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.cbu-option:hover {
    border-color: var(--primary-light);
    background: var(--bg-primary);
}

.cbu-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.cbu-option input[type="radio"] {
    display: none;
}

.cbu-option-content {
    flex: 1;
}

.cbu-option-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.cbu-option-header i {
    color: var(--primary);
}

.cbu-option-bank {
    font-weight: 600;
}

.cbu-option-number {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-secondary);
}

.cbu-check {
    color: var(--primary);
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.2s;
}

.cbu-option.selected .cbu-check {
    opacity: 1;
}

.cbu-option-otro .cbu-option-header i {
    color: var(--text-secondary);
}

.cbu-option-otro {
    flex-wrap: wrap;
    align-items: flex-start;
    position: relative;
}

.cbu-option-otro .cbu-option-content {
    width: 100%;
}

.cbu-option-otro .cbu-check {
    position: absolute;
    top: 16px;
    right: 16px;
}

.cbu-manual-input {
    display: none;
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    width: 100%;
}

.cbu-option-otro.selected .cbu-manual-input {
    display: block;
}

.cbu-manual-input .form-group {
    margin-bottom: 12px;
}

.cbu-manual-input .form-group:last-child {
    margin-bottom: 0;
}

.cbu-manual-input .form-group label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

.cbu-manual-input #cbu-manual {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.cbu-manual-input .form-help {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.reimbursement-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reimbursement-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.reimbursement-status {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.reimbursement-status.processing { background: var(--primary); }
.reimbursement-status.approved { background: var(--success); }
.reimbursement-status.paid { background: var(--purple); }

.reimbursement-info {
    flex: 1;
    min-width: 200px;
}

.reimbursement-info h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.reimbursement-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.reimbursement-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.reimbursement-info > p {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.reimbursement-amount {
    text-align: right;
}

.amount-requested {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
}

.amount-approved {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--success);
}

.reimbursement-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.reimbursement-badge.processing { background: var(--primary-light); color: var(--primary); }
.reimbursement-badge.approved { background: #e8f5e9; color: var(--success); }
.reimbursement-badge.paid { background: #f3e5f5; color: var(--purple); }

/* ===== Modals ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
}

.file-upload:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.file-label i {
    font-size: 32px;
    color: var(--primary);
}

/* ===== Selector de Cantidad ===== */
.cantidad-selector {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 150px;
}

.cantidad-selector input {
    width: 60px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-left: none;
    border-right: none;
    padding: 10px 0;
    background: var(--bg-white);
    color: var(--text-primary);
}

.cantidad-selector input:focus {
    outline: none;
}

.btn-cantidad {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-cantidad:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.btn-cantidad:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.btn-cantidad:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-cantidad:active {
    transform: scale(0.95);
}

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-dark);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--danger);
}

.toast-warning {
    background: var(--warning);
    color: var(--text-primary);
}

.toast-info {
    background: var(--info);
}

/* ===== Notifications Dropdown ===== */
.notifications-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 100;
}

.notifications-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.notifications-header h4 {
    font-size: 16px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    cursor: pointer;
}

.btn-link:hover {
    text-decoration: underline;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--bg-primary);
}

.notification-item.unread {
    background: var(--primary-light);
}

.notification-item.unread:hover {
    background: #cce0ff;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.green { background: #e8f5e9; color: var(--success); }
.notification-icon.blue { background: var(--primary-light); color: var(--primary); }
.notification-icon.orange { background: #fff3e0; color: var(--orange); }
.notification-icon.purple { background: #f3e5f5; color: var(--purple); }

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-text {
    font-size: 14px;
    margin-bottom: 2px;
}

.notification-desc {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-time {
    font-size: 12px;
    color: var(--text-muted);
}

.notifications-footer {
    padding: 12px 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.notifications-footer a {
    color: var(--primary);
    font-size: 14px;
}

.notifications-footer a:hover {
    text-decoration: underline;
}

/* ===== User Dropdown ===== */
.user-menu {
    cursor: pointer;
    position: relative;
}

.user-menu-arrow {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.2s;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 200px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 100;
    overflow: hidden;
}

.user-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
}

.user-dropdown-item:hover {
    background: var(--bg-primary);
}

.user-dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.user-dropdown-item:last-child {
    border-top: 1px solid var(--border-color);
    color: var(--danger);
}

.user-dropdown-item:last-child i {
    color: var(--danger);
}

/* ===== Afiliado Detail Modal ===== */
.modal-lg {
    max-width: 800px;
}

.afiliado-detail-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.afiliado-detail-header img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--primary-light);
}

.afiliado-detail-info h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.badge-relation {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-status.active {
    background: #e8f5e9;
    color: var(--success);
}

.badge-status.inactive {
    background: #ffebee;
    color: var(--danger);
}

.afiliado-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.detail-section {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--radius-sm);
}

.detail-section h4 {
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.detail-value {
    font-weight: 500;
    font-size: 13px;
}

/* ===== Form Sections ===== */
.form-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h4 {
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-help {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== Header Actions Position ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

/* ===== Password Input Wrapper ===== */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    flex: 1;
    padding-right: 45px;
}

.btn-toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.btn-toggle-password:hover {
    color: var(--primary);
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .credentials-container {
        grid-template-columns: 1fr;
    }

    .credential-selector {
        order: -1;
    }

    .selector-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .selector-item {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 1024px) {
    .login-wrapper {
        width: 90vw;
    }
}

@media (max-width: 768px) {
    /* Login responsive */
    .login-wrapper {
        flex-direction: column;
        width: 95vw;
        max-width: 420px;
        min-height: auto;
    }

    .login-image {
        display: none;
    }

    .login-container {
        min-width: auto;
        border-radius: var(--radius);
    }

    .content {
        padding: 20px;
    }

    .header {
        padding: 0 16px;
    }

    .user-menu span {
        display: none;
    }

    .section-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .appointment-card {
        flex-wrap: wrap;
    }

    .appointment-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .auth-card {
        flex-wrap: wrap;
    }

    .auth-status-badge {
        order: -1;
        width: 100%;
        justify-content: center;
    }

    .reimbursement-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .reimbursement-amount {
        text-align: left;
        margin-top: 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .credential-body {
        flex-direction: column;
        text-align: center;
    }

    .credential-info {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 24px;
    }

    .welcome-card {
        flex-direction: column;
        text-align: center;
    }

    .welcome-icon {
        display: none;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab {
        flex: 1;
        text-align: center;
    }

    .modal-content {
        margin: 10px;
    }

    /* Stats grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Quick actions */
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Family members */
    .family-member-card {
        flex-direction: column;
        text-align: center;
    }

    .member-actions {
        width: 100%;
        justify-content: center;
    }

    /* Notifications dropdown */
    .notifications-dropdown {
        width: calc(100vw - 20px);
        right: -60px;
    }

    /* Order cards */
    .order-card {
        flex-direction: column;
    }

    .order-info {
        width: 100%;
    }

    .order-status {
        width: 100%;
        text-align: center;
        padding-top: 12px;
        border-top: 1px dashed var(--border-color);
    }

    /* Login improvements */
    .login-form .form-group label {
        font-size: 13px;
    }

    .login-links {
        flex-direction: column;
        gap: 8px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .credential-card {
        padding: 16px;
    }

    .credential-type {
        font-size: 10px;
    }

    .credential-name {
        font-size: 16px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ===== Password Recovery Modal Styles ===== */

.modal-content.modal-sm {
    max-width: 420px;
}

.recuperar-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.recuperar-icon i {
    font-size: 36px;
    color: var(--primary);
}

.recuperar-descripcion {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.recuperar-success {
    text-align: center;
    padding: 10px 0;
}

.recuperar-success .success-icon {
    width: 80px;
    height: 80px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.recuperar-success .success-icon i {
    font-size: 40px;
    color: var(--success);
}

.recuperar-success h4 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.recuperar-success > p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.recuperar-email {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
}

.recuperar-instrucciones {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 24px;
}

.recuperar-instrucciones p {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.recuperar-instrucciones p:last-child {
    margin-bottom: 0;
}

.recuperar-instrucciones i {
    color: var(--primary);
    width: 16px;
}

.recuperar-reenviar {
    display: block;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
}

.recuperar-reenviar strong {
    color: var(--primary);
}

.recuperar-reenviar:hover strong {
    text-decoration: underline;
}

/* ===== Registration Wizard Styles ===== */

/* Wizard Steps */
.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.wizard-step .step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-primary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.wizard-step.active .step-number {
    background: var(--primary);
    color: white;
}

.wizard-step.completed .step-number {
    background: var(--success);
    color: white;
}

.wizard-step.completed .step-number::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.wizard-step .step-info {
    display: flex;
    flex-direction: column;
}

.wizard-step .step-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.wizard-step .step-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.wizard-connector {
    width: 60px;
    height: 3px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 0 8px;
    transition: all 0.3s ease;
}

.wizard-connector.completed {
    background: var(--success);
}

/* Wizard Etapa */
.wizard-etapa {
    animation: fadeIn 0.3s ease;
}

/* DNI Upload Section */
.dni-upload-section h4,
.section-afiliacion h4,
.contact-section h4,
.registro-resumen h4 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dni-upload-section h4 i,
.section-afiliacion h4 i,
.contact-section h4 i,
.registro-resumen h4 i {
    color: var(--primary);
}

.section-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.dni-upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .dni-upload-grid {
        grid-template-columns: 1fr;
    }
}

.dni-upload-card {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.dni-upload-card:hover {
    border-color: var(--primary);
}

.dni-upload-card.uploaded {
    border-color: var(--success);
    border-style: solid;
}

.dni-upload-label {
    display: block;
    cursor: pointer;
    position: relative;
}

.dni-preview {
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.dni-preview i {
    font-size: 40px;
    color: var(--text-muted);
}

.dni-preview img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.dni-upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 102, 204, 0.9);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s ease;
}

.dni-upload-label:hover .dni-upload-overlay {
    opacity: 1;
}

.dni-upload-overlay i {
    font-size: 28px;
}

.dni-status {
    padding: 10px;
    text-align: center;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.status-pending {
    color: var(--text-muted);
    font-size: 13px;
}

.status-pending i {
    margin-right: 6px;
}

.status-uploaded {
    color: var(--success);
    font-size: 13px;
    font-weight: 500;
}

.status-uploaded i {
    margin-right: 6px;
}

.status-processing {
    color: var(--primary);
    font-size: 13px;
}

.status-processing i {
    margin-right: 6px;
}

.status-error {
    color: var(--danger);
    font-size: 13px;
}

.status-error i {
    margin-right: 6px;
}

.optimization-stats {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

/* Boton captura camara */
.btn-capture-camera {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: 2px solid white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-capture-camera:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.btn-capture-camera i {
    font-size: 16px;
}

.dni-upload-card {
    position: relative;
}

/* Info de optimizacion */
.dni-optimization-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #e3f2fd;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
    color: #1565c0;
}

.dni-optimization-info i {
    font-size: 18px;
}

.btn-validate {
    margin-top: 16px;
}

/* RENAPER Result */
.renaper-result {
    margin-top: 24px;
    border: 2px solid var(--success);
    border-radius: var(--radius);
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

.renaper-header {
    background: var(--success);
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.renaper-header i {
    font-size: 18px;
}

.renaper-data {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    background: #f8fff8;
}

@media (max-width: 500px) {
    .renaper-data {
        grid-template-columns: 1fr;
    }
}

.renaper-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.renaper-field .field-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.renaper-field .field-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* RENAPER Afiliacion Badges */
.renaper-afiliacion {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: white;
    border-top: 1px solid #c8e6c9;
}

@media (max-width: 600px) {
    .renaper-afiliacion {
        flex-direction: column;
    }
}

.afiliacion-badge {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
}

.afiliacion-badge > i {
    font-size: 20px;
    color: var(--primary);
}

.afiliacion-info {
    display: flex;
    flex-direction: column;
}

.afiliacion-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.afiliacion-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.renaper-note {
    padding: 12px 16px;
    background: #fff8e1;
    border-top: 1px solid #c8e6c9;
    font-size: 13px;
    color: var(--orange);
    display: flex;
    align-items: center;
    gap: 8px;
}

.renaper-note i {
    font-size: 14px;
}

/* Section Afiliacion */
.section-afiliacion {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease;
}

/* Contact Section */
.contact-section {
    margin-bottom: 24px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-method-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.contact-method-card.active {
    border-color: var(--primary);
}

.contact-method-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-primary);
}

.contact-method-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-method-info > i {
    font-size: 24px;
    color: var(--primary);
    width: 32px;
    text-align: center;
}

.contact-method-info > i.fa-whatsapp {
    color: #25D366;
}

.method-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

.required-badge {
    display: inline-block;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: 500;
    vertical-align: middle;
}

.optional-badge {
    display: inline-block;
    background: var(--text-muted);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: 500;
    vertical-align: middle;
}

.contact-method-card.required {
    border-color: var(--primary);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

.input-with-icon input {
    padding-left: 44px;
}

.field-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* WhatsApp Status */
.whatsapp-status {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.whatsapp-checking {
    background: var(--bg-primary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.whatsapp-found {
    background: #e8f5e9;
    color: #2e7d32;
    display: flex;
    align-items: center;
    gap: 10px;
}

.whatsapp-found i {
    font-size: 18px;
    color: #25D366;
}

.whatsapp-not-found {
    background: #fff3e0;
    color: var(--orange);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* WhatsApp Badge in detail view */
.whatsapp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #25D366;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 500;
}

.whatsapp-badge i {
    font-size: 12px;
}

.no-whatsapp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--text-muted);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 500;
}

/* ===== WhatsApp Message Tracking ===== */
.message-tracking {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}

.message-tracking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.message-tracking-title {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.message-tracking-title i {
    color: #25D366;
}

.message-tracking-time {
    font-size: 11px;
    color: var(--text-muted);
}

.message-status-flow {
    display: flex;
    align-items: center;
    gap: 4px;
}

.message-status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.message-status-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: var(--bg-primary);
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.message-status-step.completed .message-status-icon {
    background: #25D366;
    color: white;
}

.message-status-step.current .message-status-icon {
    background: var(--primary);
    color: white;
    animation: pulse 1.5s infinite;
}

.message-status-step.failed .message-status-icon {
    background: var(--danger);
    color: white;
}

.message-status-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: center;
}

.message-status-step.completed .message-status-label {
    color: #25D366;
    font-weight: 500;
}

.message-status-step.current .message-status-label {
    color: var(--primary);
    font-weight: 500;
}

.message-status-step.failed .message-status-label {
    color: var(--danger);
    font-weight: 500;
}

.message-status-connector {
    flex: 0.5;
    height: 2px;
    background: var(--border-color);
    margin-bottom: 18px;
}

.message-status-connector.completed {
    background: #25D366;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Message tracking compact view */
.message-tracking-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.message-tracking-compact i.fa-whatsapp {
    color: #25D366;
    font-size: 16px;
}

.message-tracking-compact .status-icon {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.message-tracking-compact .status-icon.processed { color: var(--text-muted); }
.message-tracking-compact .status-icon.sent { color: var(--text-secondary); }
.message-tracking-compact .status-icon.delivered { color: #25D366; }
.message-tracking-compact .status-icon.read { color: #53bdeb; }
.message-tracking-compact .status-icon.failed { color: var(--danger); }

.message-tracking-compact .status-icon.completed { color: #25D366; }
.message-tracking-compact .status-icon.current {
    color: var(--primary);
    animation: pulse 1.5s ease-in-out infinite;
}

.message-tracking-compact .status-text {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 11px;
}

/* Message tracking header styles */
.message-tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.tracking-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.tracking-label i {
    color: #25D366;
    margin-right: 4px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.btn-link:hover {
    color: var(--primary-hover);
}

/* Message history info */
.message-history-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.history-reference {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.history-recipient {
    font-size: 13px;
    color: var(--text-secondary);
}

.history-recipient i {
    margin-right: 6px;
}

/* History message card */
.history-message {
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.history-message + .history-message {
    margin-top: 12px;
}

.history-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-message-type {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.history-message-type i {
    margin-right: 6px;
    color: var(--primary);
}

.history-message-date {
    font-size: 12px;
    color: var(--text-muted);
}

.history-message-preview {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    border-left: 3px solid #25D366;
}

.history-message-status {
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}

/* Status timeline */
.status-timeline {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 70px;
}

.timeline-step i {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 12px;
}

.timeline-step span {
    font-size: 11px;
    color: var(--text-muted);
}

.timeline-step small {
    font-size: 10px;
    color: var(--text-muted);
}

.timeline-step.completed i {
    background: #25D366;
    color: white;
}

.timeline-step.completed span {
    color: var(--text-primary);
    font-weight: 500;
}

.timeline-step.completed.read i {
    background: #53bdeb;
}

.timeline-connector {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    min-width: 20px;
    margin: 0 4px;
    margin-bottom: 30px;
}

.timeline-connector.completed {
    background: #25D366;
}

/* Double check icon for delivered/read */
.double-check {
    position: relative;
    width: 16px;
    height: 12px;
}

.double-check i {
    position: absolute;
    font-size: 12px;
}

.double-check i:first-child {
    left: 0;
}

.double-check i:last-child {
    left: 5px;
}

/* Message history modal styles */
.message-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-history-item {
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--border-color);
}

.message-history-item.read {
    border-left-color: #53bdeb;
}

.message-history-item.delivered {
    border-left-color: #25D366;
}

.message-history-item.sent {
    border-left-color: var(--text-muted);
}

.message-history-item.failed {
    border-left-color: var(--danger);
}

.message-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.message-history-type {
    font-weight: 600;
    font-size: 13px;
}

.message-history-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

.message-history-status.read {
    background: #e3f2fd;
    color: #53bdeb;
}

.message-history-status.delivered {
    background: #e8f5e9;
    color: #25D366;
}

.message-history-status.sent {
    background: var(--bg-primary);
    color: var(--text-secondary);
}

.message-history-status.failed {
    background: #ffebee;
    color: var(--danger);
}

.message-history-content {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.message-history-meta {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: var(--text-muted);
}

.message-history-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.method-desc {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.contact-method-body {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease;
}

.contact-preferences {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border-color);
    border-radius: 28px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* Registro Resumen */
.registro-resumen {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--radius);
}

.resumen-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 500px) {
    .resumen-grid {
        grid-template-columns: 1fr;
    }
}

.resumen-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.resumen-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resumen-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Button Success */
.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* Responsive Wizard */
@media (max-width: 600px) {
    .wizard-steps {
        flex-direction: column;
        gap: 16px;
    }

    .wizard-connector {
        width: 3px;
        height: 30px;
        margin: 0;
    }

    .wizard-step {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Error Modal Styles ===== */

/* Error Modal Content */
.modal-content.modal-error {
    max-width: 420px;
    border-radius: var(--radius);
    overflow: hidden;
}

/* Error Modal Headers */
.modal-header-error {
    background: linear-gradient(135deg, var(--danger) 0%, #c82333 100%);
    color: white;
    border-bottom: none;
    padding: 24px 20px;
    text-align: center;
    flex-direction: column;
    gap: 12px;
}

.modal-header-error-general {
    background: linear-gradient(135deg, var(--orange) 0%, #e65100 100%);
    color: white;
    border-bottom: none;
    padding: 24px 20px;
    text-align: center;
    flex-direction: column;
    gap: 12px;
}

.modal-header-blocked {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border-bottom: none;
    padding: 24px 20px;
    text-align: center;
    flex-direction: column;
    gap: 12px;
}

.modal-header-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #e0a800 100%);
    color: #1a1f36;
    border-bottom: none;
    padding: 24px 20px;
    text-align: center;
    flex-direction: column;
    gap: 12px;
}

/* Error Icons */
.error-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.error-icon i {
    font-size: 36px;
    color: white;
}

.error-icon-general {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.error-icon-general i {
    font-size: 36px;
    color: white;
}

.error-icon-blocked {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.error-icon-blocked i {
    font-size: 36px;
    color: white;
}

.error-icon-warning {
    width: 70px;
    height: 70px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.error-icon-warning i {
    font-size: 36px;
    color: #1a1f36;
}

/* Error Modal Body */
.modal-body-error {
    padding: 24px 20px;
    text-align: center;
}

/* Error Messages */
.error-message {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.error-message strong {
    color: var(--danger);
}

.error-details {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.error-details p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.error-details p:last-child {
    margin-bottom: 0;
}

.error-details p i {
    color: var(--primary);
    margin-top: 3px;
    width: 16px;
    flex-shrink: 0;
}

.error-code {
    display: inline-block;
    background: var(--bg-primary);
    color: var(--text-muted);
    font-size: 12px;
    font-family: monospace;
    padding: 6px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}

/* Retry Counter */
.retry-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background: #fff3e0;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--orange);
}

.retry-counter i {
    font-size: 16px;
}

.retry-counter strong {
    font-weight: 600;
}

/* Error Help Section */
.error-help {
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: left;
    margin-bottom: 20px;
}

.error-help h5 {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-help ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.error-help ul li {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.error-help ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: var(--primary);
    position: absolute;
    left: 0;
    top: 7px;
}

/* Help Options */
.help-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.help-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.help-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.help-option i {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.help-option-info {
    flex: 1;
}

.help-option-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.help-option-desc {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Support Contact */
.support-contact {
    padding: 16px;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #2d3250 100%);
    border-radius: var(--radius-sm);
    text-align: center;
    color: white;
}

.support-contact p {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.support-contact a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.support-contact a i {
    font-size: 20px;
    color: #25D366;
}

.support-contact a:hover {
    text-decoration: underline;
}

/* Error Modal Footer */
.modal-footer-error {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-footer-error .btn {
    width: 100%;
}

.modal-footer-error .btn-secondary {
    font-size: 13px;
}

/* Blocked Account Specific Styles */
.blocked-info {
    background: #ffebee;
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 20px;
}

.blocked-info p {
    font-size: 14px;
    color: var(--danger);
    margin-bottom: 8px;
}

.blocked-info p:last-child {
    margin-bottom: 0;
}

.blocked-info strong {
    display: block;
    margin-top: 8px;
    font-size: 13px;
}

/* User Not Found Specific Styles */
.not-found-info {
    margin-bottom: 20px;
}

.dni-searched {
    display: inline-block;
    background: var(--bg-primary);
    font-size: 18px;
    font-weight: 700;
    font-family: monospace;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    margin-bottom: 16px;
}

.not-found-suggestions {
    text-align: left;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.not-found-suggestions h5 {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.not-found-suggestions h5 i {
    color: var(--warning);
}

.not-found-suggestions ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.not-found-suggestions ul li {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 0;
    padding-left: 24px;
    position: relative;
}

.not-found-suggestions ul li::before {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary);
    position: absolute;
    left: 8px;
    top: 8px;
}

/* Responsive Error Modals */
@media (max-width: 480px) {
    .modal-content.modal-error {
        margin: 10px;
        max-width: calc(100vw - 20px);
    }

    .error-icon,
    .error-icon-general,
    .error-icon-blocked,
    .error-icon-warning {
        width: 60px;
        height: 60px;
    }

    .error-icon i,
    .error-icon-general i,
    .error-icon-blocked i,
    .error-icon-warning i {
        font-size: 28px;
    }

    .modal-header-error h3,
    .modal-header-error-general h3,
    .modal-header-blocked h3,
    .modal-header-warning h3 {
        font-size: 16px;
    }

    .help-option {
        padding: 12px;
    }

    .help-option i {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* ===== DATA TABLE STYLES ===== */

.table-container {
    overflow-x: auto;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-primary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table td {
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: var(--bg-primary);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive table */
@media (max-width: 768px) {
    .data-table {
        font-size: 13px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }

    .data-table th:nth-child(n+4),
    .data-table td:nth-child(n+4) {
        display: none;
    }

    .data-table th:last-child,
    .data-table td:last-child {
        display: table-cell;
    }
}

/* ===== EMPLEADOR MODULE STYLES ===== */

/* Card empleador actual */
.empleador-actual-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 24px;
    border-left: 4px solid var(--primary);
}

.empleador-actual-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.empleador-actual-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.empleador-actual-icon i {
    font-size: 20px;
    color: var(--primary);
}

.empleador-actual-info {
    flex: 1;
}

.empleador-actual-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.empleador-actual-info h4 {
    margin: 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.empleador-actual-info p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.empleador-actual-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.empleador-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.empleador-detail-item i {
    color: var(--text-muted);
    width: 16px;
}

/* Tabla de empleadores */
.empleador-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.empleador-cell strong {
    font-weight: 500;
    color: var(--text-primary);
}

.empleador-cell small {
    font-size: 12px;
    color: var(--text-muted);
}

/* Modal archivos empleador */
.emp-archivos-info {
    padding: 12px 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.emp-archivos-info p {
    margin: 4px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.emp-archivos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.emp-archivo-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.emp-archivo-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emp-archivo-icon i {
    font-size: 20px;
    color: var(--primary);
}

.emp-archivo-info {
    flex: 1;
}

.emp-archivo-info strong {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
}

.emp-archivo-info small {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.emp-archivo-info .badge {
    font-size: 11px;
}

.emp-archivo-actions {
    flex-shrink: 0;
}

/* Comentarios empleador */
.emp-comentarios-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.emp-comentario-item {
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
}

.emp-comentario-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.emp-comentario-autor {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

.emp-comentario-autor i {
    margin-right: 4px;
    color: var(--primary);
}

.emp-comentario-rol {
    font-size: 12px;
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 10px;
}

.emp-comentario-fecha {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.emp-comentario-texto {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Opcion autofirma */
.emp-opcion-autofirma {
    padding: 16px;
    background: #e3f2fd;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.emp-opcion-autofirma .checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.emp-opcion-autofirma .checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.emp-opcion-autofirma .checkbox-label strong {
    color: var(--text-primary);
    font-size: 14px;
}

.emp-opcion-autofirma .checkbox-label small {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Checkmark custom */
.checkbox-container {
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 22px;
    width: 22px;
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    display: none;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

/* Metodo 2FA */
.emp-metodo-2fa {
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.emp-metodo-2fa > label {
    display: block;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.emp-2fa-options {
    display: flex;
    gap: 16px;
}

.radio-card {
    flex: 1;
    cursor: pointer;
}

.radio-card input {
    display: none;
}

.radio-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.radio-card input:checked + .radio-card-content {
    border-color: var(--primary);
    background: var(--primary-light);
}

.radio-card-content i {
    font-size: 28px;
    color: var(--text-muted);
}

.radio-card input:checked + .radio-card-content i {
    color: var(--primary);
}

.radio-card-content i.fa-whatsapp {
    color: #25D366;
}

.radio-card-content span {
    font-weight: 500;
    font-size: 14px;
}

.radio-card-content small {
    font-size: 12px;
    color: var(--text-muted);
}

/* Modal Firma 2FA */
.firma-2fa-container {
    text-align: center;
    padding: 20px 0;
}

.firma-2fa-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.firma-2fa-icon i {
    font-size: 36px;
    color: var(--primary);
}

.firma-2fa-icon i.fa-whatsapp {
    color: #25D366;
}

.firma-2fa-mensaje {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.firma-2fa-input {
    margin-bottom: 16px;
}

.firma-2fa-input input {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 8px;
    padding: 16px;
    width: 200px;
    max-width: 100%;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    outline: none;
}

.firma-2fa-input input:focus {
    border-color: var(--primary);
}

.firma-2fa-input input::placeholder {
    color: var(--border-color);
}

.firma-2fa-expira {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.firma-2fa-expira i {
    margin-right: 4px;
}

/* Empty states small */
.empty-state-sm {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.empty-cell {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-cell i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    color: var(--border-color);
}

.empty-cell p {
    margin: 0;
}

.loading-cell {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.loading-cell i {
    margin-right: 8px;
}

/* Badge small */
.badge-sm {
    font-size: 10px !important;
    padding: 2px 6px !important;
}

/* Text muted helper */
.text-muted {
    color: var(--text-muted);
}

/* Responsive empleador */
@media (max-width: 768px) {
    .empleador-actual-header {
        flex-direction: column;
    }

    .empleador-actual-details {
        flex-direction: column;
        gap: 12px;
    }

    .emp-2fa-options {
        flex-direction: column;
    }

    .emp-archivo-item {
        flex-direction: column;
        text-align: center;
    }

    .emp-archivo-actions {
        width: 100%;
    }

    .emp-archivo-actions .btn {
        width: 100%;
    }

    .emp-comentario-fecha {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }
}

/* ===== AFILIADO - METODO FIRMA CARDS ===== */

.section-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.emp-metodo-card {
    display: block;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.emp-metodo-card:hover {
    border-color: var(--primary-light);
}

.emp-metodo-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.emp-metodo-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.emp-metodo-radio {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.emp-metodo-card.selected .emp-metodo-radio {
    border-color: var(--primary);
}

.radio-check {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.2s ease;
}

.emp-metodo-card.selected .radio-check {
    background: var(--primary);
}

.emp-metodo-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.emp-metodo-info strong {
    font-size: 14px;
    color: var(--text-primary);
}

.emp-metodo-info strong i {
    margin-right: 6px;
    color: var(--primary);
}

.emp-metodo-card-body {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}

.emp-metodo-card-body p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

/* 2FA selector inline */
.emp-2fa-selector {
    margin-top: 12px;
}

.emp-2fa-selector > label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.radio-card-mini {
    cursor: pointer;
}

.radio-card-mini input {
    display: none;
}

.radio-card-mini-content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    background: white;
}

.radio-card-mini input:checked + .radio-card-mini-content {
    border-color: var(--primary);
    background: white;
}

.radio-card-mini-content i {
    font-size: 20px;
    color: var(--text-muted);
}

.radio-card-mini input:checked + .radio-card-mini-content i {
    color: var(--primary);
}

.radio-card-mini-content i.fa-whatsapp {
    color: #25D366;
}

.radio-card-mini-content span {
    font-weight: 500;
    font-size: 13px;
}

.radio-card-mini-content small {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}

/* Firma digital actions inline */
.emp-firma-digital-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
}

.emp-codigo-container {
    margin-top: 16px;
    padding: 16px;
    background: #e8f5e9;
    border-radius: var(--radius);
}

.emp-codigo-msg {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.emp-codigo-msg i {
    margin-right: 6px;
}

.emp-codigo-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.emp-codigo-input-group input {
    flex: 0 0 140px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 4px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
}

.emp-codigo-input-group input:focus {
    border-color: var(--primary);
    outline: none;
}

.emp-codigo-timer {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.emp-codigo-timer i {
    margin-right: 4px;
}

.emp-codigo-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #c8e6c9;
    border-radius: var(--radius);
    margin-top: 12px;
}

.emp-codigo-status.success {
    color: var(--success);
}

.emp-codigo-status.success i {
    font-size: 18px;
}

/* File selected state */
.file-label.file-selected {
    background: #e8f5e9;
    border-color: var(--success);
}

.file-label.file-selected i {
    color: var(--success);
}

/* Firma manual actions */
.emp-firma-manual-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.emp-download-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.emp-download-section small {
    font-size: 12px;
    color: var(--text-muted);
}

.emp-upload-section label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

/* Nota informativa */
.emp-nota-info {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #fff8e1;
    border-radius: var(--radius);
    border-left: 4px solid var(--orange);
}

.emp-nota-info > i {
    font-size: 20px;
    color: var(--orange);
    flex-shrink: 0;
}

.emp-nota-info strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.emp-nota-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* ===== ADMIN - EMPLEADORES SECTION ===== */

.empleadores-admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

.empleadores-admin-tabs .tab-btn {
    padding: 12px 20px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.empleadores-admin-tabs .tab-btn:hover {
    color: var(--primary);
}

.empleadores-admin-tabs .tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.empleadores-admin-tabs .tab-btn .badge {
    font-size: 11px;
}

.empleadores-tab-content {
    display: none;
}

.empleadores-tab-content.active {
    display: block;
}

/* Nav badge for pending items */
.nav-badge {
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

/* Admin afiliado info card */
.emp-admin-afiliado-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.emp-admin-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
}

.emp-admin-datos {
    flex: 1;
}

.emp-admin-datos h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
}

.emp-admin-datos p {
    margin: 2px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.emp-admin-datos p i {
    width: 16px;
    color: var(--text-muted);
}

.emp-admin-fecha {
    text-align: right;
}

.emp-admin-fecha .label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.emp-admin-fecha .value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Admin archivos list */
.emp-admin-archivos {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.emp-admin-archivo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.emp-admin-archivo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emp-admin-archivo-icon i {
    font-size: 18px;
    color: var(--primary);
}

.emp-admin-archivo-info {
    flex: 1;
}

.emp-admin-archivo-info strong {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

/* CUIT search */
.emp-admin-cuit-search {
    margin-bottom: 16px;
}

.emp-admin-cuit-search .input-group {
    display: flex;
    gap: 8px;
}

.emp-admin-cuit-search input {
    flex: 1;
}

/* CUIT result */
.emp-admin-cuit-result {
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.emp-cuit-status {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
}

.emp-cuit-status.loading {
    color: var(--primary);
}

.emp-cuit-status.success {
    color: var(--success);
}

.emp-cuit-status.error {
    color: var(--danger);
}

.emp-cuit-status i {
    margin-right: 8px;
}

.emp-cuit-datos {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.emp-dato-row {
    display: flex;
    gap: 12px;
    padding: 6px 0;
}

.emp-dato-row label {
    font-size: 13px;
    color: var(--text-muted);
    min-width: 100px;
}

.emp-dato-row span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Detalle empleador modal */
.emp-detalle-section {
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.emp-detalle-section h4 {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 8px 0;
}

.emp-detalle-section p {
    margin: 4px 0;
    font-size: 14px;
}

/* Filters bar */
.filters-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
}

.filter-group input {
    width: 200px;
}

/* Responsive admin empleadores */
@media (max-width: 768px) {
    .emp-admin-afiliado-info {
        flex-direction: column;
        text-align: center;
    }

    .emp-admin-fecha {
        text-align: center;
    }

    .emp-admin-archivo-item {
        flex-wrap: wrap;
    }

    .emp-admin-archivo-info {
        flex: 1 1 100%;
        order: 1;
    }

    .filters-bar {
        flex-direction: column;
    }

    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-group input {
        width: 100%;
    }
}

/* ===== FORM WIZARD STYLES ===== */

/* Modal XL for large forms */
.modal-content.modal-xl {
    max-width: 900px;
    width: 95%;
    max-height: 95vh;
}

.modal-content.modal-xl .modal-body {
    max-height: calc(95vh - 140px);
    overflow-y: auto;
    padding: 24px;
}

/* Wizard Steps Progress Bar */
.form-wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    padding: 0 10px;
    position: relative;
}

.form-wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 3px;
    background: var(--border-color);
    z-index: 0;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.wizard-step.active .step-number,
.wizard-step.completed .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.wizard-step.completed .step-number {
    background: var(--success);
    border-color: var(--success);
}

.step-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    max-width: 100px;
}

.wizard-step.active .step-label,
.wizard-step.completed .step-label {
    color: var(--text-primary);
}

/* Wizard Panels */
.wizard-panel {
    display: none;
}

.wizard-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wizard-panel-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.wizard-panel-title i {
    margin-right: 10px;
    color: var(--primary);
}

/* Wizard Footer */
.wizard-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.wizard-footer .btn-secondary:first-child {
    margin-right: auto;
}

/* Form Rows with Flex */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-row .form-group.flex-2 {
    flex: 2;
}

/* Required field indicator */
.required {
    color: var(--danger);
}

/* DDJJ Sections */
.ddjj-intro {
    background: var(--primary-light);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.ddjj-intro i {
    color: var(--primary);
    margin-right: 8px;
}

.ddjj-section {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.ddjj-section:last-child {
    border-bottom: none;
}

.ddjj-section h5 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ddjj-section h5 i {
    color: var(--primary);
}

.ddjj-mujeres {
    background: linear-gradient(to right, #fce4ec, transparent);
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-top: 24px;
    border-left: 4px solid #e91e63;
}

.ddjj-mujeres h5 {
    color: #c2185b;
}

.ddjj-mujeres h5 i {
    color: #e91e63;
}

/* DDJJ Questions */
.ddjj-question {
    margin-bottom: 16px;
}

.ddjj-question > label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 10px;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 24px;
    margin-bottom: 8px;
}

.radio-group.inline {
    display: inline-flex;
    margin-left: 16px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.radio-option span {
    color: var(--text-primary);
}

/* Conditional Fields */
.conditional-field {
    margin-top: 12px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.conditional-input {
    width: 100%;
    margin-top: 8px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.conditional-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.conditional-input {
    resize: vertical;
    min-height: 60px;
}

/* Documentation List */
.docs-required-list {
    background: var(--primary-light);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.docs-required-list h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.docs-required-list ul {
    margin: 0;
    padding-left: 20px;
}

.docs-required-list li {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* DDJJ Confirmation */
.ddjj-confirmation {
    background: #fff8e1;
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-top: 24px;
    border: 1px solid var(--warning);
}

.ddjj-legal-text {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--warning);
}

.ddjj-legal-text p {
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    text-align: justify;
}

.ddjj-legal-text p:last-child {
    margin-bottom: 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--primary);
}

/* File Upload Styling */
.file-upload {
    margin-bottom: 8px;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.file-label:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-label i {
    font-size: 24px;
    color: var(--text-muted);
}

.file-label span {
    font-size: 14px;
    color: var(--text-secondary);
}

.file-label.file-selected {
    border-color: var(--success);
    border-style: solid;
    background: #e8f5e9;
}

.file-label.file-selected i {
    color: var(--success);
}

.file-label.file-selected span {
    color: var(--success);
    font-weight: 500;
}

/* Responsive Wizard */
@media (max-width: 768px) {
    .modal-content.modal-xl {
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-content.modal-xl .modal-body {
        max-height: calc(100vh - 140px);
    }

    .form-wizard-steps {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .form-wizard-steps::before {
        display: none;
    }

    .wizard-step {
        flex: 0 0 auto;
        min-width: 70px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .step-label {
        font-size: 10px;
        max-width: 70px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 16px;
    }

    .radio-group {
        flex-direction: column;
        gap: 12px;
    }

    .radio-group.inline {
        display: flex;
        flex-direction: row;
        margin-left: 0;
        margin-top: 8px;
    }

    .wizard-footer {
        flex-wrap: wrap;
    }

    .wizard-footer .btn {
        flex: 1 1 auto;
        min-width: 120px;
    }

    .ddjj-section h5 {
        font-size: 14px;
    }

    .ddjj-question > label {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .form-wizard-steps {
        padding: 0;
    }

    .wizard-step {
        min-width: 60px;
    }

    .step-label {
        display: none;
    }

    .wizard-panel-title {
        font-size: 16px;
    }
}

/* ===== RENAPER SECTION STYLES ===== */

.renaper-section {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.renaper-section .section-description {
    margin-bottom: 16px;
}

/* DNI Upload Grid in Wizard */
.renaper-section .dni-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.renaper-section .dni-upload-card {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.3s ease;
}

.renaper-section .dni-upload-card:hover {
    border-color: var(--primary);
}

.renaper-section .dni-upload-card.uploaded {
    border-color: var(--success);
    border-style: solid;
}

.renaper-section .dni-upload-label {
    display: block;
    cursor: pointer;
    position: relative;
}

.renaper-section .dni-preview {
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: white;
    margin: 0;
    border-radius: 0;
    max-height: none;
}

.renaper-section .dni-preview i {
    font-size: 32px;
    color: var(--text-muted);
}

.renaper-section .dni-preview span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.renaper-section .dni-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0;
    border: none;
}

.renaper-section .dni-upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 102, 204, 0.9);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.renaper-section .dni-upload-label:hover .dni-upload-overlay {
    opacity: 1;
}

.renaper-section .dni-upload-overlay i {
    font-size: 24px;
    color: white;
}

.renaper-section .dni-upload-overlay span {
    font-size: 12px;
    color: white;
}

.renaper-section .dni-status {
    padding: 8px 12px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    text-align: center;
}

.renaper-section .status-pending {
    color: var(--text-muted);
}

.renaper-section .status-pending i {
    font-size: 12px;
    margin-right: 4px;
}

.renaper-section .status-processing {
    color: var(--primary);
}

.renaper-section .status-processing i {
    font-size: 12px;
    margin-right: 4px;
}

.renaper-section .status-uploaded {
    color: var(--success);
    font-weight: 500;
}

.renaper-section .status-uploaded i {
    font-size: 12px;
    margin-right: 4px;
}

.renaper-section .status-error {
    color: var(--danger);
}

.renaper-section .status-error i {
    font-size: 12px;
    margin-right: 4px;
}

/* DNI Stats */
.renaper-section .dni-stats {
    padding: 6px 12px;
    background: #e8f5e9;
    font-size: 11px;
}

.renaper-section .dni-stats .stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
}

.renaper-section .dni-stats .stats-row i {
    font-size: 10px;
    color: var(--text-muted);
}

.renaper-section .dni-stats .reduction {
    color: var(--success);
    font-weight: 600;
}

/* Optimization info */
.renaper-section .dni-optimization-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 102, 204, 0.05);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--primary);
}

.renaper-section .dni-optimization-info i {
    font-size: 14px;
}

@media (max-width: 480px) {
    .renaper-section .dni-upload-grid {
        grid-template-columns: 1fr;
    }
}

.renaper-action {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
}

.renaper-hint {
    font-size: 13px;
    color: var(--text-muted);
}

.renaper-hint.success {
    color: var(--success);
    font-weight: 500;
}

/* DNI Preview */
.dni-preview {
    margin-top: 8px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-height: 150px;
}

.dni-preview img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* Auto-filled field animation */
.auto-filled {
    animation: autoFillHighlight 0.5s ease;
    background-color: #e8f5e9 !important;
    border-color: var(--success) !important;
}

@keyframes autoFillHighlight {
    0% { background-color: white; }
    50% { background-color: #c8e6c9; }
    100% { background-color: #e8f5e9; }
}

/* Datos personales fields section */
.datos-personales-fields {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

/* Form section title */
.form-section {
    margin-bottom: 24px;
}

.form-section h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* Responsive RENAPER */
@media (max-width: 768px) {
    .renaper-action {
        flex-direction: column;
        align-items: flex-start;
    }

    .renaper-action .btn {
        width: 100%;
    }
}
