/* Estilos personalizados del proyecto MMK */

/* Default Lucide Icon Scaling (Mimics FontAwesome) */
svg.lucide,
[data-lucide] {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.125em;
    display: inline-block;
}


.auth-logo {
    max-width: 150px;
    height: auto;
}

/* Estilos para el cuerpo de las páginas de Auth */
.auth-body {
    background: #f3f4f6 !important;
}

.auth-page-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start !important;
    /* Alineado arriba para permitir márgenes fijos */
    padding: 20px;
}

/* Margen superior solo en escritorio */
@media (min-width: 640px) {
    .auth-inner-container {
        margin-top: 100px;
    }
}

/* Alineación de formularios de auth en móviles */
@media (max-width: 639px) {
    .auth-page-wrapper {
        padding-top: 40px !important;
        /* Margen superior de 40px en móvil */
        padding-bottom: 40px !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
    }
}

.auth-form-container {
    padding: 35px;
}

/* Checkboxes en fondos claros (como el de Auth) */
.auth-form-container input[type="checkbox"]:not(.switch input) {
    background: #ffffff;
    border-color: #d1d5db;
    /* gray-300 */
}

.auth-form-container input[type="checkbox"]:not(.switch input):hover {
    border-color: var(--primary);
    background: rgba(0, 141, 150, 0.05);
}

.auth-form-container input[type="checkbox"]:not(.switch input):checked {
    background: var(--primary);
    border-color: var(--primary);
}

