/* ==========================================
   WEBADIR CRM — Light Minimalist Theme
   Inspired by BizLink CRM Design
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== Design Tokens ===== */
:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Colors — Clean light palette */
    --bg: #FAFAFA;
    --bg-white: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --bg-hover: #F5F5F5;
    --bg-active: #F0F0F0;
    --bg-subtle: #F8F8F8;

    /* Text */
    --text: #1A1A1A;
    --text-secondary: #737373;
    --text-tertiary: #A3A3A3;
    --text-inverse: #FFFFFF;

    /* Borders */
    --border: #E5E5E5;
    --border-light: #F0F0F0;
    --border-focus: #1A1A1A;

    /* Primary — Black/Dark */
    --primary: #1A1A1A;
    --primary-hover: #333333;
    --primary-light: #404040;

    /* Accents */
    --accent: #22C55E;
    --accent-light: #DCFCE7;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #DBEAFE;

    /* Spacing */
    --sidebar-width: 240px;

    /* Radius */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.06);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===== App Layout ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 24px 20px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo .logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

.sidebar-logo .logo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
}

.sidebar-nav {
    padding: 0 12px;
    flex: 1;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    padding: 0 8px;
    margin-bottom: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 450;
    transition: all 0.15s ease;
    cursor: pointer;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.nav-item.active {
    background: var(--bg-active);
    color: var(--text);
    font-weight: 600;
}

.nav-item .nav-icon {
    font-size: 18px;
    width: 22px;
    text-align: center;
    opacity: 0.7;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

.nav-item .nav-badge {
    margin-left: auto;
    background: var(--bg-active);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    min-width: 22px;
    text-align: center;
}

/* ===== Main Content ===== */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Top Bar ===== */
.top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 32px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar .search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    max-width: 400px;
    transition: border-color 0.2s;
}

.top-bar .search-box:focus-within {
    border-color: var(--border-focus);
}

.top-bar .search-box input {
    border: none;
    background: none;
    outline: none;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    width: 100%;
}

.top-bar .search-box input::placeholder {
    color: var(--text-tertiary);
}

.top-bar .search-icon {
    color: var(--text-tertiary);
    font-size: 18px;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.top-bar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
}

.top-bar-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

/* ===== Page Content ===== */
.page-content {
    padding: 28px 32px;
    flex: 1;
}

/* ===== Page Header ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

/* ===== Primary Button (Black pill) ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-full);
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-white);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-focus);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 16px;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.btn-icon.danger:hover {
    background: var(--danger-light);
    color: var(--danger);
    border-color: var(--danger);
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.green {
    background: var(--accent-light);
}

.stat-icon.orange {
    background: var(--warning-light);
}

.stat-icon.red {
    background: var(--danger-light);
}

.stat-icon.blue {
    background: var(--info-light);
}

.stat-icon.gray {
    background: var(--bg-active);
}

.stat-info {
    min-width: 0;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 2px;
}

.stat-arrow {
    margin-left: auto;
    color: var(--text-tertiary);
    font-size: 18px;
    cursor: pointer;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.card-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ===== CRM Kanban/Pipeline Columns ===== */
.pipeline-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.pipeline-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pipeline-column-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 4px;
}

.pipeline-column-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.pipeline-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ===== Entity Card (Client/Project cards in pipeline) ===== */
.entity-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.entity-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: #d4d4d4;
}

.entity-card.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.entity-card .entity-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.entity-card .entity-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.entity-card .entity-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.entity-card .entity-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.entity-card .entity-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.entity-card .entity-more {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    border-radius: var(--radius-xs);
    transition: all 0.15s;
}

.entity-card .entity-more:hover {
    background: var(--bg-hover);
    color: var(--text);
}

/* ===== Kanban Board (Tasks/Agenda) ===== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.kanban-column {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    min-height: 250px;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.kanban-column-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.kanban-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.kanban-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 10px;
    transition: all 0.2s;
    cursor: pointer;
}

.kanban-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: #d4d4d4;
}

.kanban-card .task-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kanban-card .task-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== Status Badges / Tags ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    border: 1px solid transparent;
}

.badge.activo,
.badge.pagada,
.badge.en-curso,
.badge.hecho {
    background: var(--accent-light);
    color: #15803D;
    border-color: #BBF7D0;
}

.badge.potencial,
.badge.borrador,
.badge.backlog {
    background: var(--bg);
    color: var(--text-secondary);
    border-color: var(--border);
}

.badge.moroso,
.badge.vencida,
.badge.bloqueado {
    background: var(--danger-light);
    color: #B91C1C;
    border-color: #FECACA;
}

.badge.inactivo {
    background: var(--bg-active);
    color: var(--text-tertiary);
    border-color: var(--border);
}

.badge.enviada,
.badge.hoy {
    background: var(--info-light);
    color: #1D4ED8;
    border-color: #93C5FD;
}

.badge.finalizado {
    background: #F3E8FF;
    color: #7C3AED;
    border-color: #DDD6FE;
}

/* Task Categories */
.task-category {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.task-category.category-dev {
    background: #DBEAFE;
    color: #1D4ED8;
}

.task-category.category-seo {
    background: #FEF3C7;
    color: #B45309;
}

.task-category.category-reunion,
.task-category.category-reunión {
    background: #F3E8FF;
    color: #7C3AED;
}

.task-category.category-admin {
    background: #E0E7FF;
    color: #4338CA;
}

.task-category.category-otro {
    background: var(--bg-active);
    color: var(--text-secondary);
}

/* ===== Form Styling ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* ===== Timer Widget ===== */
.timer-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-white);
    font-size: 13px;
}

