/* ==========================================================================
   FlowMail AI — Application styles
   --------------------------------------------------------------------------
   This file is the single source of design tokens and shell styles for the
   logged-in application UI. It sits on top of Bootstrap 5.3 (loaded first)
   and overrides Bootstrap's CSS variables where needed.

   Reference aesthetics: Stripe Dashboard, Linear, Vercel.
   Philosophy: near-monochrome palette, one accent, thin borders over
   heavy shadows, generous whitespace, no gradients, no glassmorphism.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Inter variable font
   -------------------------------------------------------------------------- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/InterVariable.woff2') format('woff2-variations'),
         url('fonts/InterVariable.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   2. Design tokens
   -------------------------------------------------------------------------- */
:root {
    /* Brand */
    --accent:         #4f46e5;  /* indigo-600 */
    --accent-hover:   #4338ca;  /* indigo-700 */
    --accent-active:  #3730a3;  /* indigo-800 */
    --accent-light:   #eef2ff;  /* indigo-50  */
    --accent-ring:    rgba(79, 70, 229, 0.15);

    /* Neutrals */
    --bg:             #fafafa;
    --surface:        #ffffff;
    --surface-alt:    #f8fafc;  /* subtle row stripe, hover */
    --border:         #e5e7eb;
    --border-strong:  #d1d5db;
    --text:           #0f172a;
    --text-secondary: #475569;
    --text-muted:     #94a3b8;

    /* Status */
    --success:        #059669;
    --success-light:  #d1fae5;
    --danger:         #dc2626;
    --danger-light:   #fee2e2;
    --warning:        #d97706;
    --warning-light:  #fef3c7;
    --info:           #2563eb;
    --info-light:     #dbeafe;

    /* Geometry */
    --radius-sm:      6px;
    --radius-md:      10px;
    --radius-lg:      14px;
    --shadow-card:    0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-pop:     0 10px 25px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);

    /* Shell dimensions */
    --sidebar-width:  256px;
    --topbar-height:  56px;
}

/* --------------------------------------------------------------------------
   3. Bootstrap variable overrides
   -------------------------------------------------------------------------- */
:root,
[data-bs-theme="light"] {
    --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bs-body-font-size: 14px;
    --bs-body-font-weight: 400;
    --bs-body-color: var(--text);
    --bs-body-bg: var(--bg);

    --bs-primary: var(--accent);
    --bs-primary-rgb: 79, 70, 229;

    --bs-border-color: var(--border);
    --bs-border-color-translucent: var(--border);
    --bs-border-radius: var(--radius-sm);
    --bs-border-radius-sm: 4px;
    --bs-border-radius-lg: var(--radius-md);

    --bs-secondary-color: var(--text-secondary);
    --bs-tertiary-color: var(--text-muted);
    --bs-tertiary-bg: var(--surface-alt);

    --bs-link-color: var(--accent);
    --bs-link-hover-color: var(--accent-hover);
    --bs-link-color-rgb: 79, 70, 229;
    --bs-link-hover-color-rgb: 67, 56, 202;
}

/* --------------------------------------------------------------------------
   4. Base elements
   -------------------------------------------------------------------------- */
html, body {
    height: 100%;
}

body {
    font-feature-settings: 'cv11', 'ss01', 'ss03';  /* Inter stylistic sets for nicer 1, g, l */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }

a { text-decoration: none; }
a:hover { text-decoration: none; }

hr {
    background-color: var(--border);
    opacity: 1;
}

/* Subtle custom scrollbar (WebKit only — fine to let other browsers use default) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* --------------------------------------------------------------------------
   5. Button overrides
   -------------------------------------------------------------------------- */