/* Mensajes de Error en Formularios */
.custom-error-alert {
    background-color: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.login-auth-error {
    margin-top: 0;
    margin-bottom: 20px;
}

.custom-error-icon {
    color: #ef4444;
    flex-shrink: 0;
    margin-top: 2px;
}

.custom-error-icon svg {
    width: 20px;
    height: 20px;
}

.custom-error-list {
    margin: 0;
    padding-left: 0;
    list-style-type: none;
}

.custom-error-item {
    color: #991b1b;
    font-size: 0.875rem;
    line-height: 1.4;
    font-weight: 500;
}

/* Mensajes de Éxito en Formularios */
.custom-success-alert {
    background-color: #f0fdf4;
    border-left: 4px solid #22c55e;
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.custom-success-icon {
    color: #22c55e;
    flex-shrink: 0;
    margin-top: 2px;
}

.custom-success-text {
    color: #166534;
    font-size: 0.875rem;
    line-height: 1.4;
    font-weight: 500;
}

/* Sumario Mensual / Monthly Summary */
.summary-info-text {
    margin: 15px 0 20px 0;
    color: #4b5563;
    font-size: 0.95rem;
}

.summary-info-icon {
    margin-right: 5px;
}

.summary-totals-row {
    font-weight: bold;
    border-top: 2px solid #15323b;
}

.summary-totals-row td {
    padding: 16px;
    border-bottom: none;
}

.summary-totals-label {
    text-align: right;
    padding-right: 15px;
}

/* Tarjetas de previsualización (Vista de liquidación) */
.preview-dash-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.preview-dash-cards>.preview-dash-card:first-child {
    grid-column: span 2;
}

@media(min-width: 768px) {
    .preview-dash-cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
    }

    .preview-dash-cards>.preview-dash-card:first-child {
        grid-column: 1 / -1;
    }

    /* Clase específica para forzar 5 en línea en la vista de detalle */
    .preview-dash-cards.dash-single-line {
        grid-template-columns: repeat(5, 1fr);
    }

    .preview-dash-cards.dash-single-line>.preview-dash-card:first-child {
        grid-column: auto;
    }
}

.preview-dash-card {
    background: rgba(30, 30, 45, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.preview-dash-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 12px;
}

.preview-dash-value {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.preview-dash-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.icon-danger {
    background: rgba(241, 65, 108, 0.1);
    color: #f1416c;
}

.icon-warning {
    background: rgba(255, 199, 0, 0.1);
    color: #ffc700;
}

.icon-primary {
    background: rgba(0, 141, 150, 0.1);
    color: #008d96;
}

.icon-cyan {
    background: rgba(0, 158, 247, 0.1);
    color: #009ef7;
}

.icon-green {
    background: rgba(80, 205, 137, 0.1);
    color: #50cd89;
}

.icon-white {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-primary {
    color: var(--primary);
}

.text-info,
.text-cyan {
    color: var(--info);
}

.text-success,
.text-green {
    color: var(--success);
}

.text-white {
    color: #ffffff;
}

.text-muted {
    color: var(--text-muted);
}

.preview-dist-container {
    background: rgba(0, 141, 150, 0.02);
    margin-top: 24px;
    border: 1px solid rgba(0, 141, 150, 0.1);
}

.preview-dist-title {
    margin-bottom: 8px;
}

.direct-income-msg {
    background: rgba(0, 141, 150, 0.05);
    border: 1px dashed rgba(0, 141, 150, 0.3);
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
}

.direct-income-value {
    color: #50cd89;
}

:root {
    --primary: #008d96;
    --primary-light: #00b4bf;
    --primary-dark: #006b73;
    --bg-dark: #0f1117;
    --bg-card: #1a1d27;
    --bg-sidebar: #141620;
    --bg-input: #232636;
    --text-primary: #e8e9ed;
    --text-secondary: #8b8ea0;
    --text-muted: #9a9cb1;
    --border-color: #2a2d3e;
    --danger: #f1416c;
    --warning: #f59e0b;
    --success: #10b981;
    --info: #3b82f6;
    --sidebar-width: 260px;
}

/* Tom Select Dark Theme Overrides */
.ts-control {
    background-color: var(--bg-input) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
    padding: 9px 14px !important;
}

.ts-control>input {
    color: var(--text-primary) !important;
    font-family: 'Inter', sans-serif !important;
}

.ts-dropdown {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}

.ts-dropdown .option {
    padding: 10px 16px !important;
    color: var(--text-primary);
}

.ts-dropdown .active {
    background-color: var(--primary) !important;
    color: #fff !important;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-header h1 svg {
    width: 22px;
    height: 22px;
}

.sidebar-header span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.nav-link:hover {
    background: rgba(0, 141, 150, 0.1);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 141, 150, 0.3);
}

.nav-link i,
.nav-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border-color);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: capitalize;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.btn-logout svg {
    width: 18px;
    height: 18px;
}

.btn-logout:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar-left h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
}

.hamburger:hover {
    background: var(--bg-input);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

.page-content {
    padding: 28px 32px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 24px;
    transition: border-color 0.2s;
}

.card:hover {
    border-color: rgba(0, 141, 150, 0.3);
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
}

/* Metric Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card .metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}

.metric-card .metric-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.metric-card .metric-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.metric-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.03;
}

.metric-icon.teal {
    background: rgba(0, 141, 150, 0.15);
    color: var(--primary);
}

.metric-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.metric-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.metric-icon.orange {
    background: rgba(249, 115, 22, 0.15);
    color: var(--warning);
}

.metric-icon.red {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.charts-grid-equal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.charts-grid-triple {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

@media (min-width: 1200px) {
    .table-container {
        overflow-x: hidden;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

table tbody tr {
    transition: background-color 0.15s;
}

table tbody tr:hover {
    background-color: rgba(0, 141, 150, 0.04);
}

.table-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.table-link:hover {
    color: var(--primary);
}

/* Global Table Actions Toggle */
.table-actions-wrapper {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    max-width: 0;
    opacity: 0;
    /*overflow: hidden;*/
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
    z-index: 1;
}

.table-actions-wrapper.expanded {
    max-width: 300px;
    opacity: 1;
    margin-right: 8px;
}

.table-actions-wrapper+button {
    z-index: 2;
}

.action-icon-transition {
    transition: transform 0.3s ease;
}

.action-icon-transition.rotated {
    transform: rotate(45deg);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-pagado {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge-adeuda {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge-parcial {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.badge-web {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.badge-secondary {
    background: rgba(139, 142, 160, 0.15);
    color: #8b8ea0;
}

.badge i,
.badge svg,
.badge-web i,
.badge-web svg {
    margin-right: 4px;
    width: 14px;
    height: 14px;
}

/* Activity Log */
.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background-color: rgba(0, 141, 150, 0.04);
}

.activity-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.activity-icon.icon-created {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.activity-icon.icon-updated {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.activity-icon.icon-deleted {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.activity-icon.icon-imported {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.activity-icon.icon-email_sent {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}

.activity-icon.icon-settings {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.activity-icon.icon-web_status {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.activity-body {
    flex: 1;
    min-width: 0;
}

.activity-description {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.activity-meta i {
    margin-right: 3px;
    font-size: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 15px rgba(0, 141, 150, 0.3);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 141, 150, 0.15);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%238b8ea0' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

input[type="date"].form-control {
    height: 40px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(1);
    opacity: 0.6;
    transition: opacity 0.2s;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}


.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Filters */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 20px;
}

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

.filters-bar .form-control {
    width: auto;
    min-width: 160px;
}

/* Custom Checkboxes */
input[type="checkbox"]:not(.switch input) {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

input[type="checkbox"]:not(.switch input):hover {
    border-color: var(--primary);
    background: rgba(0, 141, 150, 0.05);
}

input[type="checkbox"]:not(.switch input):checked {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(0, 141, 150, 0.2);
}

input[type="checkbox"]:not(.switch input):checked::after {
    content: '';
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    display: block;
    animation: checkbox-pop 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes checkbox-pop {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

input[type="checkbox"]:not(.switch input):focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 141, 150, 0.2);
}

input[type="checkbox"]:not(.switch input):active {
    transform: scale(0.9);
}

/* Alerts / Notifications */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--info);
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 20px 0;
}

.pagination-wrapper a,
.pagination-wrapper span {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-wrapper a {
    color: var(--text-secondary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
}

.pagination-wrapper a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-wrapper .active span {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}

.pagination-wrapper .disabled span {
    color: var(--text-muted);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    opacity: 0.5;
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-input);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border: 1px solid var(--border-color);
    margin-bottom: 6px;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 28px;
    width: 90%;
    max-width: 480px;
}

.modal h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Custom Email Preview Modal */
.preview-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preview-modal-overlay.active {
    display: flex;
}

.preview-modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 900px;
    height: 90vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
}

.preview-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
}

.preview-modal-body {
    flex-grow: 1;
    padding: 0;
    background: #f1f1f1;
    position: relative;
}

.preview-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #f1f1f1;
}

.preview-modal-footer {
    padding: 12px 25px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    text-align: right;
    display: flex;
    justify-content: end;
    gap: 10px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.3s ease forwards;
}

.billing-actions-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    background: rgba(30, 30, 45, 0.5);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.billing-actions-wrapper .form-group {
    margin-bottom: 0;
    flex: 0 0 300px;
}

.billing-actions-wrapper .form-actions {
    margin-top: 0 !important;
    flex-direction: row !important;
    gap: 12px !important;
    flex: 1;
    justify-content: flex-end !important;
}


/* Pagination Desktop */
.pagination-custom .btn {
    width: 40px;
    height: 40px;
    padding: 0 !important;
    justify-content: center;
}

.pagination-custom .btn .btn-text {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .hamburger {
        display: block;
    }

    .page-content {
        padding: 20px 16px;
    }

    .billing-actions-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px;
    }

    .billing-actions-wrapper .form-group {
        flex: none;
        width: 100%;
    }

    .billing-actions-wrapper .form-actions {
        flex-direction: column !important;
        width: 100%;
    }

    .card {
        padding: 16px !important;
    }


    .top-bar {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .btn-text {
        display: none;
    }

    .btn:not(.btn-sm):not(.btn-icon) {
        width: 40px;
        height: 40px;
        padding: 0 !important;
        justify-content: center;
        gap: 0;
        flex: none;
    }

    .btn-sm:not(.form-actions .btn) {
        width: 32px;
        height: 32px;
        padding: 0 !important;
        justify-content: center;
    }

    .top-bar-right {
        display: flex;
        width: 100%;
        justify-content: flex-end;
    }

    .top-bar-right:empty {
        display: none;
    }

    .top-bar-right>div,
    .top-bar-right form,
    .top-bar-right .flex {
        width: auto;
        display: flex;
        gap: 8px !important;
    }

    .top-bar-right .btn {
        /* Inherits 40x40 from .btn above */
        font-size: 13px;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px !important;
        padding-top: 24px !important;
    }

    .form-actions .btn {
        width: 100% !important;
        height: 50px !important;
        padding: 0 24px !important;
        justify-content: center !important;
        gap: 0px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        border-radius: 12px !important;
        text-transform: none;
        display: flex !important;
        align-items: center !important;
    }

    .form-actions .btn svg {
        width: 18px !important;
        height: 18px !important;
    }

    .form-actions .btn .btn-text {
        display: inline !important;
    }

    .form-actions .btn-primary {
        background: var(--primary) !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(0, 141, 150, 0.2) !important;
    }

    .form-actions .btn-success {
        background: #10b981 !important;
        /* Force solid success color */
        color: white !important;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important;
    }

    .form-actions .btn-danger {
        background: #ef4444 !important;
        /* Force solid danger color */
        color: white !important;
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2) !important;
    }

    .form-actions .btn-secondary {
        background: var(--bg-card) !important;
        border: 1px solid var(--border-color) !important;
        color: var(--text-primary) !important;
    }

    .form-actions-divider {
        display: none;
    }

    /* Disable tooltips on mobile to avoid sticking */
    [data-tooltip]::before,
    [data-tooltip]::after {
        display: none !important;
    }

    /* Horizontal scroll for status filters on mobile */
    .status-filters {
        flex-wrap: nowrap !important;
        padding: 0 16px 15px 16px !important;
        margin: 0 -16px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 5px;
    }

    .status-filters::-webkit-scrollbar {
        display: none;
    }

    .status-filters .badge-web {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .charts-grid,
    .charts-grid-equal,
    .charts-grid-triple {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Settlement Detail Mobile Adjustments */
    .period-title {
        font-size: 1.25rem !important;
        line-height: 1.2;
    }

    .badge {
        font-size: 11px !important;
        padding: 4px 10px;
    }

    .preview-dash-cards {
        gap: 8px !important;
    }

    .preview-dash-card {
        padding: 12px !important;
        min-width: 0;
    }

    .preview-dash-value {
        font-size: 1.15rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .preview-dash-label {
        font-size: 11px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .settlement-section-title {
        font-size: 1.1rem !important;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .pagination-custom {
        gap: 6px !important;
    }

    .pagination-custom .btn {
        width: 38px !important;
        height: 38px !important;
        font-size: 13px !important;
    }

    .filters-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 16px 0;
    }

    .filters-bar>div:first-child {
        grid-column: span 2;
        min-width: 0 !important;
    }

    .filters-bar .form-control,
    .filters-bar select {
        width: 100% !important;
        min-width: unset !important;
        margin: 0 !important;
    }

    .filter-actions {
        grid-column: span 2;
        display: flex;
        gap: 12px;
        width: 100%;
    }

    .filter-actions .btn {
        flex: 1;
        justify-content: center;
        display: inline-flex;
        align-items: center;
        text-align: center;
    }




    .top-bar-left h2 {
        font-size: 16px;
        margin-bottom: 0;
    }

    .breadcrumb {
        font-size: 11px;
        margin-top: 3px;
    }


}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .metric-card {
        padding: 16px;
    }

    .metric-card .metric-value {
        font-size: 20px;
    }

    .metric-card .metric-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        margin-bottom: 12px;
    }
}

/* Tooltip System (Pure CSS) */
[data-tooltip] {
    position: relative;
    cursor: pointer;
    display: inline-flex;
}

/* Specific right alignment for table actions */
.text-right [data-tooltip]::before {
    left: auto;
    right: 0;
    transform: translateY(-8px);
}

.text-right [data-tooltip]:hover::before {
    transform: translateY(-12px);
}

/* Right align for actions column */
.text-right [data-tooltip]::before {
    left: auto;
    right: 0;
    transform: none;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* Utility classes */
.text-right {
    text-align: right;
}

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

.font-mono {
    font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
}

.hidden {
    display: none !important;
}

.hover-opacity {
    transition: opacity 0.2s;
}

.hover-opacity:hover {
    opacity: 1 !important;
}

/* Switch toggle */
.switch {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    width: 44px;
    height: 24px;
}

.switch input {
    display: none;
}

.switch-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-input);
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.3s;
    border: 1px solid var(--border-color);
}

.switch-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.3s;
}

.switch input:checked+.switch-slider {
    background: var(--primary);
    border-color: var(--primary);
}

.switch input:checked+.switch-slider::after {
    transform: translateX(20px);
    background: #fff;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 15px;
    margin-bottom: 20px;
}

.period-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
}

.settlement-section-title {
    color: var(--text-primary);
    margin-bottom: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Custom details element for Breakdown */
.custom-details summary {
    cursor: pointer;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    transition: background 0.2s;
    font-size: 14px;
}

.custom-details summary:hover {
    background: rgba(255, 255, 255, 0.06);
}

.custom-details[open] summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}

.custom-details .details-content {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: none;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    max-height: 200px;
    overflow-y: auto;
}

.custom-details summary::marker {
    display: none;
    content: "";
}

.custom-details summary::-webkit-details-marker {
    display: none;
}

.custom-details summary::before {
    content: '▶';
    display: inline-block;
    font-size: 0.8rem;
    margin-right: 2px;
    transition: transform 0.2s;
    color: var(--detail-color, var(--primary));
}

.custom-details[open] summary::before {
    transform: rotate(90deg);
}

.formula-badge {
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
    margin-top: 6px;
    display: inline-block;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

/* Clases de Utilidad (Spacing & Layout) */
.m-0 {
    margin: 0 !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mr-0 {
    margin-right: 0 !important;
}

.ml-0 {
    margin-left: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mr-1 {
    margin-right: 0.25rem !important;
}

.ml-1 {
    margin-left: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mr-2 {
    margin-right: 0.5rem !important;
}

.ml-2 {
    margin-left: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mr-3 {
    margin-right: 1rem !important;
}

.ml-3 {
    margin-left: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mr-4 {
    margin-right: 1.5rem !important;
}

.ml-4 {
    margin-left: 1.5rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

.p-0 {
    padding: 0 !important;
}

.pt-0 {
    padding-top: 0 !important;
}

.pb-0 {
    padding-bottom: 0 !important;
}

.p-1 {
    padding: 0.25rem !important;
}

.pt-1 {
    padding-top: 0.25rem !important;
}

.pb-1 {
    padding-bottom: 0.25rem !important;
}

.p-2 {
    padding: 0.5rem !important;
}

.pt-2 {
    padding-top: 0.5rem !important;
}

.pb-2 {
    padding-bottom: 0.5rem !important;
}

.p-3 {
    padding: 1rem !important;
}

.pt-3 {
    padding-top: 1rem !important;
}

.pb-3 {
    padding-bottom: 1rem !important;
}

.p-4 {
    padding: 1.5rem !important;
}

.pt-4 {
    padding-top: 1.5rem !important;
}

.pb-4 {
    padding-bottom: 1.5rem !important;
}

.flex {
    display: flex !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.flex-col {
    flex-direction: column !important;
}

.items-center {
    align-items: center !important;
}

.items-start {
    align-items: flex-start !important;
}

.justify-start {
    justify-content: flex-start !important;
}

.justify-end {
    justify-content: flex-end !important;
}

.justify-between {
    justify-content: space-between !important;
}

.justify-center {
    justify-content: center !important;
}

.gap-1 {
    gap: 0.25rem !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.gap-3 {
    gap: 1rem !important;
}

.gap-4 {
    gap: 1.5rem !important;
}

#selectedCount {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 5px;
    font-size: 11px;
}

/* Import Wizard - Step Indicator */
.import-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 30px;
    padding: 20px 0 10px 0;
}

.import-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.import-step span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.import-step.active span {
    color: var(--primary);
    font-weight: 600;
}

.import-step.completed span {
    color: var(--success);
}

.import-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    background: var(--bg-input);
    color: var(--text-muted);
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.import-step.active .import-step-circle {
    background: rgba(0, 141, 150, 0.15);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 141, 150, 0.3);
}

.import-step.completed .import-step-circle {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.import-step.completed .import-step-circle svg {
    width: 16px;
    height: 16px;
}

.import-step-line {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    min-width: 40px;
    max-width: 100px;
    margin: 0 4px;
    margin-bottom: 26px;
    transition: background 0.3s;
}

.import-step-line.completed {
    background: var(--success);
}

/* Import - Mapping Header */
.import-mapping-header {
    margin-bottom: 20px;
}

.import-mapping-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.import-mapping-header p {
    font-size: 14px;
}

/* Import - Mapping Table */
.import-mapping-table td:first-child {
    width: 180px;
    white-space: nowrap;
}

.import-mapping-table td:nth-child(2) {
    width: 250px;
}

.mapping-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
    align-items: center;
}

.mapping-sample-chip {
    display: inline-block;
    background: rgba(0, 141, 150, 0.1);
    color: var(--text-primary);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 141, 150, 0.2);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Import - Config Bar (preview step) */
.import-config-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.1);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Import - Count Badge */
.import-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(0, 141, 150, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .import-steps {
        gap: 0;
    }

    .import-step {
        min-width: 70px;
    }

    .import-step span {
        font-size: 10px;
    }

    .import-step-circle {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .import-step-line {
        min-width: 20px;
    }

    .import-config-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Flatpickr Customization */
.flatpickr-calendar {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    border-radius: 12px !important;
    font-family: inherit !important;
    overflow: hidden !important;
    /* Ensure top rounding works */
}

/* Round top corners of the header */
.flatpickr-months {
    border-radius: 12px 12px 0 0 !important;
}

/* Center arrows vertically */
.flatpickr-prev-month,
.flatpickr-next-month {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    /* Match common header height */
    padding: 0 10px !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    vertical-align: middle !important;
}

/* Weekdays line with padding */
.flatpickr-weekdays {
    background: rgba(255, 255, 255, 0.03) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.endRange.nextMonthDay {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.flatpickr-day:hover {
    background: rgba(0, 141, 150, 0.2) !important;
}

.flatpickr-months .flatpickr-month {
    color: var(--text-primary) !important;
    height: 40px;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-weight: 500 !important;
    font-size: 14px !important;
    height: 40px;
    padding: 0 10px;
}

.flatpickr-current-month .numInputWrapper {
    width: 100%;
}

.flatpickr-current-month input.cur-year {
    font-weight: 500 !important;
    font-size: 14px !important;
    height: 40px;
    text-align: center;
}

.flatpickr-current-month {
    font-size: 14px !important;
    padding: 0 !important;
    height: 40px;
    display: flex;
    justify-content: center;
}

span.flatpickr-weekday {
    color: var(--text-muted) !important;
    font-weight: 600 !important;
    padding: 6px 0 !important;
}

.flatpickr-day {
    color: var(--text-primary) !important;
    border-radius: 8px !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: rgba(255, 255, 255, 0.1) !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: rgba(255, 255, 255, 0.2) !important;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
    border-bottom-color: var(--border-color) !important;
}

/* Fix for Flatpickr altInput styling */
.flatpickr-input[readonly] {
    cursor: pointer;
}

.form-control.flatpickr-input {
    background: var(--bg-input) !important;
}