.timer-widget.active {
    border-color: var(--accent);
    background: var(--accent-light);
}

.timer-widget .timer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}

.timer-widget .timer-time {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-family: 'Inter', monospace;
    color: var(--text);
    font-size: 14px;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* ===== Renewal Item ===== */
.renewal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: all 0.15s;
}

.renewal-item:hover {
    background: var(--bg-hover);
}

.renewal-item.urgent {
    border-left: 3px solid var(--danger);
    background: rgba(239, 68, 68, 0.02);
}

.renewal-item.soon {
    border-left: 3px solid var(--warning);
    background: rgba(245, 158, 11, 0.02);
}

/* ===== Profitability Semaphore ===== */
.semaphore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 13px;
}

.semaphore.green {
    color: #15803D;
}

.semaphore.yellow {
    color: #B45309;
}

.semaphore.red {
    color: #B91C1C;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state .empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== Data Table Styling ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    text-align: left;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-subtle);
}

.data-table tbody td {
    padding: 12px 14px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

/* ===== Radzen Overrides — Light theme ===== */
.rz-datatable {
    background: transparent !important;
    border: none !important;
    font-family: var(--font) !important;
}

.rz-datatable .rz-datatable-thead>tr>th {
    background: var(--bg-subtle) !important;
    border-bottom: 1px solid var(--border) !important;
    color: var(--text-secondary) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    padding: 10px 14px !important;
}

.rz-datatable .rz-datatable-tbody>tr>td {
    border-bottom: 1px solid var(--border-light) !important;
    padding: 12px 14px !important;
    color: var(--text) !important;
    font-size: 14px !important;
}

.rz-datatable .rz-datatable-tbody>tr:hover>td {
    background: var(--bg-hover) !important;
}

.rz-datatable-pager {
    background: transparent !important;
    border-top: 1px solid var(--border) !important;
}

.rz-pager .rz-paginator-page,
.rz-pager .rz-paginator-element {
    color: var(--text-secondary) !important;
}

.rz-pager .rz-state-active {
    background: var(--primary) !important;
    color: var(--text-inverse) !important;
    border-radius: var(--radius-sm) !important;
}

/* Radzen inputs */
.rz-textbox,
.rz-inputtext,
.rz-spinner .rz-inputtext,
.rz-datepicker .rz-inputtext,
.rz-textarea {
    background: var(--bg-white) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text) !important;
    font-family: var(--font) !important;
    font-size: 14px !important;
    padding: 10px 14px !important;
    transition: border-color 0.2s !important;
}

/* Dropdown container — no padding on the container itself */
.rz-dropdown {
    background: var(--bg-white) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text) !important;
    font-family: var(--font) !important;
    font-size: 14px !important;
    transition: border-color 0.2s !important;
    min-height: 40px !important;
}

/* Dropdown label — ensure text is visible */
.rz-dropdown .rz-dropdown-label {
    padding: 8px 14px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    color: var(--text) !important;
    display: block !important;
    line-height: 1.5 !important;
}

/* Dropdown placeholder */
.rz-dropdown .rz-placeholder {
    color: var(--text-tertiary) !important;
    padding: 8px 14px !important;
}

/* Dropdown trigger button */
.rz-dropdown .rz-dropdown-trigger {
    background: transparent !important;
    border-left: 1px solid var(--border-light) !important;
    color: var(--text-secondary) !important;
}

.rz-textbox:focus,
.rz-inputtext:focus,
.rz-dropdown.rz-state-focused,
.rz-datepicker.rz-state-focused .rz-inputtext {
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.06) !important;
}

/* Radzen buttons */
.rz-button.rz-primary {
    background: var(--primary) !important;
    border: none !important;
    border-radius: var(--radius-full) !important;
    color: var(--text-inverse) !important;
    font-weight: 600 !important;
    font-family: var(--font) !important;
    transition: all 0.2s !important;
}

.rz-button.rz-primary:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md) !important;
}

.rz-button.rz-light,
.rz-button.rz-secondary {
    background: var(--bg-white) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-full) !important;
    color: var(--text) !important;
    font-family: var(--font) !important;
}

.rz-button.rz-light:hover,
.rz-button.rz-secondary:hover {
    background: var(--bg-hover) !important;
    border-color: var(--border-focus) !important;
}