.btn {
    font-weight: 500;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn-lg {
    font-size: 15px;
    padding: 10px 18px;
}

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

.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}
.btn-primary:active,
.btn-primary.active {
    background-color: var(--accent-active) !important;
    border-color: var(--accent-active) !important;
}
.btn-primary:focus-visible {
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.btn-secondary,
.btn-outline-secondary {
    background-color: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
}
.btn-secondary:hover,
.btn-outline-secondary:hover {
    background-color: var(--surface-alt);
    border-color: var(--border-strong);
    color: var(--text);
}
.btn-secondary:focus-visible,
.btn-outline-secondary:focus-visible {
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
}
.btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

/* --------------------------------------------------------------------------
   6. Form controls
   -------------------------------------------------------------------------- */
.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.form-text {
    font-size: 12px;
    color: var(--text-muted);
}

.form-control,
.form-select {
    font-size: 14px;
    padding: 9px 12px;
    min-height: 40px;
    background-color: var(--surface);
    border-color: var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.input-group-text {
    background-color: var(--surface-alt);
    border-color: var(--border-strong);
    color: var(--text-secondary);
    font-size: 13px;
}

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */
.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.card-header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    font-weight: 600;
}

.card-body { padding: 20px; }
.card-footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    padding: 12px 20px;
}

/* --------------------------------------------------------------------------
   8. Tables
   -------------------------------------------------------------------------- */
.table {
    --bs-table-bg: var(--surface);
    --bs-table-border-color: var(--border);
    --bs-table-striped-bg: var(--surface-alt);
    --bs-table-hover-bg: var(--surface-alt);
    margin-bottom: 0;
}

.table > thead > tr > th {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
}

.table > tbody > tr > td {
    font-size: 14px;
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.table > tbody > tr:last-child > td {
    border-bottom: 0;
}

/* --------------------------------------------------------------------------
   9. Alerts
   -------------------------------------------------------------------------- */
.alert {
    border-radius: var(--radius-sm);
    border-width: 1px;
    padding: 12px 16px;
    font-size: 14px;
}

.alert-success {
    background-color: var(--success-light);
    border-color: #a7f3d0;
    color: #065f46;
}
.alert-danger {
    background-color: var(--danger-light);
    border-color: #fecaca;
    color: #991b1b;
}
.alert-warning {
    background-color: var(--warning-light);
    border-color: #fde68a;
    color: #92400e;
}
.alert-info {
    background-color: var(--info-light);
    border-color: #bfdbfe;
    color: #1e40af;
}

/* --------------------------------------------------------------------------
   10. Dropdowns
   -------------------------------------------------------------------------- */
.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-pop);
    padding: 6px;
    font-size: 14px;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--surface-alt);
    color: var(--text);
}

.dropdown-divider {
    border-top-color: var(--border);
    margin: 6px 0;
}

/* --------------------------------------------------------------------------
   11. Badges
   -------------------------------------------------------------------------- */
.badge {
    font-weight: 500;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.02em;
}