.rz-button.rz-danger {
    background: var(--bg-white) !important;
    border: 1px solid var(--danger) !important;
    border-radius: var(--radius-full) !important;
    color: var(--danger) !important;
    font-family: var(--font) !important;
}

.rz-button.rz-danger:hover {
    background: var(--danger-light) !important;
}

.rz-button.rz-success {
    background: var(--accent) !important;
    border: none !important;
    border-radius: var(--radius-full) !important;
    color: var(--text-inverse) !important;
    font-family: var(--font) !important;
}

.rz-button.rz-info {
    background: var(--bg-white) !important;
    border: 1px solid var(--info) !important;
    border-radius: var(--radius-full) !important;
    color: var(--info) !important;
    font-family: var(--font) !important;
}

.rz-button.rz-info:hover {
    background: var(--info-light) !important;
}

/* Radzen dialog/notification */
.rz-dialog-content {
    font-family: var(--font) !important;
    color: var(--text) !important;
}

.rz-dialog-wrapper {
    font-family: var(--font) !important;
}

.rz-dialog-titlebar {
    font-family: var(--font) !important;
}

.rz-notification {
    font-family: var(--font) !important;
    border-radius: var(--radius-md) !important;
}

/* Radzen checkbox */
.rz-chkbox .rz-chkbox-box.rz-state-active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* Radzen dropdown panel */
.rz-dropdown-panel {
    background: var(--bg-white) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-lg) !important;
    z-index: 10000 !important;
}

.rz-dropdown-panel .rz-dropdown-item {
    font-family: var(--font) !important;
    font-size: 14px !important;
    padding: 8px 14px !important;
    color: var(--text) !important;
}

.rz-dropdown-panel .rz-dropdown-item:hover {
    background: var(--bg-hover) !important;
}

.rz-dropdown-panel .rz-state-highlight {
    background: var(--bg-active) !important;
    color: var(--text) !important;
}

/* Radzen numeric */
.rz-spinner {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    overflow: hidden;
}

.rz-spinner .rz-inputtext {
    border: none !important;
}

.rz-spinner .rz-spinner-button {
    background: var(--bg-subtle) !important;
    border: none !important;
    border-left: 1px solid var(--border-light) !important;
    color: var(--text-secondary) !important;
}

/* Radzen filter */
.rz-cell-filter .rz-textbox {
    font-size: 13px !important;
    padding: 6px 10px !important;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #D4D4D4;
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: #A3A3A3;
}

/* ===== Utilities ===== */
.text-secondary {
    color: var(--text-secondary);
}

.text-sm {
    font-size: 13px;
}

.text-xs {
    font-size: 12px;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.me-1 {
    margin-right: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .kanban-board,
    .pipeline-board {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-content {
        padding: 16px;
    }

    .top-bar {
        padding: 12px 16px;
    }
}

/* ==========================================
   Webadir CRM — Auth & Session Flow Styling
   ========================================== */

.auth-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.auth-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

.auth-loading-screen p {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.login-layout-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, rgba(240, 240, 240, 0.4) 0%, rgba(250, 250, 250, 0.9) 90%), #FFFFFF;
    position: relative;
    overflow: hidden;
}

.login-wrapper {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 20px;
    z-index: 10;
}

/* Glowing backdrops */
.login-glow-orb-1 {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.12) 0%, rgba(255,255,255,0) 70%);
    top: -100px;
    right: -100px;
    z-index: 1;
    filter: blur(20px);
}

.login-glow-orb-2 {
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(26, 26, 26, 0.04) 0%, rgba(255,255,255,0) 70%);
    bottom: -80px;
    left: -80px;
    z-index: 1;
    filter: blur(20px);
}

.login-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(229, 229, 229, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
    padding: 40px;
    width: 100%;
    z-index: 5;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.login-card-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.login-logo .logo-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--primary);
}

.login-logo .logo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.login-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    color: var(--text-tertiary);
    pointer-events: none;
    transition: color 0.2s ease;
}

.login-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: all 0.2s ease;
}

.login-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.05);
}

.login-input:focus + .input-icon {
    color: var(--primary);
}

.login-error-alert {
    background: var(--danger-light);
    border: 1px solid #FECACA;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.error-text {
    font-size: 13px;
    color: #B91C1C;
    font-weight: 500;
}

.btn-login {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-full);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.btn-login:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-md);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-arrow {
    transition: transform 0.2s ease;
}

.btn-login:hover .btn-arrow {
    transform: translateX(3px);
}

.spinner-inline {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: auth-spin 0.6s linear infinite;
    display: inline-block;
}

.validation-msg {
    font-size: 12px;
    color: #B91C1C;
    margin-top: 4px;
    display: block;
}

/* Logout Button */
.logout-btn {
    border-color: transparent !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
    transition: all 0.2s ease !important;
    font-weight: 550 !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logout-btn:hover {
    background: var(--danger-light) !important;
    color: #B91C1C !important;
    border-color: #FECACA !important;
}