.badge.bg-success { background-color: var(--success-light) !important; color: #065f46; }
.badge.bg-danger  { background-color: var(--danger-light)  !important; color: #991b1b; }
.badge.bg-warning { background-color: var(--warning-light) !important; color: #92400e; }
.badge.bg-info    { background-color: var(--info-light)    !important; color: #1e40af; }
.badge.bg-primary { background-color: var(--accent-light)  !important; color: var(--accent-active); }


/* ==========================================================================
   APPLICATION SHELL — sidebar + topbar + main layout
   ========================================================================== */

.app-shell {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg);
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.app-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-brand img {
    max-height: 28px;
    width: auto;
}

.sidebar-brand .wordmark {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.sidebar-brand .wordmark-ai {
    color: var(--accent);
    font-weight: 700;
}

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

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

.nav-section:last-child {
    margin-bottom: 0;
}

.nav-section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 6px;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-list-item {
    margin: 0;
}

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

.nav-link:hover {
    background-color: var(--surface-alt);
    color: var(--text);
}

.nav-link.active {
    background-color: var(--accent-light);
    color: var(--accent-active);
}

.nav-link.active i {
    color: var(--accent);
}

.nav-link i {
    width: 16px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.nav-link:hover i {
    color: var(--text-secondary);
}

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

.nav-link.gated:hover {
    background-color: var(--surface-alt);
    color: var(--text-secondary);
}

.nav-lock {
    font-size: 11px;
    margin-left: auto;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Main content area
   -------------------------------------------------------------------------- */
.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* --------------------------------------------------------------------------
   Topbar
   -------------------------------------------------------------------------- */
.app-topbar {
    height: var(--topbar-height);
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.topbar-toggle {
    background: transparent;
    border: 0;
    padding: 6px 10px;
    font-size: 16px;
    color: var(--text);
    border-radius: var(--radius-sm);
}

.topbar-toggle:hover {
    background-color: var(--surface-alt);
}

.topbar-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.credits-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: var(--accent-light);
    color: var(--accent-active);
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
}

.credits-chip i {
    font-size: 11px;
    color: var(--accent);
}

.user-menu-btn {
    background: transparent;
    border: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 4px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.user-menu-btn:hover {
    background-color: var(--surface-alt);
}

.user-menu-btn::after { display: none !important; }  /* kill Bootstrap caret, we use FA */

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

.user-menu-btn .fa-chevron-down {
    font-size: 10px;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Content area
   -------------------------------------------------------------------------- */
.app-content {
    flex: 1;
    padding: 28px 32px;
    max-width: 1280px;
    width: 100%;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   Stat cards — small "label / big value" cards used on the dashboard
   -------------------------------------------------------------------------- */
.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.stat-sub {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.stat-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
}

.stat-link:hover {
    color: var(--accent-hover);
}

/* --------------------------------------------------------------------------
   Empty states — used inside cards/tables when there's nothing to show
   -------------------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 56px 20px;
}

.empty-state-icon {
    font-size: 32px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.empty-state-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.empty-state-text {
    color: var(--text-secondary);
    margin-bottom: 18px;
    font-size: 14px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* --------------------------------------------------------------------------
   CTA card — wide horizontal card with text on left, button on right
   -------------------------------------------------------------------------- */
.cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
}

.cta-card .cta-text h2 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cta-card .cta-text p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

@media (max-width: 575.98px) {
    .cta-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .cta-card .btn {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   Responsive — sidebar becomes Bootstrap offcanvas below md
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1045;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: var(--shadow-pop);
    }
    .app-sidebar.show {
        transform: translateX(0);
    }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        z-index: 1040;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }
    .sidebar-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }
    .app-content {
        padding: 20px;
    }
}

@media (min-width: 768px) {
    .topbar-toggle { display: none; }
}


/* ==========================================================================
   AUTH LAYOUT — centered card on --bg background, no sidebar
   ========================================================================== */

.auth-shell {
    min-height: 100vh;
    background-color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 36px 32px 28px;
}

.auth-card .wordmark {
    display: block;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 4px;
}

.auth-card .wordmark-ai {
    color: var(--accent);
}

.auth-card h1 {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin: 20px 0 4px;
}

.auth-card .auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 24px;
}

.auth-card .form-group {
    margin-bottom: 16px;
}

.auth-card .btn {
    width: 100%;
}

.auth-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent);
    font-weight: 500;
}

.auth-footer a:hover {
    color: var(--accent-hover);
}

/* ==========================================================================
   UDO CRM — Kanban board (venues.php)
   ========================================================================== */

.kanban-wrap {
    position: relative;
    /* Remove the dotted focus outline since the chevrons signal interactivity */
    outline: none;
}

.kanban-wrap:focus-visible {
    /* But show a soft ring when keyboard-focused so arrow-key users know */
    box-shadow: 0 0 0 2px var(--accent-ring);
    border-radius: var(--radius-md);
}

.kanban-scroller {
    overflow-x: auto;
    margin: 0 -8px;
    padding: 0 8px 16px;
    scroll-behavior: smooth;
}

/* Chevron nav buttons — overlay the board's left and right edges */
.kanban-nav {
    position: absolute;
    top: 48%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-pop);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    transition: background 120ms ease, transform 120ms ease;
}

.kanban-nav:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.kanban-nav:active {
    transform: translateY(-50%) scale(0.92);
}

.kanban-nav-left  { left: 4px; }
.kanban-nav-right { right: 4px; }

.kanban-nav[hidden] { display: none; }

.kanban-board {
    display: flex;
    gap: 12px;
    min-width: max-content;
    align-items: flex-start;
}

.kanban-col {
    width: 260px;
    flex: 0 0 260px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 320px);
}

.kanban-col-header {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.kanban-col-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 1px 8px;
    min-width: 22px;
    text-align: center;
}

.kanban-col-body {
    padding: 8px;
    overflow-y: auto;
    flex: 1;
    min-height: 80px;
    transition: background 120ms ease;
}

.kanban-col-body.is-target {
    background: var(--accent-light);
    box-shadow: inset 0 0 0 2px var(--accent);
}

.kanban-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    margin-bottom: 8px;
    cursor: grab;
    box-shadow: var(--shadow-card);
    transition: box-shadow 120ms ease, transform 120ms ease;
}

.kanban-card:hover {
    box-shadow: var(--shadow-pop);
    border-color: var(--border-strong);
}

.kanban-card.is-dragging {
    opacity: 0.45;
    cursor: grabbing;
}

.kanban-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.kanban-card-title {
    font-weight: 600;
    color: var(--text);
    font-size: 13.5px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.kanban-card-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.kanban-card-assigned {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.kanban-card-stats {
    font-size: 11.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
}

.kanban-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 24px 8px;
    font-style: italic;
}

/* ==========================================================================
   UDO CRM — Call modal timer
   ========================================================================== */

.call-timer-display {
    font-variant-numeric: tabular-nums;
    font-size: 56px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin: 16px 0;
    letter-spacing: -1px;
}

.call-timer-display.is-live::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    margin-left: 14px;
    vertical-align: middle;
    animation: udo-pulse 1.2s ease-in-out infinite;
}

@keyframes udo-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}

.call-mode-pills .nav-link {
    color: var(--text-secondary);
}

.call-mode-pills .nav-link.active {
    background: var(--accent);
    color: #fff;
}

/* ==========================================================================
   UDO CRM — Tabs (venue_detail)
   ========================================================================== */

.nav-tabs .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    border: 1px solid transparent;
    border-bottom-color: var(--border);
    background: transparent;
}

.nav-tabs .nav-link:hover {
    color: var(--text);
    border-color: transparent;
    border-bottom-color: var(--border);
}

.nav-tabs .nav-link.active {
    color: var(--accent);
    background: var(--surface);
    border-color: var(--border) var(--border) transparent;
}

/* ==========================================================================
   UDO CRM — Misc tweaks
   ========================================================================== */

.stat-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-card);
    height: 100%;
}

.stat-tile-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-tile-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
}

.stat-tile-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ==========================================================================
   UDO CRM — Searchable combobox
   ========================================================================== */

.udo-combo {
    position: relative;
}

.udo-combo-list {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-pop);
    max-height: 260px;
    overflow-y: auto;
}

.udo-combo-list li {
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    line-height: 1.4;
}

.udo-combo-list li:hover,
.udo-combo-list li.is-active {
    background: var(--accent-light);
    color: var(--accent);
}

.udo-combo-list li.is-hidden {
    display: none;
}

/* ==========================================================================
   UDO CRM — FullCalendar (tasks.php calendar view)
   ========================================================================== */

.fc-task-title {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
}

.fc-task-sub {
    font-size: 11px;
    opacity: 0.88;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
    margin-top: 1px;
}

/* Completed tasks render greyed — strike the title in the calendar too */
.fc-task-done .fc-task-title { text-decoration: line-through; }
.fc-task-done .fc-task-sub   { text-decoration: line-through; }

/* FullCalendar default makes events tiny on month view; let them breathe */
.fc-daygrid-event {
    padding: 2px 4px !important;
    white-space: normal !important;
}

/* Reduce the bright link colour FC uses for "more" links to match our palette */
.fc-more-link {
    color: var(--accent) !important;
}

