/* AGD - a-genda Application Styles */
/* Outlook-style layout with vertical navigation */

:root {
    --agd-brand-color: #6366F1;
    --agd-brand-hover: #4F46E5;
    --agd-brand-light: #E0E7FF;
    --agd-brand-secondary: #818CF8;
    
    /* Navigation bar */
    --agd-navbar-width: 48px;
    --agd-navbar-bg: #1A1A1A;
    --agd-navbar-hover: #3A3A3A;
    --agd-navbar-active: #2D2D2D;
    
    /* Side panel */
    --agd-sidepanel-width: 280px;
    --agd-sidepanel-collapsed-width: 0px;
    
    /* General */
    --agd-header-height: 50px;
    --agd-text-color: #333;
    --agd-text-light: #666;
    --agd-text-muted: #999;
    --agd-border-color: #E1E1E1;
    --agd-bg-color: #F3F3F3;
    --agd-bg-secondary: #FAFAFA;
    --agd-white: #FFFFFF;
    --agd-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --agd-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Dark mode variables */
[data-theme="dark"] {
    --agd-navbar-bg: #1A1A1A;
    --agd-navbar-hover: #2D2D2D;
    --agd-text-color: #E0E0E0;
    --agd-text-light: #B0B0B0;
    --agd-border-color: #404040;
    --agd-bg-color: #252525;
    --agd-bg-secondary: #2D2D2D;
    --agd-white: #1E1E1E;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
    font-size: 14px;
    color: var(--agd-text-color);
    background-color: var(--agd-bg-color);
}

/* ========================================
   APP SHELL - Main Container
   ======================================== */
.agd-app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ========================================
   VERTICAL NAVIGATION BAR (Outlook-style)
   ======================================== */
.agd-navbar {
    width: var(--agd-navbar-width);
    min-width: var(--agd-navbar-width);
    background-color: var(--agd-navbar-bg);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 1000;
}

.agd-navbar-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 8px;
}

.agd-navbar-bottom {
    padding-bottom: 8px;
}

.agd-navbar-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.15s ease;
    position: relative;
    margin: 2px 4px;
    width: calc(100% - 8px);
    border-radius: 8px;
}

.agd-navbar-item:hover {
    background-color: var(--agd-navbar-hover);
    color: #FFFFFF;
}

.agd-navbar-item.active {
    background-color: var(--agd-navbar-active);
    color: #FFFFFF;
}

.agd-navbar-item.active::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background-color: var(--agd-brand-color);
    border-radius: 0 2px 2px 0;
}

.agd-navbar-item svg,
.agd-navbar-item .agd-nav-icon {
    width: 22px;
    height: 22px;
}

/* Custom nav icons styling */
.agd-nav-icon {
    display: block;
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */
.agd-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--agd-white);
}

/* ========================================
   CALENDAR PAGE LAYOUT
   ======================================== */
.agd-calendar-page {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* ========================================
   COLLAPSIBLE SIDE PANEL (Outlook-style)
   ======================================== */
.agd-side-panel {
    display: flex;
    position: relative;
    background-color: #000000;
    transition: width 0.2s ease-out, min-width 0.2s ease-out;
}

.agd-side-panel:not(.collapsed) {
    width: var(--agd-sidepanel-width);
    min-width: var(--agd-sidepanel-width);
}

.agd-side-panel.collapsed {
    width: 20px;
    min-width: 20px;
}

.agd-panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    transition: opacity 0.15s ease;
    min-width: 0;
}

.agd-side-panel.collapsed .agd-panel-content {
    opacity: 0;
    pointer-events: none;
    width: 0;
}

/* Outlook-style collapse toggle strip */
.agd-panel-toggle-strip {
    width: 20px;
    min-width: 20px;
    background-color: var(--agd-brand-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background-color 0.15s ease, width 0.15s ease;
    border-radius: 8px 0 0 8px;
}

.agd-panel-toggle-strip:hover {
    background-color: var(--agd-brand-hover);
    width: 24px;
    min-width: 24px;
}

.agd-toggle-icon {
    opacity: 1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agd-toggle-icon svg {
    width: 14px;
    height: 14px;
}

.agd-side-panel.collapsed .agd-panel-toggle-strip {
    background-color: var(--agd-brand-color);
    width: 20px;
    min-width: 20px;
    border-radius: 0 8px 8px 0;
}

.agd-side-panel.collapsed .agd-panel-toggle-strip:hover {
    background-color: var(--agd-brand-hover);
    width: 24px;
    min-width: 24px;
}

.agd-side-panel.collapsed .agd-toggle-icon {
    opacity: 1;
    color: white;
}

/* Mini Calendar */
.agd-mini-calendar {
    padding: 6px;
    flex-shrink: 0;
    margin: 6px;
    background-color: #111111;
    border-radius: 10px;
    border: 1px solid #2A2A2A;
    overflow: visible;
}

.agd-mini-calendar .k-calendar {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 12px;
    color: #E0E0E0;
}

.agd-mini-calendar .k-calendar .k-calendar-view {
    padding: 0;
    min-height: auto;
}

.agd-mini-calendar .k-calendar .k-calendar-header {
    padding: 0 22px 4px 0;
    min-height: auto;
    color: #E0E0E0;
}

.agd-mini-calendar .k-calendar .k-calendar-th,
.agd-mini-calendar .k-calendar .k-calendar-td {
    width: 30px;
    height: 26px;
    padding: 0;
    color: #B0B0B0;
}

.agd-mini-calendar .k-calendar .k-calendar-td .k-link {
    color: #E0E0E0;
}

.agd-mini-calendar .k-calendar .k-calendar-td.k-other-month .k-link {
    color: #555555;
}

.agd-mini-calendar .k-calendar .k-link {
    width: 26px;
    height: 24px;
    line-height: 24px;
    border-radius: 50%;
}

.agd-mini-calendar .k-calendar .k-link:hover {
    background-color: #1A1A1A;
}

.agd-mini-calendar .k-calendar .k-calendar-nav {
    gap: 0;
}

.agd-mini-calendar .k-calendar .k-calendar-title {
    font-weight: 600;
    font-size: 13px;
    color: #FFFFFF;
}

.agd-mini-calendar .k-calendar .k-calendar-nav .k-button {
    color: #B0B0B0;
}

.agd-mini-calendar .k-calendar .k-calendar-nav .k-button:hover {
    color: #FFFFFF;
    background-color: #1A1A1A;
}

/* Mini Calendar - Today's date (current date) */
.agd-mini-calendar .k-calendar .k-calendar-td.k-today .k-link {
    background-color: var(--agd-brand-color) !important;
    color: white !important;
    border-radius: 50%;
}

/* Mini Calendar - Selected date (clicked/chosen date) - lighter than today */
.agd-mini-calendar .k-calendar .k-calendar-td.k-selected .k-link,
.agd-mini-calendar .k-calendar .k-calendar-td.k-state-selected .k-link {
    background-color: #818CF8 !important;
    color: white !important;
    border-radius: 50%;
}

/* When selected date IS today - use a combined style */
.agd-mini-calendar .k-calendar .k-calendar-td.k-today.k-selected .k-link,
.agd-mini-calendar .k-calendar .k-calendar-td.k-today.k-state-selected .k-link {
    background-color: #818CF8 !important;
    box-shadow: 0 0 0 2px var(--agd-brand-color) !important;
}

/* Calendar Selection */
.agd-calendar-selection {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 0 8px 0;
    min-height: 0;
}

.agd-calendar-section {
    margin-bottom: 4px;
}

.agd-section-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease;
    color: #E0E0E0;
    margin: 2px 8px;
    border-radius: 6px;
}

.agd-section-header:hover {
    background-color: #1A1A1A;
}

.agd-section-header svg {
    color: #B0B0B0;
}

.agd-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #FFFFFF;
    flex: 1;
}

.agd-section-items {
    padding: 4px 0;
}

.agd-section-empty {
    padding: 8px 12px 8px 28px;
    margin: 0 8px;
}

.agd-empty-text {
    font-size: 12px;
    color: #555555;
    font-style: italic;
}

.agd-calendar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 28px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    margin: 2px 8px;
    border-radius: 6px;
}

.agd-calendar-item:hover {
    background-color: #1A1A1A;
}

.agd-calendar-color {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    flex-shrink: 0;
}

.agd-calendar-name {
    font-size: 13px;
    color: #E0E0E0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dark theme checkboxes in side panel */
.agd-side-panel .k-checkbox {
    border-color: #555555;
    background-color: transparent;
    border-radius: 4px;
}

.agd-side-panel .k-checkbox:checked {
    background-color: var(--agd-brand-color);
    border-color: var(--agd-brand-color);
}

.agd-side-panel .k-checkbox:hover {
    border-color: var(--agd-brand-color);
}

/* Selection Mode Frame */
.agd-selection-mode-frame {
    margin: 8px;
    padding: 8px 12px;
    border: 1px solid #333333;
    border-radius: 8px;
    background-color: #1A1A1A;
}

.agd-selection-mode-frame .k-radio-list {
    gap: 4px;
}

.agd-selection-mode-frame .k-radio-item {
    padding: 4px 0;
}

.agd-selection-mode-frame .k-radio-label {
    font-size: 12px;
    color: #E0E0E0;
    padding-left: 6px;
}

.agd-selection-mode-frame .k-radio {
    border-color: #555555;
}

.agd-selection-mode-frame .k-radio:checked {
    border-color: var(--agd-brand-color);
    background-color: var(--agd-brand-color);
}

/* Quick View Button List */
.agd-quick-view-list {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0;
}

.agd-quick-view-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin: 2px 8px;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.agd-quick-view-row:hover {
    background-color: #1A1A1A;
}

.agd-quick-view-name {
    flex: 1;
    font-size: 13px;
    color: #E0E0E0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.agd-quick-view-buttons {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.agd-quick-btn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #444444;
    border-radius: 4px;
    background-color: #2A2A2A;
    color: #E0E0E0;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.agd-quick-btn:hover {
    background-color: var(--agd-brand-color);
    border-color: var(--agd-brand-color);
    color: #FFFFFF;
}

.agd-quick-btn:active {
    transform: scale(0.97);
}

/* Custom Weekdays Mode */
.agd-custom-weekdays {
    padding: 12px;
}

.agd-custom-weekdays-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    margin-bottom: 12px;
    background-color: #2A2A2A;
    border-radius: 6px;
}

.agd-current-day-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--agd-brand-color);
}

.agd-current-day-calendars {
    font-size: 12px;
    color: #B0B0B0;
}

.agd-current-day-calendars em {
    font-style: italic;
    color: #808080;
}

.agd-configure-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #444444;
    border-radius: 6px;
    background-color: #2A2A2A;
    color: #E0E0E0;
    cursor: pointer;
    transition: all 0.15s ease;
}

.agd-configure-btn:hover {
    background-color: #3A3A3A;
    border-color: var(--agd-brand-color);
}

/* Weekday Configuration Dialog */
.agd-weekday-config-popup {
    width: 600px;
    max-width: 95vw;
}

.agd-weekday-config-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 400px;
    overflow-y: auto;
}

.agd-weekday-header-row,
.agd-weekday-row {
    display: grid;
    grid-template-columns: 150px repeat(7, 1fr);
    gap: 4px;
    align-items: center;
    padding: 6px 4px;
}

.agd-weekday-header-row {
    background-color: #2A2A2A;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
    color: #B0B0B0;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 1;
}

.agd-weekday-row {
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.agd-weekday-row:hover {
    background-color: #2A2A2A;
}

.agd-weekday-header {
    text-align: center;
}

.agd-weekday-calendar-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #E0E0E0;
    overflow: hidden;
}

.agd-weekday-calendar-name span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agd-weekday-checkbox {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* No Calendar Message (Custom Weekdays mode) */
.agd-no-calendar-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 20px;
    color: #808080;
    background-color: var(--agd-bg-secondary);
}

.agd-no-calendar-icon {
    opacity: 0.4;
}

.agd-no-calendar-icon .k-svg-icon {
    width: 64px;
    height: 64px;
}

.agd-no-calendar-text {
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    max-width: 300px;
}

[data-theme="dark"] .agd-no-calendar-message {
    background-color: #1A1A1A;
    color: #808080;
}

/* ========================================
   MAIN CALENDAR AREA
   ======================================== */
.agd-calendar-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* Calendar Toolbar */
.agd-calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background-color: var(--agd-white);
    border-bottom: 1px solid var(--agd-border-color);
    gap: 16px;
    min-height: 52px;
}

.agd-toolbar-left,
.agd-toolbar-center,
.agd-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agd-toolbar-center {
    flex: 1;
    justify-content: center;
}

.agd-date-display {
    font-size: 16px;
    font-weight: 600;
    min-width: 200px;
    text-align: center;
    color: var(--agd-text-color);
    background-color: transparent;
    padding: 6px 16px;
    border-radius: 8px;
}

/* Scheduler Wrapper */
.agd-scheduler-wrapper {
    flex: 1;
    overflow: auto;
    padding: 8px;
}

.agd-scheduler-wrapper .k-scheduler {
    border: none;
    border-radius: 8px;
    height: 100% !important;
    background-color: #1e1e1e !important;
}

.agd-scheduler-wrapper .k-event {
    border-radius: 6px;
    z-index: 2; /* Above slot hit area for right-click */
}

/* Fixed slot heights - prevents appointment misalignment */
/* NOTE: Exclude month view and agenda view which need flexible cell heights */
.fixed-slots.k-scheduler:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-scheduler-times tr,
.fixed-slots.k-scheduler:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-scheduler-body tr,
.k-scheduler.fixed-slots:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-scheduler-times tr,
.k-scheduler.fixed-slots:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-scheduler-body tr {
    height: 30px !important;
    max-height: 30px !important;
    min-height: 30px !important;
}
.fixed-slots.k-scheduler:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-scheduler-times td,
.fixed-slots.k-scheduler:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-scheduler-body td,
.fixed-slots.k-scheduler:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-scheduler-times th,
.fixed-slots.k-scheduler:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-scheduler-body th,
.k-scheduler.fixed-slots:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-scheduler-times td,
.k-scheduler.fixed-slots:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-scheduler-body td,
.k-scheduler.fixed-slots:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-scheduler-times th,
.k-scheduler.fixed-slots:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-scheduler-body th {
    height: 30px !important;
    max-height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    line-height: 30px !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}
.fixed-slots.k-scheduler:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-scheduler-cell,
.k-scheduler.fixed-slots:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-scheduler-cell {
    height: 30px !important;
    max-height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
}
.fixed-slots.k-scheduler:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) tr,
.k-scheduler.fixed-slots:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) tr {
    height: 30px !important;
}
.fixed-slots.k-scheduler:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) td,
.fixed-slots.k-scheduler:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) th,
.k-scheduler.fixed-slots:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) td,
.k-scheduler.fixed-slots:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) th {
    height: 30px !important;
    padding: 0 !important;
}

/* Event/appointment text vertical alignment - exclude month view and agenda view */
.fixed-slots.k-scheduler:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-event,
.k-scheduler.fixed-slots:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-event {
    padding: 0 4px !important;
    line-height: 1 !important;
}
.fixed-slots.k-scheduler:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-event > *,
.k-scheduler.fixed-slots:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-event > * {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}
.fixed-slots.k-scheduler:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-event-template,
.k-scheduler.fixed-slots:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-event-template {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    position: relative !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}
.fixed-slots.k-scheduler:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-event-actions,
.k-scheduler.fixed-slots:not(:has(.k-scheduler-monthview)):not(:has(.k-scheduler-agendaview)) .k-event-actions {
    margin: 0 !important;
    padding: 0 !important;
    top: 0 !important;
    transform: none !important;
}

/* All-day row styling - fix purple bar and set proper background */
.k-scheduler .k-scheduler-all-day-row {
    background-color: #1e1e1e !important;
}

.k-scheduler .k-scheduler-all-day-row .k-scheduler-row {
    min-height: 36px !important;
    background-color: #1e1e1e !important;
}

.k-scheduler .k-scheduler-all-day-row .k-scheduler-cell,
.k-scheduler .k-scheduler-all-day-row .k-group-cell,
.k-scheduler .k-scheduler-all-day-row .k-slot-cell {
    background-color: #1e1e1e !important;
}

/* Make all-day slot cells fill the entire row height for clicking */
.k-scheduler .k-scheduler-all-day-row .k-group-cell,
.k-scheduler .k-scheduler-all-day-row .k-group-cell > .k-scheduler-row,
.k-scheduler .k-scheduler-all-day-row .k-scheduler-alldays-slot {
    height: 100% !important;
}

/* All-day events - center text and proper height */
.k-scheduler .k-scheduler-head .k-scheduler-all-day-row > .k-event {
    height: 28px !important;
    border-radius: 4px !important;
    margin: 4px 0 !important;
    box-sizing: border-box !important;
    right: 40px !important;
}

.k-scheduler .k-scheduler-head .k-scheduler-all-day-row > .k-event > div {
    text-align: center !important;
    width: 100% !important;
    padding-top: 14px !important;
}

.k-scheduler .k-scheduler-head .k-scheduler-all-day-row > .k-event .k-event-template {
    text-align: center !important;
    position: relative !important;
    top: 8px !important;
}

/* Hide delete button on all-day events to avoid Telerik drag handler error.
   Users can delete via right-click context menu instead. */
.k-scheduler .k-scheduler-all-day-row .k-event-delete {
    display: none !important;
}

/* Ensure all-day event items fill container for proper context menu handling */
.k-scheduler .k-scheduler-all-day-row .k-event .agd-appo-item {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    pointer-events: auto !important;
}

/* Add button in all-day slot cells */
.agd-allday-add-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    font-weight: bold;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.agd-allday-add-btn:hover {
    background-color: rgba(99, 102, 241, 0.8);
    color: white;
}


/* Hide scrollbars in scheduler header cells without affecting layout */
.k-scheduler .k-scheduler-head *,
.k-scheduler .k-scheduler-header * {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.k-scheduler .k-scheduler-head *::-webkit-scrollbar,
.k-scheduler .k-scheduler-header *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
}

/* Slot hit area for right-click context menu */
.k-scheduler .k-scheduler-body .k-scheduler-cell {
    position: relative;
}

.agd-slot-hit-area {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Appointment Item */
.agd-appo-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    min-height: 100%;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.agd-appo-icons {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.agd-appo-icon {
    font-size: 11px;
    line-height: 1;
}

.agd-appo-title {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

/* ========================================
   EDIT DIALOG & FORMS
   ======================================== */
.agd-centered-window {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.agd-appo-edit-form {
    padding: 16px 20px;
}

.agd-appo-edit-form.compact {
    padding: 12px 16px;
}

.agd-validation-error {
    background-color: #FEE2E2;
    border: 1px solid #F87171;
    color: #DC2626;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 13px;
}

[data-theme="dark"] .agd-validation-error {
    background-color: #450A0A;
    border-color: #DC2626;
    color: #FCA5A5;
}

.agd-save-error {
    width: 100%;
    background-color: #FEE2E2;
    border: 1px solid #F87171;
    color: #DC2626;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 13px;
    text-align: center;
}

[data-theme="dark"] .agd-save-error {
    background-color: #450A0A;
    border-color: #DC2626;
    color: #FCA5A5;
}

.agd-dialog-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.agd-dialog-footer .agd-save-error {
    flex-basis: 100%;
}

.agd-compact-dialog .k-window-content {
    padding: 0 !important;
}

.agd-form-group.compact {
    margin-bottom: 8px;
}

.agd-checkbox-inline {
    display: flex;
    align-items: center;
    gap: 6px;
}

.agd-form-buttons.compact {
    padding: 10px 16px;
}

.agd-appo-edit-form.compact .agd-form-row {
    gap: 12px;
    margin-bottom: 8px;
}

.agd-appo-edit-form.compact .agd-form-label {
    margin-bottom: 4px;
    font-size: 12px;
}

.agd-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.agd-form-col {
    flex: 1;
}

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

.agd-checkbox-label {
    margin-left: 8px;
    font-size: 13px;
}

.agd-checkbox-label.agd-disabled {
    color: var(--agd-text-light);
    opacity: 0.6;
}

.agd-form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--agd-border-color);
}

.agd-form-buttons .k-button {
    min-width: 100px;
}

.agd-spacer {
    flex: 1;
}

.agd-form-text {
    line-height: 36px;
    color: var(--agd-text-light);
    font-size: 13px;
}

/* ========================================
   AUTHENTICATION PAGES
   ======================================== */
.agd-auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--agd-brand-color) 0%, var(--agd-brand-secondary) 100%);
    padding: 20px;
}

.agd-auth-card {
    background: var(--agd-white);
    border-radius: 16px;
    box-shadow: var(--agd-shadow-hover);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.agd-auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.agd-auth-logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--agd-brand-color);
    margin-bottom: 8px;
}

.agd-auth-subtitle {
    color: var(--agd-text-light);
    font-size: 14px;
}

/* Login Page Specific */
.agd-login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--agd-bg-color);
    padding: 20px;
}

.agd-login-card {
    background-color: var(--agd-bg-secondary);
    border-radius: 16px;
    box-shadow: var(--agd-shadow-hover);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.agd-login-theme-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
}

.agd-login-header {
    text-align: center;
    margin-bottom: 32px;
}

.agd-login-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 16px;
}

.agd-login-logo-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #4FC3F7 0%, #29B6F6 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agd-logo-icon {
    font-size: 40px;
}

/* Remove focus outline from login title */
.agd-login-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--agd-text-color);
    margin: 0;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.agd-login-title:focus,
.agd-login-title:focus-visible {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Remove focus outline from login header elements */
.agd-login-header *:focus,
.agd-login-header *:focus-visible,
.agd-login-logo-placeholder:focus,
.agd-login-logo-placeholder:focus-visible,
.agd-login-card:focus,
.agd-login-card:focus-visible,
.agd-login-container:focus,
.agd-login-container:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Global fix for MAUI WebView focus outline on non-interactive elements */
.agd-login-container h1:focus,
.agd-login-container div:focus,
.agd-login-container span:focus,
.agd-login-container h1:focus-visible,
.agd-login-container div:focus-visible,
.agd-login-container span:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.agd-login-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--agd-brand-light);
    color: var(--agd-brand-color);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 13px;
}

.agd-login-form {
    margin-bottom: 16px;
}

.agd-login-form .k-form-field {
    margin-bottom: 16px;
}

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

.agd-login-btn {
    width: 100%;
    padding: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

.agd-login-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.agd-login-option {
    display: flex;
    align-items: center;
}

.agd-login-autologin {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px;
    color: var(--agd-text-light);
}

.agd-login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.agd-login-links {
    text-align: center;
    margin-top: 16px;
}

.agd-login-create-account {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--agd-border-color);
    color: var(--agd-text-light);
    font-size: 13px;
}

.agd-link {
    color: var(--agd-brand-color);
    text-decoration: none;
    font-weight: 500;
}

.agd-link:hover {
    text-decoration: underline;
}

.agd-mobile-notice {
    background-color: var(--agd-brand-light);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--agd-brand-color);
}

/* ========================================
   LOADING & SPINNERS
   ======================================== */
.agd-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    color: var(--agd-brand-color);
}

.agd-spinner {
    width: 50px;
    height: 50px;
    animation: rotate 2s linear infinite;
}

.agd-spinner .path {
    stroke: var(--agd-brand-color);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

.agd-dialog-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 16px;
}

.agd-dialog-loading p {
    margin: 0;
    color: var(--agd-text-muted);
    font-size: 14px;
}

/* ========================================
   ERROR UI
   ======================================== */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 16px;
    background-color: #FFF3CD;
    color: #856404;
    text-align: center;
    z-index: 10000;
    border-top: 1px solid #FFEEBA;
}

#blazor-error-ui .reload {
    margin-left: 16px;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 16px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .agd-side-panel:not(.collapsed) {
        width: 260px;
        min-width: 260px;
    }
    
    .agd-date-display {
        min-width: 160px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .agd-side-panel {
        position: absolute;
        left: var(--agd-navbar-width);
        top: 0;
        bottom: 0;
        z-index: 100;
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.5);
    }

    .agd-side-panel.collapsed {
        width: 0;
        min-width: 0;
        border: none;
    }

    .agd-side-panel.collapsed .agd-panel-toggle-strip {
        display: none;
    }

    .agd-calendar-toolbar {
        flex-wrap: wrap;
        padding: 8px 12px;
    }

    .agd-toolbar-left {
        order: 1;
    }

    .agd-toolbar-center {
        order: 3;
        width: 100%;
        margin-top: 8px;
    }

    .agd-toolbar-right {
        order: 2;
    }

    .agd-date-display {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .agd-navbar {
        width: 40px;
        min-width: 40px;
    }

    .agd-navbar-item {
        height: 40px;
    }

    .agd-navbar-item svg {
        width: 18px;
        height: 18px;
    }

    .agd-toolbar-right .k-button-group {
        display: none;
    }

    .agd-auth-card {
        padding: 24px;
    }
}

/* ========================================
   PLACEHOLDER PAGES
   ======================================== */
.agd-placeholder-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--agd-text-light);
    text-align: center;
    padding: 40px;
}

.agd-placeholder-icon {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.agd-placeholder-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--agd-text-color);
}

.agd-placeholder-text {
    font-size: 14px;
    max-width: 400px;
}

/* ========================================
   TELERIK OVERRIDES
   ======================================== */
.k-scheduler .k-scheduler-toolbar {
    display: none; /* We use custom toolbar */
}

.k-calendar .k-calendar-td.k-today .k-link {
    background-color: var(--agd-brand-color);
    color: white;
}

.k-calendar .k-calendar-td.k-selected .k-link {
    background-color: var(--agd-brand-hover);
    color: white;
}

.k-button {
    border-radius: 6px !important;
}

.k-button.k-selected {
    background-color: var(--agd-brand-color);
    border-color: var(--agd-brand-color);
    color: white;
}

.k-button-group {
    border-radius: 6px;
    overflow: hidden;
}

.k-button-group .k-button {
    border-radius: 0 !important;
}

.k-button-group .k-button:first-child {
    border-radius: 6px 0 0 6px !important;
}

.k-button-group .k-button:last-child {
    border-radius: 0 6px 6px 0 !important;
}

.k-input,
.k-picker,
.k-textbox,
.k-textarea,
.k-dropdown {
    border-radius: 6px !important;
}

.k-window {
    border-radius: 12px !important;
    overflow: hidden;
}

.k-dialog {
    border-radius: 12px !important;
}

.k-popup {
    border-radius: 8px !important;
    overflow: hidden;
}

.k-popup:has(.k-context-menu),
.k-popup.k-menu-popup {
    border-radius: 16px !important;
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.k-animation-container:has(.k-context-menu) {
    overflow: visible !important;
}

.k-menu-popup,
.k-context-menu {
    border-radius: 16px !important;
    overflow: hidden;
}

.k-menu-item {
    border-radius: 4px;
    margin: 2px 4px;
}

/* Agenda/Resource name header (Main Agenda) - dark background */
.k-scheduler .k-scheduler-head {
    background-color: #1A1A1A !important;
}

.k-scheduler .k-scheduler-head .k-scheduler-group-cell,
.k-scheduler .k-scheduler-head .k-sticky-cell,
.k-scheduler .k-scheduler-head .k-scheduler-cell {
    padding: 0 8px !important;
    line-height: 30px !important;
    vertical-align: middle !important;
    font-size: 13px;
    background-color: #1A1A1A !important;
    color: #FFFFFF !important;
    border-bottom: 1px solid #2A2A2A !important;
}

/* Fix white square in scheduler body - sticky cells need dark background */
.k-scheduler .k-scheduler-body .k-sticky-cell {
    background-color: #1e1e1e !important;
}

[data-theme="light"] .k-scheduler .k-scheduler-body .k-sticky-cell {
    background-color: #f5f5f5 !important;
}

/* ========================================
   MONTH VIEW HEADER STYLING
   ======================================== */

/* Resource name row (Main Agenda) - dark background, compact */
.k-scheduler-monthview .k-scheduler-head {
    background-color: #1A1A1A !important;
}

.k-scheduler-monthview .k-scheduler-head .k-scheduler-group > .k-scheduler-row:first-child {
    height: auto !important;
    min-height: 0 !important;
}

.k-scheduler-monthview .k-scheduler-head .k-scheduler-group > .k-scheduler-row:first-child > .k-heading-cell {
    background-color: #1A1A1A !important;
    color: #FFFFFF !important;
    padding: 4px 8px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    height: auto !important;
    min-height: 0 !important;
}

/* Weekday names row (lunes, martes, etc.) - lilac background, compact */
.k-scheduler-monthview .k-scheduler-head .k-group-cell {
    background-color: #1A1A1A !important;
    padding: 0 !important;
    height: auto !important;
}

.k-scheduler-monthview .k-scheduler-head .k-group-cell > .k-scheduler-row {
    background-color: #7C3AED !important;
    height: auto !important;
    min-height: 0 !important;
}

.k-scheduler-monthview .k-scheduler-head .k-group-cell > .k-scheduler-row > .k-heading-cell {
    background-color: #7C3AED !important;
    color: #FFFFFF !important;
    padding: 6px 8px !important;
    line-height: 1.2 !important;
    height: auto !important;
    min-height: 0 !important;
}

.k-scheduler-monthview .k-scheduler-head .k-group-cell > .k-scheduler-row > .k-heading-cell .k-link.k-nav-day {
    color: #FFFFFF !important;
}

/* Month view body cells - ensure day numbers visible and appointments not cut */
.k-scheduler-monthview .k-scheduler-body .k-slot-cell {
    position: relative !important;
    padding-top: 28px !important;
}

.k-scheduler-monthview .k-scheduler-body .k-slot-cell > .k-link.k-nav-day {
    position: absolute !important;
    top: 2px !important;
    left: 4px !important;
    z-index: 5 !important;
    font-size: 12px !important;
    color: #B0B0B0 !important;
}

/* Appointments in month view - ensure text is not cut */
.k-scheduler-monthview .k-event {
    min-height: 20px !important;
    height: auto !important;
    overflow: visible !important;
    padding: 1px 4px !important;
    line-height: 18px !important;
}

/* Push events down from top of cell */
.k-scheduler-monthview .k-scheduler-body .k-events-container,
.k-scheduler-monthview .k-scheduler-body .k-more-events {
    margin-top: 20px !important;
}

.k-scheduler-monthview .k-event-template {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 18px !important;
    display: block !important;
}

/* ========================================
   AGENDA/SUMMARY VIEW STYLING
   ======================================== */

/* First column (agenda/resource name) - make it wider to avoid horizontal scroll */
.k-scheduler-agendaview .k-scheduler-cell:first-child,
.k-scheduler-agendaview td:first-child,
.k-scheduler-agendaview th:first-child {
    min-width: 120px !important;
    width: auto !important;
    white-space: nowrap !important;
    padding: 8px 12px !important;
}

/* Agenda view table - prevent horizontal scroll */
.k-scheduler-agendaview .k-scheduler-table {
    table-layout: auto !important;
    width: 100% !important;
}

/* Agenda view body - hide horizontal scrollbar */
.k-scheduler-agendaview .k-scheduler-body {
    overflow-x: hidden !important;
}

/* Ensure scheduler body can scroll - show thin scrollbar */
.k-scheduler .k-scheduler-body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin !important;
}

.k-scheduler .k-scheduler-body::-webkit-scrollbar {
    width: 8px !important;
    display: block !important;
}

.k-scheduler .k-scheduler-body::-webkit-scrollbar-track {
    background-color: transparent;
}

.k-scheduler .k-scheduler-body::-webkit-scrollbar-thumb {
    background-color: rgba(128, 128, 128, 0.4);
    border-radius: 4px;
}

.k-scheduler .k-scheduler-body::-webkit-scrollbar-thumb:hover {
    background-color: rgba(128, 128, 128, 0.6);
}

/* ========================================
   SETTINGS PAGE - Dark Theme with Vertical Tabs
   ======================================== */
.agd-settings-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: #0A0A0A;
}

.agd-settings-header-dark {
    padding: 20px 32px;
    border-bottom: 1px solid #2A2A2A;
    background-color: #0A0A0A;
}

.agd-settings-header-dark h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #FFFFFF;
}

.agd-settings-content-dark {
    flex: 1;
    overflow: hidden;
}

/* Dark TabStrip Styling - Override Telerik defaults */
.agd-settings-content-dark .k-tabstrip {
    height: 100%;
    background-color: #0A0A0A !important;
    border: none !important;
}

.agd-settings-content-dark .k-tabstrip-items-wrapper {
    width: 260px !important;
    min-width: 260px !important;
    background-color: #111111 !important;
    border-right: 1px solid #2A2A2A !important;
    border: none !important;
    padding: 12px 8px !important;
}

.agd-settings-content-dark .k-tabstrip-items {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

.agd-settings-content-dark .k-tabstrip-item {
    background-color: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #B0B0B0 !important;
    transition: all 0.15s ease !important;
}

.agd-settings-content-dark .k-tabstrip-item:hover {
    background-color: #1A1A1A !important;
    color: #FFFFFF !important;
}

.agd-settings-content-dark .k-tabstrip-item.k-active,
.agd-settings-content-dark .k-tabstrip-item.k-selected {
    background-color: var(--agd-brand-color) !important;
    color: #FFFFFF !important;
}

.agd-settings-content-dark .k-tabstrip-item.k-active:hover,
.agd-settings-content-dark .k-tabstrip-item.k-selected:hover {
    background-color: var(--agd-brand-hover) !important;
}

.agd-settings-content-dark .k-tabstrip-item .k-link {
    padding: 12px 16px !important;
    color: inherit !important;
    background: transparent !important;
    border: none !important;
}

.agd-settings-content-dark .k-tabstrip-item .k-link:focus {
    box-shadow: none !important;
    outline: none !important;
}

.agd-settings-content-dark .k-tabstrip-content,
.agd-settings-content-dark .k-tabstrip > .k-content {
    flex: 1 !important;
    background-color: #0A0A0A !important;
    border: none !important;
    padding: 0 !important;
    overflow-y: auto !important;
}

/* Tab Header with Icon */
.agd-tab-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agd-tab-header svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.agd-tab-header span {
    font-size: 14px;
    font-weight: 500;
}

/* Debug-only tabs - grey styling */
.agd-tab-debug {
    opacity: 0.5;
}

.agd-tab-debug span,
.agd-tab-debug svg {
    color: var(--agd-text-secondary, #888888) !important;
}

/* DEBUG pill badge on customer tabs */
.agd-debug-pill {
    display: inline-block;
    background-color: #DC2626;
    color: #FFFFFF !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 14px;
    letter-spacing: 0.5px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Tab Content Dark */
.agd-settings-tab-content-dark {
    padding: 32px;
    max-width: 900px;
}

/* Full width for setup components with grids */
.agd-settings-tab-content-dark:has(.agd-professional-setup),
.agd-settings-tab-content-dark:has(.agd-appotype-setup),
.agd-settings-tab-content-dark:has(.agd-location-setup),
.agd-settings-tab-content-dark:has(.agd-room-setup),
.agd-settings-tab-content-dark:has(.agd-user-setup),
.agd-settings-tab-content-dark:has(.agd-account-setup) {
    max-width: 100%;
}

.agd-settings-tab-content-dark h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 600;
    color: #FFFFFF;
}

.agd-settings-desc {
    margin: 0 0 24px 0;
    font-size: 14px;
    color: #888888;
}

/* General Settings */
.agd-general-settings {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.agd-settings-section {
    background-color: #141414;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #2A2A2A;
    margin-bottom: 20px;
}

.agd-settings-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--agd-text-primary, #FFFFFF);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--agd-border-color, #2A2A2A);
}

.agd-input-suffix {
    margin-left: 8px;
    color: var(--agd-text-secondary, #888888);
    font-size: 14px;
}

.agd-coming-soon-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background-color: #141414;
    border: 1px solid #2A2A2A;
    border-radius: 12px;
    color: #666666;
}

.agd-coming-soon-inline svg {
    width: 24px;
    height: 24px;
    color: var(--agd-brand-color);
    opacity: 0.6;
}

.agd-coming-soon-inline span {
    font-size: 14px;
    color: #888888;
}

/* Account Settings */
.agd-account-settings {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.agd-logo-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.agd-logo-preview img {
    max-width: 200px;
    max-height: 120px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--agd-border-color, #2A2A2A);
    background-color: var(--agd-bg-tertiary, #1A1A1A);
    padding: 12px;
}

.agd-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 120px;
    border-radius: 8px;
    border: 2px dashed var(--agd-border-color, #3A3A3A);
    background-color: var(--agd-bg-tertiary, #1A1A1A);
    color: var(--agd-text-secondary, #888888);
    font-size: 13px;
}

.agd-hint-text {
    font-size: 12px;
    color: var(--agd-text-secondary, #888888);
    font-style: italic;
    margin-top: 4px;
}

/* Responsive Settings */
@media (max-width: 768px) {
    .agd-settings-content-dark .k-tabstrip-items-wrapper {
        width: 200px !important;
        min-width: 200px !important;
        padding: 8px 4px !important;
    }

    .agd-tab-header span {
        font-size: 13px;
    }

    .agd-settings-tab-content-dark {
        padding: 20px;
    }

    .agd-settings-header-dark {
        padding: 16px 20px;
    }
}

/* ========================================
   SCHEDULE SETUP COMPONENTS
   ======================================== */

.agd-schedule-setup {
    max-width: 1200px;
}

/* Expander Styling */
.agd-expander {
    margin-bottom: 16px;
    background-color: #111111;
    border: 1px solid #2A2A2A;
    border-radius: 12px;
    overflow: hidden;
}

.agd-expander .k-expander-header {
    background-color: #111111 !important;
    border: none !important;
    padding: 16px 20px !important;
}

.agd-expander .k-expander-header:hover {
    background-color: #1A1A1A !important;
}

.agd-expander-header {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
}

.agd-expander-header svg {
    width: 20px;
    height: 20px;
    color: var(--agd-brand-color);
}

.agd-expander .k-expander-content-wrapper {
    background-color: #0D0D0D !important;
}

.agd-expander-content {
    padding: 20px;
}

/* Card Section Styling */
.agd-card-section {
    margin-bottom: 20px;
    background-color: #141414 !important;
    border: 1px solid #2A2A2A !important;
    border-radius: 10px !important;
}

.agd-card-section .k-card-header {
    background-color: #1A1A1A !important;
    border-bottom: 1px solid #2A2A2A !important;
    padding: 14px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 20px !important;
}

.agd-card-section .k-card-title {
    color: #FFFFFF !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

.agd-card-section .k-card-actions {
    padding: 0 !important;
}

.agd-card-section .k-card-body {
    padding: 16px 20px !important;
    background-color: #141414 !important;
}

/* ALL Telerik Cards in Schedule Setup - Dark Theme */
.agd-schedule-setup .k-card {
    background-color: #141414 !important;
    border: 1px solid #2A2A2A !important;
    border-radius: 10px !important;
    color: #E0E0E0 !important;
}

.agd-schedule-setup .k-card-header {
    background-color: #1A1A1A !important;
    border-bottom: 1px solid #2A2A2A !important;
    padding: 14px 20px !important;
    color: #FFFFFF !important;
}

.agd-schedule-setup .k-card-title {
    color: #FFFFFF !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

.agd-schedule-setup .k-card-body {
    padding: 16px 20px !important;
    background-color: #141414 !important;
    color: #E0E0E0 !important;
}

.agd-schedule-setup .k-card-actions {
    background-color: #141414 !important;
    border-top: 1px solid #2A2A2A !important;
    padding: 12px 20px !important;
}

/* Working Time Editor */
.agd-working-time-editor {
    margin-bottom: 16px;
}

.agd-day-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #2A2A2A;
    transition: background-color 0.15s ease;
}

.agd-day-row:last-child {
    border-bottom: none;
}

.agd-day-row:hover {
    background-color: #1A1A1A;
}

.agd-day-row.agd-day-off {
    opacity: 0.6;
}

.agd-day-checkbox {
    flex-shrink: 0;
    width: 24px;
}

.agd-day-name {
    width: 100px;
    font-weight: 500;
    color: #E0E0E0;
    flex-shrink: 0;
}

.agd-time-ranges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    flex: 1;
}

.agd-time-range {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #1A1A1A;
    padding: 4px 8px;
    border-radius: 6px;
}

.agd-time-separator {
    color: #666666;
    font-weight: 500;
}

.agd-bookable-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding-left: 16px;
}

.agd-bookable-option label {
    color: #888888;
    font-size: 12px;
}

.agd-day-closed {
    color: #666666;
    font-style: italic;
    font-size: 13px;
}

/* Days Off Editor */
.agd-days-off-editor {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agd-no-data {
    color: #666666;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Day Off Form */
.agd-day-off-form {
    padding: 16px 0;
}

.agd-form-section {
    margin-bottom: 20px;
}

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

.agd-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: #E0E0E0;
}

.agd-form-group.agd-flex-1 {
    flex: 1;
}

.agd-unit {
    margin-left: 8px;
    color: #888888;
    font-size: 13px;
}

.agd-checkbox-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.agd-checkbox-row .agd-form-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

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

.agd-info-text {
    color: #888888;
    font-style: italic;
    padding: 16px;
    background-color: #1A1A1A;
    border-radius: 8px;
}

/* Agenda Setup */
.agd-agenda-setup {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agd-sort-buttons {
    display: flex;
    flex-direction: row;
    gap: 2px;
    align-items: center;
    justify-content: center;
}

.agd-sort-buttons .k-button {
    padding: 2px !important;
    min-width: 24px !important;
    width: 24px !important;
    height: 24px !important;
}

.agd-sort-buttons .k-button .k-icon,
.agd-sort-buttons .k-button .k-svg-icon {
    width: 14px !important;
    height: 14px !important;
}

/* Per-day schedule configuration */
.agd-per-day-schedule {
    margin-top: 16px;
}

.agd-day-schedule-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.agd-day-schedule-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    min-height: 44px;
}

.agd-day-schedule-row.agd-day-off {
    opacity: 0.6;
}

.agd-day-schedule-check {
    flex-shrink: 0;
}

.agd-day-schedule-name {
    width: 100px;
    flex-shrink: 0;
    font-weight: 500;
}

.agd-day-schedule-times {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agd-day-schedule-closed {
    color: #888;
    font-style: italic;
}

.agd-time-separator {
    color: #888;
    font-weight: 500;
}

[data-theme="light"] .agd-day-schedule-table {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .agd-day-schedule-row {
    background-color: rgba(0, 0, 0, 0.03);
}

.agd-color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #3A3A3A;
}

.agd-agenda-name-cell {
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--agd-text-primary);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: inline-block;
}

.agd-agenda-header-cell {
    padding: 6px 12px;
    border-radius: 4px;
    color: var(--agd-text-primary);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: inline-block;
}

/* Override grid header bg to allow agenda color to show */
.agd-agenda-name-header,
.agd-dark-grid .agd-agenda-name-header,
.agd-dark-grid .k-table-th.agd-agenda-name-header,
th.agd-agenda-name-header {
    background-color: transparent !important;
    background: transparent !important;
    padding: 4px 8px !important;
}

.agd-agenda-name-header .k-link,
.agd-agenda-name-header .k-cell-inner {
    background-color: transparent !important;
    background: transparent !important;
}

.agd-working-days-checkboxes {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.agd-working-days-checkboxes .agd-day-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    width: auto;
}

.agd-working-days-checkboxes .agd-day-checkbox label {
    margin-bottom: 0;
    font-size: 13px;
    color: #B0B0B0;
}

/* Grid Styling in Dark Theme */
.agd-schedule-setup .k-grid {
    background-color: #141414 !important;
    border: none !important;
}

.agd-schedule-setup .k-grid-header {
    background-color: #1A1A1A !important;
}

.agd-schedule-setup .k-grid th {
    background-color: #1A1A1A !important;
    color: #FFFFFF !important;
    border-color: #2A2A2A !important;
}

.agd-schedule-setup .k-grid td {
    background-color: #141414 !important;
    color: #E0E0E0 !important;
    border-color: #2A2A2A !important;
}

.agd-schedule-setup .k-grid tr:hover td {
    background-color: #1A1A1A !important;
}

.agd-schedule-setup .k-grid tr.k-selected td {
    background-color: var(--agd-brand-color) !important;
    color: #FFFFFF !important;
}

/* Grid container and wrapper */
.agd-schedule-setup .k-grid-container {
    background-color: #141414 !important;
}

.agd-schedule-setup .k-grid-content {
    background-color: #141414 !important;
}

.agd-schedule-setup .k-grid-content-locked {
    background-color: #141414 !important;
}

.agd-schedule-setup .k-grid .k-table {
    background-color: #141414 !important;
}

.agd-schedule-setup .k-grid .k-table-tbody {
    background-color: #141414 !important;
}

.agd-schedule-setup .k-grid .k-table-row {
    background-color: #141414 !important;
}

.agd-schedule-setup .k-grid .k-table-row:hover {
    background-color: #1A1A1A !important;
}

.agd-schedule-setup .k-grid .k-table-row.k-selected {
    background-color: var(--agd-brand-color) !important;
}

.agd-schedule-setup .k-grid .k-table-row.k-selected td {
    background-color: var(--agd-brand-color) !important;
}

.agd-schedule-setup .k-grid .k-table-row.k-alt {
    background-color: #181818 !important;
}

/* Grid header specific */
.agd-schedule-setup .k-grid-header-wrap {
    background-color: #1A1A1A !important;
}

.agd-schedule-setup .k-grid .k-table-thead {
    background-color: #1A1A1A !important;
}

.agd-schedule-setup .k-grid .k-table-th {
    background-color: #1A1A1A !important;
    color: #FFFFFF !important;
    border-color: #2A2A2A !important;
}

/* Grid pager */
.agd-schedule-setup .k-pager {
    background-color: #1A1A1A !important;
    border-color: #2A2A2A !important;
    color: #E0E0E0 !important;
}

/* Grid empty state */
.agd-schedule-setup .k-grid .k-grid-norecords {
    background-color: #141414 !important;
    color: #888888 !important;
}

/* Catch-all for any remaining grid elements */
.agd-schedule-setup .k-grid *,
.agd-schedule-setup .k-grid *::before,
.agd-schedule-setup .k-grid *::after {
    border-color: #2A2A2A !important;
}

.agd-schedule-setup .k-grid .k-table-td {
    background-color: #141414 !important;
    color: #E0E0E0 !important;
}

/* Virtual scrolling spacer */
.agd-schedule-setup .k-grid .k-height-container {
    background-color: #141414 !important;
}

.agd-schedule-setup .k-grid .k-virtual-content {
    background-color: #141414 !important;
}

/* Dark Grid Class - explicit styling */
.agd-dark-grid,
.agd-dark-grid .k-grid-container,
.agd-dark-grid .k-grid-content,
.agd-dark-grid .k-grid-content-locked,
.agd-dark-grid .k-table,
.agd-dark-grid .k-table-tbody,
.agd-dark-grid .k-table-row,
.agd-dark-grid .k-table-td,
.agd-dark-grid .k-height-container,
.agd-dark-grid .k-virtual-content {
    background-color: #141414 !important;
}

.agd-dark-grid .k-grid-header,
.agd-dark-grid .k-grid-header-wrap,
.agd-dark-grid .k-table-thead,
.agd-dark-grid .k-table-th {
    background-color: #1A1A1A !important;
    color: #FFFFFF !important;
}

.agd-dark-grid .k-table-row:hover,
.agd-dark-grid .k-table-row:hover .k-table-td {
    background-color: #1A1A1A !important;
}

.agd-dark-grid .k-table-row.k-selected,
.agd-dark-grid .k-table-row.k-selected .k-table-td {
    background-color: var(--agd-brand-color) !important;
    color: #FFFFFF !important;
}

/* Ensure all text in selected rows is readable */
.agd-dark-grid .k-table-row.k-selected .agd-task-title-text,
.agd-dark-grid .k-table-row.k-selected .agd-task-title-cell,
.agd-dark-grid .k-table-row.k-selected .agd-task-title-content,
.agd-dark-grid .k-table-row.k-selected .agd-task-date,
.agd-dark-grid .k-table-row.k-selected .agd-task-assignee,
.agd-dark-grid .k-table-row.k-selected .agd-task-progress span,
.agd-dark-grid .k-table-row.k-selected .agd-task-subtask-badge,
.agd-dark-grid .k-table-row.k-selected span,
.agd-dark-grid .k-table-row.k-selected div {
    color: #FFFFFF !important;
}

.agd-dark-grid .k-table-row.k-selected .agd-task-priority-badge {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #FFFFFF !important;
}

.agd-dark-grid .k-table-row.k-selected .agd-task-checkbox {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.agd-dark-grid .k-table-row.k-selected .agd-task-progress-bar {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.agd-dark-grid .k-table-row.k-selected .agd-task-progress-fill {
    background-color: #FFFFFF !important;
}

.agd-dark-grid .k-table-row.k-alt,
.agd-dark-grid .k-table-row.k-alt .k-table-td {
    background-color: #181818 !important;
}

.agd-dark-grid * {
    border-color: #2A2A2A !important;
}

.agd-dark-grid .k-table-td {
    color: #E0E0E0 !important;
}

/* Grid scrollbar area dark */
.agd-dark-grid::-webkit-scrollbar,
.agd-dark-grid *::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background-color: #141414;
}

.agd-dark-grid::-webkit-scrollbar-track,
.agd-dark-grid *::-webkit-scrollbar-track {
    background-color: #141414;
}

.agd-dark-grid::-webkit-scrollbar-thumb,
.agd-dark-grid *::-webkit-scrollbar-thumb {
    background-color: #3A3A3A;
    border-radius: 4px;
}

.agd-dark-grid::-webkit-scrollbar-thumb:hover,
.agd-dark-grid *::-webkit-scrollbar-thumb:hover {
    background-color: #4A4A4A;
}

/* Ensure the grid wrapper is also dark */
.agd-dark-grid.k-grid {
    background-color: #141414 !important;
    border: 1px solid #2A2A2A !important;
}

/* TabStrip inside Agenda Setup */
.agd-agenda-setup .k-tabstrip {
    background-color: #141414 !important;
    border: none !important;
}

.agd-agenda-setup .k-tabstrip-items-wrapper {
    background-color: #1A1A1A !important;
    border-bottom: 1px solid #2A2A2A !important;
    padding: 0 !important;
    width: auto !important;
    min-width: auto !important;
}

.agd-agenda-setup .k-tabstrip-items {
    flex-direction: row !important;
    gap: 0 !important;
    background-color: #1A1A1A !important;
}

.agd-agenda-setup .k-tabstrip-item {
    background-color: transparent !important;
    border-radius: 0 !important;
    color: #B0B0B0 !important;
    border: none !important;
}

.agd-agenda-setup .k-tabstrip-item:hover {
    background-color: #252525 !important;
    color: #FFFFFF !important;
}

.agd-agenda-setup .k-tabstrip-item.k-active,
.agd-agenda-setup .k-tabstrip-item.k-selected {
    background-color: #141414 !important;
    color: #FFFFFF !important;
    border-bottom: 2px solid var(--agd-brand-color) !important;
}

.agd-agenda-setup .k-tabstrip-item .k-link {
    padding: 12px 20px !important;
    color: inherit !important;
    background: transparent !important;
}

.agd-agenda-setup .k-tabstrip-content,
.agd-agenda-setup .k-tabstrip > .k-content {
    background-color: #141414 !important;
    padding: 20px !important;
    border: none !important;
    color: #E0E0E0 !important;
}

/* Form inputs in dark theme */
.agd-schedule-setup .k-input,
.agd-schedule-setup .k-picker,
.agd-schedule-setup .k-textbox,
.agd-schedule-setup .k-textarea,
.agd-schedule-setup .k-dropdown,
.agd-schedule-setup .k-numerictextbox,
.agd-schedule-setup .k-timepicker,
.agd-schedule-setup .k-datepicker,
.agd-schedule-setup .k-colorpicker {
    background-color: #1A1A1A !important;
    border-color: #3A3A3A !important;
    color: #E0E0E0 !important;
}

.agd-schedule-setup .k-input:focus,
.agd-schedule-setup .k-picker:focus,
.agd-schedule-setup .k-textbox:focus,
.agd-schedule-setup .k-textarea:focus {
    border-color: var(--agd-brand-color) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
}

/* Radio group styling */
.agd-schedule-setup .k-radio-list {
    gap: 12px;
}

.agd-schedule-setup .k-radio-item {
    color: #E0E0E0;
}

.agd-schedule-setup .k-radio:checked {
    border-color: var(--agd-brand-color) !important;
    background-color: var(--agd-brand-color) !important;
}

/* MultiSelect styling */
.agd-schedule-setup .k-multiselect {
    background-color: #1A1A1A !important;
    border-color: #3A3A3A !important;
}

.agd-schedule-setup .k-multiselect .k-chip {
    background-color: var(--agd-brand-color) !important;
    color: #FFFFFF !important;
}

/* Loading state */
.agd-schedule-setup .agd-loading {
    height: auto;
    padding: 60px;
    color: #888888;
}

/* Dialog and Window Dark Theme */
.agd-schedule-setup .k-window,
.agd-centered-window.k-window {
    background-color: #1A1A1A !important;
    border: 1px solid #3A3A3A !important;
}

.agd-schedule-setup .k-window-titlebar,
.agd-centered-window .k-window-titlebar {
    background-color: #111111 !important;
    color: #FFFFFF !important;
    border-bottom: 1px solid #3A3A3A !important;
}

.agd-schedule-setup .k-window-content,
.agd-centered-window .k-window-content {
    background-color: #1A1A1A !important;
    color: #E0E0E0 !important;
}

/* TabStrip inside centered windows - dark theme */
.agd-centered-window .k-tabstrip {
    background-color: #1A1A1A !important;
    border: none !important;
}

.agd-centered-window .k-tabstrip-items-wrapper {
    background-color: #111111 !important;
    border-bottom: 1px solid #3A3A3A !important;
    padding: 0 !important;
}

.agd-centered-window .k-tabstrip-items {
    flex-direction: row !important;
    gap: 0 !important;
    background-color: #111111 !important;
}

.agd-centered-window .k-tabstrip-item {
    background-color: transparent !important;
    border-radius: 0 !important;
    color: #B0B0B0 !important;
}

.agd-centered-window .k-tabstrip-item:hover {
    background-color: #252525 !important;
    color: #FFFFFF !important;
}

.agd-centered-window .k-tabstrip-item.k-active,
.agd-centered-window .k-tabstrip-item.k-selected {
    background-color: #1A1A1A !important;
    color: #FFFFFF !important;
    border-bottom: 2px solid var(--agd-brand-color) !important;
}

.agd-centered-window .k-tabstrip-item .k-link {
    padding: 10px 16px !important;
    color: inherit !important;
    background: transparent !important;
}

.agd-centered-window .k-tabstrip-content,
.agd-centered-window .k-tabstrip > .k-content {
    background-color: #1A1A1A !important;
    padding: 16px !important;
    border: none !important;
    color: #E0E0E0 !important;
}

.agd-schedule-setup .k-dialog,
.k-dialog {
    background-color: #1A1A1A !important;
    border: 1px solid #3A3A3A !important;
}

.agd-schedule-setup .k-dialog-titlebar,
.k-dialog-titlebar {
    background-color: #111111 !important;
    color: #FFFFFF !important;
    border-bottom: 1px solid #3A3A3A !important;
}

.agd-schedule-setup .k-dialog-content,
.k-dialog-content {
    background-color: #1A1A1A !important;
    color: #E0E0E0 !important;
}

.agd-schedule-setup .k-dialog-actions,
.k-dialog-actions {
    background-color: #1A1A1A !important;
    border-top: 1px solid #3A3A3A !important;
}

/* Dropdown and Popup Dark Theme */
.agd-schedule-setup .k-popup,
.k-animation-container .k-popup {
    background-color: #1A1A1A !important;
    border: 1px solid #3A3A3A !important;
}

.k-animation-container .k-list {
    background-color: #1A1A1A !important;
}

.k-animation-container .k-list-item {
    color: #E0E0E0 !important;
}

.k-animation-container .k-list-item:hover {
    background-color: #2A2A2A !important;
}

.k-animation-container .k-list-item.k-selected {
    background-color: var(--agd-brand-color) !important;
    color: #FFFFFF !important;
}

/* Time Picker popup dark */
.k-animation-container .k-time-list-container {
    background-color: #1A1A1A !important;
}

.k-animation-container .k-time-list-wrapper {
    background-color: #1A1A1A !important;
}

.k-animation-container .k-time-list .k-item {
    color: #E0E0E0 !important;
}

.k-animation-container .k-time-list .k-item:hover {
    background-color: #2A2A2A !important;
}

.k-animation-container .k-time-list .k-item.k-selected {
    background-color: var(--agd-brand-color) !important;
    color: #FFFFFF !important;
}

/* Date Picker calendar dark */
.k-animation-container .k-calendar {
    background-color: #1A1A1A !important;
    color: #E0E0E0 !important;
}

.k-animation-container .k-calendar .k-calendar-header {
    background-color: #1A1A1A !important;
    color: #FFFFFF !important;
}

.k-animation-container .k-calendar .k-calendar-td .k-link {
    color: #E0E0E0 !important;
}

.k-animation-container .k-calendar .k-calendar-td .k-link:hover {
    background-color: #2A2A2A !important;
}

.k-animation-container .k-calendar .k-calendar-td.k-selected .k-link {
    background-color: var(--agd-brand-color) !important;
    color: #FFFFFF !important;
}

/* Labels in schedule setup */
.agd-schedule-setup label {
    color: #E0E0E0 !important;
}

/* Responsive Schedule Setup */
@media (max-width: 768px) {
    .agd-day-row {
        flex-wrap: wrap;
    }
    
    .agd-day-name {
        width: 80px;
    }
    
    .agd-time-ranges {
        flex-basis: 100%;
        margin-top: 8px;
        padding-left: 36px;
    }
    
    .agd-bookable-option {
        margin-left: 0;
        padding-left: 36px;
        margin-top: 8px;
    }
    
    .agd-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .agd-checkbox-row {
        flex-direction: column;
        gap: 12px;
    }
}

/* ================================ */
/* Auto-Save Status Indicator       */
/* ================================ */

.agd-save-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    animation: fadeIn 0.3s ease-in-out;
}

.agd-save-status.saving {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.agd-save-status.saved {
    background-color: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.agd-save-status.error {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Settings Header with Save Status */
.agd-settings-header-dark {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background-color: #1A1A1A;
    border-bottom: 1px solid #333;
}

.agd-settings-header-dark h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
    color: #FFFFFF;
}

/* First Day of Week Highlight */
.agd-form-row-highlight {
    background-color: rgba(var(--agd-brand-color-rgb, 0, 120, 212), 0.1);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    border-left: 3px solid var(--agd-brand-color, #0078D4);
}

.agd-form-group-wide {
    min-width: 250px;
}

/* ========================================
   NON-WORKING DAY STYLES
   ======================================== */

/* CSS Variables for non-working days - theme-aware */
:root {
    --agd-non-working-bg: rgba(128, 128, 128, 0.15);
    --agd-non-working-stripe: rgba(128, 128, 128, 0.08);
    --agd-non-working-text: rgba(128, 128, 128, 0.7);
}

[data-theme="dark"] {
    --agd-non-working-bg: rgba(80, 80, 80, 0.4);
    --agd-non-working-stripe: rgba(80, 80, 80, 0.2);
    --agd-non-working-text: rgba(180, 180, 180, 0.6);
}

/* Non-working day cells - gray tinted background */
.k-scheduler .agd-non-working-day {
    background-color: var(--agd-non-working-bg) !important;
    position: relative;
}

/* Diagonal stripe pattern for non-working days */
.k-scheduler .agd-non-working-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 5px,
        var(--agd-non-working-stripe) 5px,
        var(--agd-non-working-stripe) 10px
    );
    pointer-events: none;
    z-index: 1;
}

/* Month view non-working day cells */
.k-scheduler-monthview .agd-non-working-day {
    background-color: var(--agd-non-working-bg) !important;
}

/* Month view day number color on non-working days */
.k-scheduler-monthview .agd-non-working-day > .k-link.k-nav-day {
    color: var(--agd-non-working-text) !important;
}

/* Cursor for non-working days */
.k-scheduler .agd-non-working-day:hover {
    cursor: not-allowed;
}

/* Combined styling when non-working day + hour start */
.k-scheduler .agd-non-working-day.agd-hour-start {
    border-top: 2px solid var(--agd-hour-line-color) !important;
}

/* Combined styling when non-working day + current time */
/* Current time border takes priority over stripes pattern */
.k-scheduler .agd-non-working-day.agd-current-time-cell {
    border-top: 3px solid var(--agd-current-time-color) !important;
    box-shadow: inset 0 3px 8px -3px var(--agd-current-time-color);
}

.k-scheduler .agd-non-working-day.agd-current-time-cell::after {
    z-index: 102;
}

/* Non-working hours within a working day (e.g., Saturday 13:00-14:00 lunch break) */
/* Just a darker background - appointments can still be created */
/* High specificity to override Telerik's k-nonwork-hour */
.k-scheduler .k-scheduler-body .k-scheduler-cell.k-slot-cell.agd-non-working-hours,
.k-scheduler .k-scheduler-body div.k-scheduler-cell.agd-non-working-hours {
    background-color: rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .k-scheduler .k-scheduler-body .k-scheduler-cell.k-slot-cell.agd-non-working-hours,
[data-theme="dark"] .k-scheduler .k-scheduler-body div.k-scheduler-cell.agd-non-working-hours {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="light"] .k-scheduler .k-scheduler-body .k-scheduler-cell.k-slot-cell.agd-non-working-hours,
[data-theme="light"] .k-scheduler .k-scheduler-body div.k-scheduler-cell.agd-non-working-hours {
    background-color: rgba(0, 0, 0, 0.15) !important;
}

/* Per-agenda non-working hours styling via SlotTemplate */
/* Applied to the slot hit area div when outside agenda-specific working hours */
.agd-slot-hit-area.agd-non-working-hours {
    background-color: rgba(0, 0, 0, 0.35) !important;
    pointer-events: auto;
}

[data-theme="dark"] .agd-slot-hit-area.agd-non-working-hours {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="light"] .agd-slot-hit-area.agd-non-working-hours {
    background-color: rgba(0, 0, 0, 0.12) !important;
}

/* ========================================
   VIEW SELECTOR BUTTONS (Day, Week, Work Week, Month, Timeline)
   ======================================== */

.agd-view-buttons {
    display: flex;
    align-items: stretch;
    background-color: var(--agd-bg-secondary);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.agd-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: 8px 16px;
    border: none;
    background-color: transparent;
    color: var(--agd-text-light);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.agd-view-btn:hover {
    background-color: var(--agd-white);
    color: var(--agd-text-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.agd-view-btn:active {
    transform: scale(0.98);
}

.agd-view-btn.active {
    background-color: var(--agd-brand-color);
    color: #FFFFFF;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.agd-view-btn.active:hover {
    background-color: var(--agd-brand-hover);
    color: #FFFFFF;
}

.agd-view-btn.disabled,
.agd-view-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Dark theme overrides for view buttons */
[data-theme="dark"] .agd-view-buttons {
    background-color: #1A1A1A;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .agd-view-btn {
    color: #B0B0B0;
}

[data-theme="dark"] .agd-view-btn:hover {
    background-color: #2A2A2A;
    color: #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .agd-view-btn.active {
    background-color: var(--agd-brand-color);
    color: #FFFFFF;
}

/* Responsive adjustments for view buttons */
@media (max-width: 1024px) {
    .agd-view-btn {
        min-width: 70px;
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .agd-view-buttons {
        padding: 2px;
    }
    
    .agd-view-btn {
        min-width: 55px;
        padding: 6px 8px;
        font-size: 11px;
    }
}

@media (max-width: 600px) {
    .agd-view-buttons {
        display: none;
    }
}

/* ========================================
   AGENDA SETUP POPUP WINDOW
   ======================================== */

.agd-agenda-window.k-window {
    background-color: #1A1A1A !important;
    border: 1px solid #3A3A3A !important;
}

.agd-agenda-window .k-window-titlebar {
    background-color: #111111 !important;
    color: #FFFFFF !important;
    border-bottom: 1px solid #3A3A3A !important;
    padding: 12px 16px !important;
}

.agd-agenda-window .k-window-title {
    color: #FFFFFF !important;
    font-weight: 600 !important;
}

.agd-agenda-window .k-window-content {
    background-color: #1A1A1A !important;
    color: #E0E0E0 !important;
    padding: 0 !important;
}

.agd-agenda-edit-form {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.agd-agenda-edit-form .k-tabstrip {
    flex: 1;
    min-height: 0; /* Critical for flex child to respect overflow */
    display: flex;
    flex-direction: column;
    background-color: #1A1A1A !important;
    border: none !important;
}

.agd-agenda-edit-form .k-tabstrip-items-wrapper {
    flex-shrink: 0; /* Prevent tab headers from shrinking */
    background-color: #111111 !important;
    border-bottom: 1px solid #3A3A3A !important;
    padding: 0 !important;
    width: auto !important;
    min-width: auto !important;
}

.agd-agenda-edit-form .k-tabstrip-items {
    flex-direction: row !important;
    gap: 0 !important;
    background-color: #111111 !important;
}

.agd-agenda-edit-form .k-tabstrip-item {
    background-color: transparent !important;
    border-radius: 0 !important;
    color: #B0B0B0 !important;
    border: none !important;
}

.agd-agenda-edit-form .k-tabstrip-item:hover {
    background-color: #252525 !important;
    color: #FFFFFF !important;
}

.agd-agenda-edit-form .k-tabstrip-item.k-active,
.agd-agenda-edit-form .k-tabstrip-item.k-selected {
    background-color: #1A1A1A !important;
    color: #FFFFFF !important;
    border-bottom: 2px solid var(--agd-brand-color) !important;
}

.agd-agenda-edit-form .k-tabstrip-item .k-link {
    padding: 10px 16px !important;
    color: inherit !important;
    background: transparent !important;
    font-size: 13px !important;
}

.agd-agenda-edit-form .k-tabstrip-content,
.agd-agenda-edit-form .k-tabstrip > .k-content {
    flex: 1;
    min-height: 0; /* Critical for flex child to respect overflow */
    background-color: #1A1A1A !important;
    padding: 16px !important;
    border: none !important;
    color: #E0E0E0 !important;
    overflow-y: auto !important;
}

/* Form inputs in agenda popup */
.agd-agenda-edit-form .k-input,
.agd-agenda-edit-form .k-picker,
.agd-agenda-edit-form .k-textbox,
.agd-agenda-edit-form .k-textarea,
.agd-agenda-edit-form .k-dropdown,
.agd-agenda-edit-form .k-numerictextbox,
.agd-agenda-edit-form .k-timepicker,
.agd-agenda-edit-form .k-datepicker,
.agd-agenda-edit-form .k-colorpicker,
.agd-agenda-edit-form .k-multiselect {
    background-color: #252525 !important;
    border-color: #3A3A3A !important;
    color: #E0E0E0 !important;
}

.agd-agenda-edit-form .k-input:focus,
.agd-agenda-edit-form .k-picker:focus,
.agd-agenda-edit-form .k-textbox:focus {
    border-color: var(--agd-brand-color) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
}

.agd-agenda-edit-form label {
    color: #E0E0E0 !important;
}

.agd-agenda-edit-form .agd-form-section {
    padding: 8px 0;
}

.agd-agenda-edit-form .agd-form-buttons {
    flex-shrink: 0; /* Prevent buttons from shrinking */
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #3A3A3A;
    background-color: #1A1A1A; /* Ensure solid background */
}

/* ========================================
   SCHEDULER HEADER/BODY COLUMN ALIGNMENT FIX
   Based on Telerik KB for hiding scrollbar spacer
   ======================================== */

/* Remove the scrollbar spacer padding from scheduler head */
.k-scheduler .k-scheduler-head {
    padding-right: 0 !important;
}

/* Remove scrollbar spacer padding from scheduler body */
.k-scheduler .k-scheduler-body {
    padding-right: 0 !important;
}

/* CRITICAL: The k-group-cell has padding that causes nested rows to be narrower.
   Remove padding so nested rows fill full width */
.k-scheduler .k-scheduler-cell.k-group-cell {
    padding: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

/* Make sure nested rows in group cells take full width */
.k-scheduler .k-scheduler-cell.k-group-cell > .k-scheduler-row {
    width: 100% !important;
    max-width: none !important;
}

/* Remove right border from last cells to eliminate 1px gap */
.k-scheduler .k-scheduler-head .k-scheduler-cell:last-child,
.k-scheduler .k-scheduler-head .k-scheduler-row .k-scheduler-cell:last-child {
    border-right-width: 0 !important;
}

/* Remove border from heading cells that sit above group cells */
.k-scheduler .k-scheduler-cell.k-heading-cell {
    border-right-width: 0 !important;
    border-left-width: 0 !important;
}

/* Remove borders from day header cells inside group cells */
.k-scheduler .k-scheduler-head .k-group-cell .k-scheduler-cell {
    border-right-width: 0 !important;
    border-left-width: 0 !important;
}

/* Ensure the scheduler body can scroll */
.k-scheduler .k-scheduler-layout {
    background-color: #1e1e1e !important;
}

/* Fix transparent row in scheduler header - ensure header stays above body */
.k-scheduler .k-scheduler-head {
    background-color: #1a1a1a !important;
    z-index: 10 !important;
}

.k-scheduler .k-scheduler-head .k-scheduler-group {
    background-color: #1a1a1a !important;
}

.k-scheduler .k-scheduler-head .k-scheduler-row {
    background-color: #1a1a1a !important;
}

.k-scheduler .k-scheduler-head .k-side-cell {
    background-color: #1a1a1a !important;
}

.k-scheduler .k-scheduler-head .k-group-cell {
    background-color: #1a1a1a !important;
}

.k-scheduler .k-scheduler-head .k-group-cell .k-heading-cell {
    background-color: #1a1a1a !important;
}

/* Use box-sizing border-box to include borders in width calculation */
.k-scheduler .k-scheduler-cell {
    box-sizing: border-box !important;
}

/* ========================================
   VISUAL SEPARATOR BETWEEN CALENDAR GROUPS
   Lines extending full height between each agenda
   ======================================== */

/* Make all agenda heading cells position relative for pseudo-element */
.k-scheduler .k-scheduler-head > .k-scheduler-group > .k-scheduler-row:first-child > .k-scheduler-cell.k-heading-cell:not(.k-side-cell) {
    position: relative;
    overflow: visible;
}

/* Add a full-height separator line on the LEFT of each heading cell that follows another heading cell */
/* This creates separators between all adjacent agenda columns */
.k-scheduler .k-scheduler-head > .k-scheduler-group > .k-scheduler-row:first-child > .k-scheduler-cell.k-heading-cell + .k-scheduler-cell.k-heading-cell::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 3000px; /* Very tall to cover full calendar height */
    background-color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    z-index: 100;
}

/* Ensure parent containers don't clip the separator */
.k-scheduler .k-scheduler-head {
    overflow: visible;
}

.k-scheduler .k-scheduler-head .k-scheduler-group {
    overflow: visible;
}

.k-scheduler .k-scheduler-head > .k-scheduler-group > .k-scheduler-row:first-child {
    overflow: visible;
}

/* ========================================
   HOUR SEPARATION LINES
   Via Telerik OnCellRender event (agd-hour-start class)
   ======================================== */

/* CSS Variables for hour lines - theme-aware */
:root {
    --agd-hour-line-color: rgba(128, 128, 128, 0.4);
    --agd-subhour-line-color: rgba(128, 128, 128, 0.15);
}

[data-theme="dark"] {
    --agd-hour-line-color: rgba(255, 255, 255, 0.25);
    --agd-subhour-line-color: rgba(255, 255, 255, 0.08);
}

/* Hour boundary cells (minute == 0) get a stronger top border */
.k-scheduler .agd-hour-start {
    border-top: 2px solid var(--agd-hour-line-color) !important;
}

/* ========================================
   CURRENT TIME INDICATOR
   Via Telerik OnCellRender event (agd-current-time-cell class)
   Red line at top of cell containing current time
   Uses border-top + box-shadow to avoid ::before conflict with stripes
   ======================================== */

/* CSS Variable for current time color */
:root {
    --agd-current-time-color: #E53935;
}

/* Cell containing current time - red line at top using border */
/* Base styles for all scheduler views */
.k-scheduler .agd-current-time-cell,
.k-scheduler-dayview .agd-current-time-cell,
.k-scheduler-weekview .agd-current-time-cell,
.k-scheduler-timelineview .agd-current-time-cell,
.k-scheduler .k-scheduler-body .agd-current-time-cell {
    position: relative;
    border-top: 3px solid var(--agd-current-time-color) !important;
    box-shadow: inset 0 3px 8px -3px var(--agd-current-time-color) !important;
}

/* Pulsing dot at the left of the current time line */
.k-scheduler .agd-current-time-cell::after,
.k-scheduler-dayview .agd-current-time-cell::after,
.k-scheduler-weekview .agd-current-time-cell::after,
.k-scheduler-timelineview .agd-current-time-cell::after,
.k-scheduler .k-scheduler-body .agd-current-time-cell::after {
    content: '';
    position: absolute;
    top: -7px;
    left: -5px;
    width: 12px;
    height: 12px;
    background-color: var(--agd-current-time-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--agd-current-time-color);
    z-index: 101;
    pointer-events: none;
    animation: agdCurrentTimePulse 2s ease-in-out infinite;
}

/* Timeline view adjustment */
.k-scheduler-timelineview .agd-current-time-cell::after {
    top: -5px;
    left: -6px;
}

/* ========================================
   TIMELINE VIEW FIXES
   ======================================== */

/* Timeline view - force dark background on ALL elements */
.k-scheduler-timelineview,
.k-scheduler-timelineview .k-scheduler-layout,
.k-scheduler-timelineview .k-scheduler-layout > table,
.k-scheduler-timelineview .k-scheduler-layout > table > tbody,
.k-scheduler-timelineview .k-scheduler-layout > table > tbody > tr,
.k-scheduler-timelineview .k-scheduler-layout > table > tbody > tr > td,
.k-scheduler-timelineview table,
.k-scheduler-timelineview tbody,
.k-scheduler-timelineview tr,
.k-scheduler-timelineview td,
.k-scheduler-timelineview th {
    background-color: #1e1e1e !important;
}

/* Fix timeline view side cells and "All events" cell background */
.k-scheduler-timelineview .k-side-cell,
.k-scheduler-timelineview .k-scheduler-cell.k-side-cell,
.k-scheduler-timelineview .k-scheduler-head .k-side-cell,
.k-scheduler-timelineview .k-scheduler-body .k-side-cell {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}

/* Timeline view group cells */
.k-scheduler-timelineview .k-group-cell,
.k-scheduler-timelineview .k-scheduler-group-cell {
    background-color: #1e1e1e !important;
}

/* Timeline view body cells */
.k-scheduler-timelineview .k-scheduler-body,
.k-scheduler-timelineview .k-scheduler-body .k-scheduler-cell,
.k-scheduler-timelineview .k-scheduler-body .k-scheduler-row {
    background-color: #1e1e1e !important;
}

/* Timeline view slot cells */
.k-scheduler-timelineview .k-slot-cell {
    background-color: #1e1e1e !important;
}

/* Timeline events row container */
.k-scheduler-timelineview .k-events-container {
    background-color: transparent !important;
}

/* Timeline view resource cells (left labels like "All events") */
.k-scheduler-timelineview .k-scheduler-times,
.k-scheduler-timelineview .k-scheduler-times td,
.k-scheduler-timelineview .k-scheduler-times th,
.k-scheduler-timelineview .k-scheduler-times .k-scheduler-cell {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}

/* Timeline scheduler group and rows */
.k-scheduler-timelineview .k-scheduler-group,
.k-scheduler-timelineview .k-scheduler-group > .k-scheduler-row {
    background-color: #1e1e1e !important;
}

/* Light theme overrides for timeline */
:root:not([data-theme="dark"]) .k-scheduler-timelineview,
:root:not([data-theme="dark"]) .k-scheduler-timelineview .k-scheduler-layout,
:root:not([data-theme="dark"]) .k-scheduler-timelineview table,
:root:not([data-theme="dark"]) .k-scheduler-timelineview tbody,
:root:not([data-theme="dark"]) .k-scheduler-timelineview tr,
:root:not([data-theme="dark"]) .k-scheduler-timelineview td,
:root:not([data-theme="dark"]) .k-scheduler-timelineview th,
:root:not([data-theme="dark"]) .k-scheduler-timelineview .k-side-cell,
:root:not([data-theme="dark"]) .k-scheduler-timelineview .k-scheduler-cell.k-side-cell,
:root:not([data-theme="dark"]) .k-scheduler-timelineview .k-scheduler-head .k-side-cell,
:root:not([data-theme="dark"]) .k-scheduler-timelineview .k-scheduler-body .k-side-cell,
:root:not([data-theme="dark"]) .k-scheduler-timelineview .k-group-cell,
:root:not([data-theme="dark"]) .k-scheduler-timelineview .k-scheduler-group-cell,
:root:not([data-theme="dark"]) .k-scheduler-timelineview .k-scheduler-body,
:root:not([data-theme="dark"]) .k-scheduler-timelineview .k-scheduler-body .k-scheduler-cell,
:root:not([data-theme="dark"]) .k-scheduler-timelineview .k-slot-cell,
:root:not([data-theme="dark"]) .k-scheduler-timelineview .k-scheduler-times,
:root:not([data-theme="dark"]) .k-scheduler-timelineview .k-scheduler-times td,
:root:not([data-theme="dark"]) .k-scheduler-timelineview .k-scheduler-times .k-scheduler-cell,
:root:not([data-theme="dark"]) .k-scheduler-timelineview .k-scheduler-group {
    background-color: #f5f5f5 !important;
    color: #333333 !important;
}

/* Pulsing animation */
@keyframes agdCurrentTimePulse {
    0%, 100% { 
        box-shadow: 0 0 4px var(--agd-current-time-color);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 12px var(--agd-current-time-color);
        transform: scale(1.2);
    }
}

/* ========================================
   DAYS OFF STYLING
   Holidays, closures, and special days off
   Applied via OnCellRender event (agd-day-off class)
   ======================================== */

/* CSS Variables for days off - theme-aware */
:root {
    --agd-day-off-bg: rgba(239, 68, 68, 0.08);
    --agd-day-off-stripe: rgba(239, 68, 68, 0.05);
    --agd-day-off-text: rgba(239, 68, 68, 0.7);
}

[data-theme="dark"] {
    --agd-day-off-bg: rgba(239, 68, 68, 0.12);
    --agd-day-off-stripe: rgba(239, 68, 68, 0.08);
    --agd-day-off-text: rgba(239, 68, 68, 0.8);
}

/* Day off cells - red tinted background */
.k-scheduler .agd-day-off {
    background-color: var(--agd-day-off-bg) !important;
    position: relative;
}

/* Diagonal stripe pattern for days off (subtle visual indicator) */
.k-scheduler .agd-day-off::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 6px,
        var(--agd-day-off-stripe) 6px,
        var(--agd-day-off-stripe) 12px
    );
    pointer-events: none;
    z-index: 1;
}

/* Month view day off cells */
.k-scheduler-monthview .agd-day-off {
    background-color: var(--agd-day-off-bg) !important;
}

/* Month view day number color on days off */
.k-scheduler-monthview .agd-day-off > .k-link.k-nav-day {
    color: var(--agd-day-off-text) !important;
}

/* Cursor for days off - indicate it's blocked */
.k-scheduler .agd-day-off:hover {
    cursor: not-allowed;
}

/* Combined styling when day off + hour start */
.k-scheduler .agd-day-off.agd-hour-start {
    border-top: 2px solid var(--agd-hour-line-color) !important;
}

/* Combined styling when day off + current time */
/* Current time border takes priority over stripes pattern */
.k-scheduler .agd-day-off.agd-current-time-cell {
    border-top: 3px solid var(--agd-current-time-color) !important;
    box-shadow: inset 0 3px 8px -3px var(--agd-current-time-color);
}

/* Current time dot takes priority */
.k-scheduler .agd-day-off.agd-current-time-cell::after {
    z-index: 102;
}

/* ========================================
   APPOINTMENT TOOLTIP
   Custom tooltip showing appointment details on hover
   ======================================== */

/* Tooltip wrapper - positioned fixed via JS */
.agd-appo-tooltip-wrapper {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
    transform: translateY(5px);
}

/* Visible state */
.agd-appo-tooltip-wrapper.agd-tooltip-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Main tooltip card */
.agd-appo-tooltip {
    background-color: #1A1A1A;
    border: 1px solid #3A3A3A;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    max-width: 320px;
    min-width: 280px;
}

/* Light theme tooltip */
:root:not([data-theme="dark"]) .agd-appo-tooltip {
    background-color: #FFFFFF;
    border: 1px solid #E1E1E1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Tooltip header with color bar */
.agd-tooltip-header {
    padding: 12px 16px;
    border-left: 4px solid var(--agd-brand-color);
    background-color: #222222;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

:root:not([data-theme="dark"]) .agd-tooltip-header {
    background-color: #F5F5F5;
}

.agd-tooltip-title {
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1.3;
    flex: 1;
    word-break: break-word;
}

:root:not([data-theme="dark"]) .agd-tooltip-title {
    color: #1A1A1A;
}

.agd-tooltip-icons {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.agd-tooltip-icon {
    font-size: 14px;
}

/* Tooltip content rows */
.agd-tooltip-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: #B0B0B0;
    font-size: 13px;
    border-bottom: 1px solid #2A2A2A;
}

:root:not([data-theme="dark"]) .agd-tooltip-row {
    color: #666666;
    border-bottom: 1px solid #EEEEEE;
}

.agd-tooltip-row:last-of-type {
    border-bottom: none;
}

.agd-tooltip-row svg {
    color: #888888;
    flex-shrink: 0;
}

:root:not([data-theme="dark"]) .agd-tooltip-row svg {
    color: #999999;
}

/* Time row - slightly larger */
.agd-tooltip-time {
    font-size: 14px;
    color: #E0E0E0;
    font-weight: 500;
}

:root:not([data-theme="dark"]) .agd-tooltip-time {
    color: #333333;
}

.agd-tooltip-time svg {
    color: var(--agd-brand-color);
}

/* Duration row */
.agd-tooltip-duration {
    color: #888888;
    font-size: 12px;
    padding-top: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2A2A2A;
}

:root:not([data-theme="dark"]) .agd-tooltip-duration {
    color: #888888;
    border-bottom: 1px solid #EEEEEE;
}

.agd-tooltip-label {
    color: #888888;
    flex-shrink: 0;
}

:root:not([data-theme="dark"]) .agd-tooltip-label {
    color: #888888;
}

.agd-tooltip-value {
    color: #E0E0E0;
    font-weight: 500;
}

:root:not([data-theme="dark"]) .agd-tooltip-value {
    color: #333333;
}

/* First appointment badge */
.agd-tooltip-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 16px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.agd-badge-first {
    background-color: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
}

.agd-badge-first svg {
    color: #F59E0B;
}

/* Description section */
.agd-tooltip-desc {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    color: #888888;
    font-size: 12px;
    background-color: #1E1E1E;
    border-top: 1px solid #2A2A2A;
}

:root:not([data-theme="dark"]) .agd-tooltip-desc {
    color: #666666;
    background-color: #FAFAFA;
    border-top: 1px solid #EEEEEE;
}

.agd-tooltip-desc svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #666666;
}

.agd-tooltip-desc span {
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Footer hint */
.agd-tooltip-footer {
    padding: 8px 16px;
    background-color: #151515;
    border-top: 1px solid #2A2A2A;
    text-align: center;
}

:root:not([data-theme="dark"]) .agd-tooltip-footer {
    background-color: #F0F0F0;
    border-top: 1px solid #E1E1E1;
}

.agd-tooltip-footer span {
    font-size: 11px;
    color: #666666;
    font-style: italic;
}

:root:not([data-theme="dark"]) .agd-tooltip-footer span {
    color: #888888;
}

/* ========================================
   CUSTOM CONTEXT MENU
   ======================================== */

/* Override Telerik context menu styling */
.k-menu.k-context-menu {
    background: #1e1e2e !important;
    border: 1px solid #3a3a4a !important;
    border-radius: 16px !important;
    padding: 6px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    min-width: 220px !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

:root:not([data-theme="dark"]) .k-menu.k-context-menu {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
}

/* Submenu popup (rendered outside context menu DOM) */
.k-menu-popup {
    background: #1e1e2e !important;
    border: 1px solid #3a3a4a !important;
    border-radius: 16px !important;
    padding: 6px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    overflow: hidden;
}

.k-menu-popup .k-menu-group {
    background: #1e1e2e !important;
    border: none !important;
    border-radius: 16px !important;
}

:root:not([data-theme="dark"]) .k-menu-popup {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
}

:root:not([data-theme="dark"]) .k-menu-popup .k-menu-group {
    background: #ffffff !important;
}

.k-menu.k-context-menu .k-menu-item,
.k-menu-popup .k-menu-item {
    background: transparent !important;
    border-radius: 8px !important;
    margin: 2px 0 !important;
}

.k-menu.k-context-menu .k-menu-item:hover,
.k-menu.k-context-menu .k-menu-item.k-hover,
.k-menu-popup .k-menu-item:hover,
.k-menu-popup .k-menu-item.k-hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

:root:not([data-theme="dark"]) .k-menu.k-context-menu .k-menu-item:hover,
:root:not([data-theme="dark"]) .k-menu.k-context-menu .k-menu-item.k-hover,
:root:not([data-theme="dark"]) .k-menu-popup .k-menu-item:hover,
:root:not([data-theme="dark"]) .k-menu-popup .k-menu-item.k-hover {
    background: rgba(0, 0, 0, 0.05) !important;
}

.k-menu.k-context-menu .k-menu-link,
.k-menu-popup .k-menu-link {
    padding: 0 !important;
    color: #e0e0e0 !important;
}

:root:not([data-theme="dark"]) .k-menu-popup .k-menu-link {
    color: #333333 !important;
}

/* Custom context menu item styling */
.agd-context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #e0e0e0;
    font-size: 14px;
    transition: all 0.15s ease;
}

:root:not([data-theme="dark"]) .agd-context-menu-item {
    color: #333333;
}

.agd-context-menu-item.separator {
    height: 1px;
    padding: 0;
    margin: 6px 8px;
    background: linear-gradient(90deg, transparent, #3a3a4a, transparent);
}

:root:not([data-theme="dark"]) .agd-context-menu-item.separator {
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
}

.agd-context-menu-item.danger {
    color: #ef4444;
}

.agd-context-menu-item.danger .agd-ctx-icon svg {
    stroke: #ef4444;
}

.agd-context-menu-item.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

.agd-context-menu-item.disabled .agd-ctx-icon svg {
    stroke: #666666;
}

.agd-ctx-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.agd-ctx-icon svg {
    width: 18px;
    height: 18px;
    stroke: #a0a0a0;
}

:root:not([data-theme="dark"]) .agd-ctx-icon svg {
    stroke: #666666;
}

.k-menu-item:hover .agd-ctx-icon svg,
.k-menu-item.k-hover .agd-ctx-icon svg {
    stroke: #e0e0e0;
}

:root:not([data-theme="dark"]) .k-menu-item:hover .agd-ctx-icon svg,
:root:not([data-theme="dark"]) .k-menu-item.k-hover .agd-ctx-icon svg {
    stroke: #333333;
}

.k-menu-item:hover .agd-context-menu-item.danger .agd-ctx-icon svg,
.k-menu-item.k-hover .agd-context-menu-item.danger .agd-ctx-icon svg {
    stroke: #ef4444 !important;
}

.agd-ctx-text {
    flex: 1;
    white-space: nowrap;
}

.agd-ctx-shortcut {
    font-size: 11px;
    color: #666666;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Consolas', monospace;
}

:root:not([data-theme="dark"]) .agd-ctx-shortcut {
    color: #888888;
    background: rgba(0, 0, 0, 0.06);
}

/* ========================================
   DELETE CONFIRMATION DIALOG
   ======================================== */

.agd-delete-dialog {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 8px;
}

.agd-delete-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 50%;
    margin-bottom: 16px;
}

.agd-delete-icon svg {
    stroke: #ef4444;
}

.agd-delete-content {
    max-width: 320px;
}

.agd-delete-title {
    font-size: 16px;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0 0 12px 0;
}

:root:not([data-theme="dark"]) .agd-delete-title {
    color: #333333;
}

.agd-delete-appo-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
    word-break: break-word;
}

:root:not([data-theme="dark"]) .agd-delete-appo-name {
    color: #111111;
}

.agd-delete-appo-time {
    font-size: 14px;
    color: #a0a0a0;
    margin: 0 0 16px 0;
}

:root:not([data-theme="dark"]) .agd-delete-appo-time {
    color: #666666;
}

.agd-delete-warning {
    font-size: 13px;
    color: #888888;
    margin: 0;
    line-height: 1.5;
}

:root:not([data-theme="dark"]) .agd-delete-warning {
    color: #888888;
}

/* Delete button with icon */
.agd-btn-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
}

.agd-btn-icon svg {
    width: 16px;
    height: 16px;
}

/* Style the dialog buttons container */
.k-dialog .k-actions {
    padding: 12px 20px 20px 20px !important;
    gap: 12px !important;
    justify-content: flex-end !important;
}

/* Style the error/delete button */
.k-button.k-button-solid-error,
[data-theme="dark"] .k-button.k-button-solid-error {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
    border-color: #dc2626 !important;
    color: white !important;
}

.k-button.k-button-solid-error:hover,
[data-theme="dark"] .k-button.k-button-solid-error:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%) !important;
    border-color: #b91c1c !important;
}

/* ========================================
   WARNING DIALOG (Non-Working Day)
   ======================================== */

.agd-warning-dialog {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 8px;
}

.agd-warning-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 50%;
    margin-bottom: 16px;
}

.agd-warning-icon svg {
    stroke: #f59e0b;
}

.agd-warning-content {
    max-width: 320px;
}

.agd-warning-message {
    font-size: 15px;
    color: #e0e0e0;
    margin: 0;
    line-height: 1.6;
}

:root:not([data-theme="dark"]) .agd-warning-message {
    color: #333333;
}

/* ========================================
   CUSTOMER/CONTACTS PAGE STYLES
   ======================================== */

.agd-cust-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: #0A0A0A;
}

.agd-cust-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background-color: #111111;
    border-bottom: 1px solid #2A2A2A;
}

.agd-cust-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #FFFFFF;
}

.agd-cust-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background-color: #0D0D0D;
    border-bottom: 1px solid #2A2A2A;
}

.agd-cust-search {
    flex: 1;
    max-width: 400px;
}

.agd-cust-filters {
    display: flex;
    gap: 4px;
}

.agd-cust-filter-btn {
    padding: 8px 16px;
    border: 1px solid #3A3A3A;
    background-color: transparent;
    color: #B0B0B0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.agd-cust-filter-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.agd-cust-filter-btn:last-child {
    border-radius: 0 6px 6px 0;
}

.agd-cust-filter-btn:not(:first-child) {
    border-left: none;
}

.agd-cust-filter-btn:hover {
    background-color: #1A1A1A;
    color: #FFFFFF;
}

.agd-cust-filter-btn.active {
    background-color: var(--agd-brand-color);
    border-color: var(--agd-brand-color);
    color: #FFFFFF;
}

.agd-cust-grid {
    flex: 1;
    overflow: hidden;
    padding: 16px 24px;
}

.agd-cust-grid .k-grid {
    height: 100%;
    background-color: #141414 !important;
    border: 1px solid #2A2A2A !important;
    border-radius: 10px !important;
}

.agd-cust-grid .k-grid-header {
    background-color: #1A1A1A !important;
}

.agd-cust-grid .k-grid-header th {
    background-color: #1A1A1A !important;
    color: #FFFFFF !important;
    border-color: #2A2A2A !important;
    font-weight: 600;
}

.agd-cust-grid .k-grid-content {
    background-color: #141414 !important;
}

.agd-cust-grid .k-grid td {
    background-color: #141414 !important;
    color: #E0E0E0 !important;
    border-color: #2A2A2A !important;
}

.agd-cust-grid .k-grid tr:hover td {
    background-color: #1A1A1A !important;
}

.agd-cust-grid .k-grid tr.k-selected td {
    background-color: var(--agd-brand-color) !important;
    color: #FFFFFF !important;
}

.agd-cust-grid .k-grid .k-pager {
    background-color: #1A1A1A !important;
    border-color: #2A2A2A !important;
    color: #E0E0E0 !important;
}

.agd-cust-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.agd-cust-type-badge.type-c {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
}

.agd-cust-type-badge.type-p {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

.agd-cust-type-badge.type-se {
    background-color: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
}

.agd-cust-name-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.agd-cust-name-primary {
    font-weight: 500;
    color: #FFFFFF;
}

.agd-cust-name-secondary {
    font-size: 12px;
    color: #888888;
}

.agd-cust-actions {
    display: flex;
    gap: 8px;
}

.agd-cust-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666666;
    text-align: center;
    padding: 40px;
}

.agd-cust-empty svg {
    width: 64px;
    height: 64px;
    opacity: 0.5;
    margin-bottom: 16px;
}

.agd-cust-empty p {
    margin: 0;
    font-size: 16px;
}

/* Customer Detail Page */
.agd-cust-detail {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: #0A0A0A;
}

.agd-cust-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background-color: #111111;
    border-bottom: 1px solid #2A2A2A;
}

.agd-cust-detail-header h1 {
    flex: 1;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #FFFFFF;
}

/* Auto-save Indicator */
.agd-autosave-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.agd-autosave-indicator.saving {
    background: rgba(99, 102, 241, 0.15);
    color: #818CF8;
}

.agd-autosave-indicator.saved {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
}

.agd-cust-detail-content {
    flex: 1;
    overflow: hidden;
    padding: 0;
}

.agd-cust-detail-content .k-tabstrip {
    height: 100%;
    background-color: #0A0A0A !important;
    border: none !important;
}

.agd-cust-detail-content .k-tabstrip-items-wrapper {
    background-color: #111111 !important;
    border-bottom: 1px solid #2A2A2A !important;
    padding: 0 24px !important;
}

.agd-cust-detail-content .k-tabstrip-items {
    flex-direction: row !important;
    gap: 0 !important;
    background-color: transparent !important;
}

.agd-cust-detail-content .k-tabstrip-item {
    background-color: transparent !important;
    border-radius: 0 !important;
    color: #B0B0B0 !important;
    border: none !important;
}

.agd-cust-detail-content .k-tabstrip-item:hover {
    background-color: #1A1A1A !important;
    color: #FFFFFF !important;
}

.agd-cust-detail-content .k-tabstrip-item.k-active,
.agd-cust-detail-content .k-tabstrip-item.k-selected {
    background-color: transparent !important;
    color: #FFFFFF !important;
    border-bottom: 2px solid var(--agd-brand-color) !important;
}

.agd-cust-detail-content .k-tabstrip-item .k-link {
    padding: 14px 20px !important;
    color: inherit !important;
    background: transparent !important;
}

.agd-cust-detail-content .k-tabstrip-content,
.agd-cust-detail-content .k-tabstrip > .k-content {
    background-color: #0A0A0A !important;
    padding: 24px !important;
    border: none !important;
    overflow-y: auto !important;
}

/* Customer Details Grid Layout */
.agd-cust-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 8px;
    max-width: 1400px;
}

/* Customer Card Styling */
.agd-cust-card {
    background: var(--agd-card-bg, #141414);
    border: 1px solid var(--agd-border-color, #2A2A2A);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.agd-cust-card:hover {
    border-color: var(--agd-primary, #6366f1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.agd-cust-card-full {
    grid-column: 1 / -1;
}

/* Validation Error Display */
.agd-cust-validation-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin: 0 8px 16px 8px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 8px;
    color: #ef4444;
}

.agd-cust-validation-error svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.agd-cust-validation-error span {
    font-size: 14px;
    font-weight: 500;
}

/* Pending Prospects Info Banner */
.agd-mkt-pending-prospects-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin: 0 8px 16px 8px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 8px;
    color: #a5b4fc;
}

.agd-mkt-pending-prospects-banner svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #818cf8;
}

.agd-mkt-pending-prospects-banner span {
    font-size: 14px;
    font-weight: 500;
}

/* Field Error Styling - Red Border */
.agd-field-error .k-input,
.agd-field-error .k-textbox,
.agd-field-error .k-picker,
.agd-field-error .k-dropdown,
.agd-field-error .k-combobox {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3) !important;
}

.agd-field-error .k-input:focus,
.agd-field-error .k-input:focus-within,
.agd-field-error .k-textbox:focus,
.agd-field-error .k-picker:focus-within {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.4) !important;
}

/* Required Field Indicator */
.agd-cust-card-body label.required::after {
    content: " *";
    color: var(--agd-primary, #6366f1);
    font-weight: 600;
}

.agd-cust-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-bottom: 1px solid var(--agd-border-color, #2A2A2A);
}

.agd-cust-card-header svg {
    color: var(--agd-primary, #6366f1);
    width: 18px;
    height: 18px;
}

.agd-cust-card-header span {
    font-size: 13px;
    font-weight: 600;
    color: var(--agd-text-primary, #E0E0E0);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agd-cust-card-body {
    padding: 18px;
}

/* Prospect Marketing Tab - Preferences */
.agd-mkt-pref-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: #FFFFFF;
}

.agd-mkt-pref-item.agd-mkt-pref-active {
    color: #F87171;
}

.agd-mkt-pref-item label {
    cursor: pointer;
}

/* Prospect Marketing Tab - Statistics */
.agd-mkt-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #2A2A2A;
}

.agd-mkt-stat-row:last-child {
    border-bottom: none;
}

.agd-mkt-stat-row .agd-mkt-stat-label {
    font-size: 14px;
    color: #B0B0B0;
}

.agd-mkt-stat-row .agd-mkt-stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
}

/* Prospect Marketing Tab - Campaign List */
.agd-mkt-campaign-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agd-mkt-campaign-list .agd-mkt-campaign-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.agd-mkt-campaign-list .agd-mkt-campaign-name {
    flex: 1;
    font-size: 14px;
    color: #FFFFFF;
}

.agd-mkt-empty-text {
    font-size: 14px;
    color: #888888;
    text-align: center;
    padding: 20px;
}

/* Placeholder Tabs Styling */
.agd-cust-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 24px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    border: 1px dashed rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    margin: 20px;
}

.agd-cust-placeholder .agd-placeholder-icon {
    color: var(--agd-primary, #6366f1);
    opacity: 0.5;
    width: 72px;
    height: 72px;
    stroke-width: 1.5;
}

.agd-cust-placeholder p {
    color: var(--agd-text-secondary, #888888);
    font-size: 16px;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.1);
    padding: 10px 20px;
    border-radius: 20px;
}

/* Enhanced TabStrip for Customer Page */
.agd-cust-tabs.k-tabstrip .k-tabstrip-items-wrapper {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, var(--agd-surface-bg, #0A0A0A) 100%);
    border-bottom: 2px solid var(--agd-primary, #6366f1);
    padding: 8px 8px 0 8px;
}

.agd-cust-tabs.k-tabstrip .k-tabstrip-items {
    gap: 6px;
}

.agd-cust-tabs.k-tabstrip .k-tabstrip-item {
    border: 1px solid transparent;
    background: rgba(99, 102, 241, 0.08);
    padding: 0;
    margin: 0;
    border-radius: 10px 10px 0 0;
    transition: all 0.25s ease;
    overflow: hidden;
}

.agd-cust-tabs.k-tabstrip .k-tabstrip-item:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.agd-cust-tabs.k-tabstrip .k-tabstrip-item.k-active,
.agd-cust-tabs.k-tabstrip .k-tabstrip-item.k-selected {
    background: linear-gradient(135deg, var(--agd-primary, #6366f1) 0%, #8b5cf6 100%);
    border-color: var(--agd-primary, #6366f1);
    box-shadow: 0 -4px 20px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.agd-cust-tabs.k-tabstrip .k-tabstrip-item .k-link {
    color: var(--agd-text-secondary, #888888);
    font-weight: 500;
    padding: 0;
}

.agd-cust-tabs.k-tabstrip .k-tabstrip-item.k-active .k-link,
.agd-cust-tabs.k-tabstrip .k-tabstrip-item.k-selected .k-link {
    color: white;
}

/* Tab Header with Icon */
.agd-tab-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.agd-tab-header svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.agd-cust-tabs.k-tabstrip .k-tabstrip-item:hover .agd-tab-header svg {
    transform: scale(1.1);
}

.agd-cust-tabs.k-tabstrip .k-tabstrip-item.k-active .agd-tab-header svg,
.agd-cust-tabs.k-tabstrip .k-tabstrip-item.k-selected .agd-tab-header svg {
    stroke: white;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Placeholder Icon Styling */
.agd-placeholder-icon {
    width: 64px;
    height: 64px;
    color: var(--agd-primary, #6366f1);
    opacity: 0.6;
}

.agd-cust-tabs.k-tabstrip > .k-content,
.agd-cust-tabs.k-tabstrip .k-tabstrip-content {
    background: var(--agd-surface-bg, #0A0A0A);
    border: none;
    padding: 20px;
    border-top: none;
}

/* Legacy form section (kept for compatibility) */
.agd-cust-form-section {
    max-width: 800px;
    margin-bottom: 24px;
}

.agd-cust-form-section h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agd-cust-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.agd-cust-form-row .agd-form-group {
    flex: 1;
}

.agd-cust-form-row .agd-form-group.small {
    flex: 0 0 150px;
}

.agd-cust-form-row .agd-form-group.medium {
    flex: 0 0 200px;
}

/* Form inputs in customer detail - dark theme */
.agd-cust-detail-content .k-input,
.agd-cust-detail-content .k-picker,
.agd-cust-detail-content .k-textbox,
.agd-cust-detail-content .k-textarea,
.agd-cust-detail-content .k-dropdown,
.agd-cust-detail-content .k-numerictextbox,
.agd-cust-detail-content .k-datepicker {
    background-color: #1A1A1A !important;
    border-color: #3A3A3A !important;
    color: #E0E0E0 !important;
}

.agd-cust-detail-content .k-input:focus,
.agd-cust-detail-content .k-picker:focus,
.agd-cust-detail-content .k-textbox:focus,
.agd-cust-detail-content .k-textarea:focus {
    border-color: var(--agd-brand-color) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
}

.agd-cust-detail-content label {
    color: #E0E0E0 !important;
}

/* Responsive - Medium screens */
@media (max-width: 1200px) {
    .agd-cust-details-grid {
        grid-template-columns: 1fr;
    }

    .agd-cust-card-full {
        grid-column: 1;
    }
}

/* Responsive - Small screens */
@media (max-width: 768px) {
    .agd-cust-toolbar {
        flex-wrap: wrap;
    }

    .agd-cust-search {
        max-width: 100%;
        order: 1;
        width: 100%;
    }

    .agd-cust-filters {
        order: 2;
    }

    .agd-cust-form-row {
        flex-direction: column;
    }

    .agd-cust-form-row .agd-form-group.small,
    .agd-cust-form-row .agd-form-group.medium {
        flex: 1;
    }

    .agd-cust-details-grid {
        padding: 8px;
        gap: 16px;
    }

    .agd-cust-card-body {
        padding: 14px;
    }

    .agd-cust-tabs.k-tabstrip .k-tabstrip-items-wrapper {
        padding: 4px 4px 0 4px;
        overflow-x: auto;
    }

    .agd-cust-tabs.k-tabstrip .k-tabstrip-items {
        gap: 4px;
    }

    .agd-tab-header {
        padding: 10px 12px;
        font-size: 12px;
        gap: 6px;
    }

    .agd-tab-header svg {
        width: 16px;
        height: 16px;
    }

    /* Hide text on very small screens, show only icons */
    @media (max-width: 600px) {
        .agd-tab-header span:not(:first-child) {
            display: none;
        }

        .agd-tab-header {
            padding: 10px 14px;
        }
    }

    .agd-cust-placeholder {
        min-height: 300px;
        margin: 12px;
    }

    .agd-placeholder-icon {
        width: 48px;
        height: 48px;
    }

    .agd-cust-placeholder p {
        font-size: 14px;
        text-align: center;
        padding: 0 20px;
    }
}

/* ==================== TASK MANAGEMENT STYLES ==================== */

.agd-task-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: var(--agd-bg-color, #0A0A0A);
}

.agd-task-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background-color: var(--agd-bg-secondary, #111111);
    border-bottom: 1px solid var(--agd-border-color, #2A2A2A);
}

.agd-task-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--agd-text-color, #FFFFFF);
    flex: 1;
}

.agd-task-count {
    font-size: 14px;
    color: var(--agd-text-muted, #888);
}

.agd-task-header-actions {
    display: flex;
    gap: 8px;
}

.agd-task-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background-color: var(--agd-bg-color, #0D0D0D);
    border-bottom: 1px solid var(--agd-border-color, #2A2A2A);
    flex-wrap: wrap;
}

.agd-task-view-toggle {
    display: flex;
    gap: 4px;
}

.agd-task-search {
    flex: 1;
    max-width: 400px;
    min-width: 200px;
}

.agd-task-filters {
    display: flex;
    gap: 8px;
}

.agd-task-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.agd-task-sidebar {
    width: 260px;
    min-width: 260px;
    background-color: var(--agd-bg-color, #0D0D0D);
    border-right: 1px solid var(--agd-border-color, #2A2A2A);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.agd-task-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--agd-text-muted, #888);
}

.agd-task-sidebar-lists {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 16px;
}

.agd-task-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s;
    color: var(--agd-text-light, #CCC);
    font-size: 14px;
}

.agd-task-list-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.agd-task-list-item.active {
    background-color: var(--agd-primary, #6366F1);
    color: white;
}

.agd-task-list-item.overdue {
    color: #EF4444;
}

.agd-task-list-count {
    margin-left: auto;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
}

.agd-task-list-count.danger {
    background-color: #EF4444;
    color: white;
}

.agd-task-list-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.agd-task-list-separator {
    height: 1px;
    background-color: var(--agd-border-color, #2A2A2A);
    margin: 8px 0;
}

/* Main content area */
.agd-task-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.agd-task-grid {
    flex: 1;
    overflow: hidden;
}

.agd-task-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--agd-text-muted, #888);
}

.agd-task-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* Task row styles */
.agd-task-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--agd-border-color, #444);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.agd-task-checkbox:hover {
    border-color: var(--agd-primary, #6366F1);
}

.agd-task-checkbox.completed {
    background-color: var(--agd-primary, #6366F1);
    border-color: var(--agd-primary, #6366F1);
    color: white;
}

.agd-task-pinned {
    color: var(--agd-primary, #6366F1);
}

.agd-task-title-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agd-task-title-cell.completed .agd-task-title-text {
    text-decoration: line-through;
    color: var(--agd-text-muted, #888);
}

.agd-task-list-indicator {
    width: 4px;
    height: 24px;
    border-radius: 2px;
}

.agd-task-title-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.agd-task-title-text {
    font-weight: 500;
}

.agd-task-subtask-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--agd-text-muted, #888);
    padding: 2px 6px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.agd-task-label {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.agd-task-priority-badge {
    display: inline-block;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.agd-task-priority-badge.priority-high,
.agd-task-priority-badge.priority-1 {
    background-color: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.agd-task-priority-badge.priority-medium,
.agd-task-priority-badge.priority-2 {
    background-color: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.agd-task-priority-badge.priority-low,
.agd-task-priority-badge.priority-3 {
    background-color: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
}

.agd-task-date {
    font-size: 13px;
    color: var(--agd-text-light, #CCC);
}

.agd-task-date.overdue {
    color: #EF4444;
    font-weight: 500;
}

.agd-task-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agd-task-progress-bar {
    flex: 1;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.agd-task-progress-fill {
    height: 100%;
    background-color: var(--agd-primary, #6366F1);
    border-radius: 3px;
    transition: width 0.3s;
}

.agd-task-progress span {
    font-size: 12px;
    color: var(--agd-text-muted, #888);
    min-width: 35px;
}

.agd-task-assignee {
    font-size: 13px;
    color: var(--agd-text-light, #CCC);
}

.agd-task-actions {
    display: flex;
    gap: 4px;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.agd-task-actions:hover {
    opacity: 1;
}

/* Bulk Actions Bar */
.agd-task-bulk-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background-color: var(--agd-primary, #6366F1);
    color: white;
}

/* Kanban View */
.agd-task-kanban {
    display: flex;
    gap: 16px;
    padding: 16px;
    overflow-x: auto;
    height: 100%;
}

.agd-kanban-column {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    background-color: var(--agd-bg-secondary, #111111);
    border-radius: 12px;
    overflow: hidden;
}

.agd-kanban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    font-weight: 600;
    border-bottom: 2px solid;
}

.agd-kanban-header.pending {
    border-color: #6366F1;
}

.agd-kanban-header.busy {
    border-color: #F59E0B;
}

.agd-kanban-header.completed {
    border-color: #10B981;
}

.agd-kanban-count {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
}

.agd-kanban-cards {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agd-kanban-card {
    background-color: var(--agd-bg-color, #1A1A1A);
    border: 1px solid var(--agd-border-color, #2A2A2A);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.agd-kanban-card:hover {
    border-color: var(--agd-primary, #6366F1);
    transform: translateY(-1px);
}

.agd-kanban-card.pinned {
    border-color: var(--agd-primary, #6366F1);
}

.agd-kanban-card.completed .agd-kanban-card-title {
    text-decoration: line-through;
    color: var(--agd-text-muted, #888);
}

.agd-kanban-pin {
    position: absolute;
    top: 8px;
    right: 8px;
    color: var(--agd-primary, #6366F1);
}

.agd-kanban-card-title {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--agd-text-color, #FFF);
}

.agd-kanban-card-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--agd-text-muted, #888);
    margin-top: 8px;
}

.agd-kanban-card-date.overdue {
    color: #EF4444;
}

.agd-kanban-card-subtasks {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--agd-text-muted, #888);
}

.agd-kanban-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.agd-kanban-progress-bar {
    flex: 1;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.agd-kanban-progress-fill {
    height: 100%;
    background-color: var(--agd-primary, #6366F1);
}

.agd-kanban-progress span {
    font-size: 11px;
    color: var(--agd-text-muted, #888);
}

/* Task Detail Page */
.agd-task-detail-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: var(--agd-bg-color, #0A0A0A);
}

.agd-task-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background-color: var(--agd-bg-secondary, #111111);
    border-bottom: 1px solid var(--agd-border-color, #2A2A2A);
}

.agd-task-detail-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agd-task-detail-header-left h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--agd-text-color, #FFF);
}

.agd-task-detail-header-right {
    display: flex;
    gap: 8px;
}

.agd-task-loading {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agd-task-detail-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.agd-task-detail-main {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.agd-task-complete-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.agd-task-checkbox-large {
    width: 28px;
    height: 28px;
    border: 2px solid var(--agd-border-color, #444);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.agd-task-checkbox-large:hover {
    border-color: var(--agd-primary, #6366F1);
}

.agd-task-checkbox-large.completed {
    background-color: var(--agd-primary, #6366F1);
    border-color: var(--agd-primary, #6366F1);
    color: white;
}

.agd-task-complete-section span.completed {
    text-decoration: line-through;
    color: var(--agd-text-muted, #888);
}

.agd-task-title-input {
    font-size: 24px !important;
    font-weight: 600 !important;
}

.agd-task-desc-input {
    font-size: 14px;
    line-height: 1.6;
}

/* Task Sections */
.agd-task-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--agd-border-color, #2A2A2A);
}

.agd-task-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.agd-task-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--agd-text-color, #FFF);
}

.agd-task-subtask-progress {
    font-size: 13px;
    color: var(--agd-text-muted, #888);
}

/* Subtasks */
.agd-subtask-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agd-subtask-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background-color: var(--agd-bg-secondary, #111);
    border-radius: 8px;
}

.agd-subtask-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--agd-border-color, #444);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.agd-subtask-checkbox:hover {
    border-color: var(--agd-primary, #6366F1);
}

.agd-subtask-checkbox.completed {
    background-color: var(--agd-primary, #6366F1);
    border-color: var(--agd-primary, #6366F1);
    color: white;
}

.agd-subtask-item input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--agd-text-color, #FFF);
    font-size: 14px;
    outline: none;
}

.agd-subtask-item input.completed {
    text-decoration: line-through;
    color: var(--agd-text-muted, #888);
}

.agd-subtask-add {
    margin-top: 8px;
}

/* Comments */
.agd-comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agd-comment-item {
    display: flex;
    gap: 12px;
}

.agd-comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--agd-primary, #6366F1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.agd-comment-content {
    flex: 1;
}

.agd-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.agd-comment-author {
    font-weight: 600;
    color: var(--agd-text-color, #FFF);
}

.agd-comment-date {
    font-size: 12px;
    color: var(--agd-text-muted, #888);
}

.agd-comment-text {
    color: var(--agd-text-light, #CCC);
    line-height: 1.5;
}

.agd-comment-add {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

/* Attachments */
.agd-attachment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agd-attachment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: var(--agd-bg-secondary, #111);
    border-radius: 8px;
}

.agd-attachment-name {
    flex: 1;
    font-size: 14px;
    color: var(--agd-text-color, #FFF);
}

.agd-attachment-size {
    font-size: 12px;
    color: var(--agd-text-muted, #888);
}

.agd-attachment-add {
    margin-top: 8px;
}

.agd-attachment-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    border: 2px dashed var(--agd-border-color, #2A2A2A);
    border-radius: 8px;
    color: var(--agd-text-muted, #888);
    cursor: pointer;
    transition: all 0.15s;
}

.agd-attachment-drop:hover {
    border-color: var(--agd-primary, #6366F1);
    color: var(--agd-primary, #6366F1);
}

/* Time Logs */
.agd-task-time-total {
    font-size: 13px;
    color: var(--agd-text-muted, #888);
}

.agd-timelog-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agd-timelog-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background-color: var(--agd-bg-secondary, #111);
    border-radius: 8px;
    font-size: 13px;
}

.agd-timelog-user {
    font-weight: 500;
    color: var(--agd-text-color, #FFF);
}

.agd-timelog-date {
    color: var(--agd-text-muted, #888);
}

.agd-timelog-duration {
    font-weight: 600;
    color: var(--agd-primary, #6366F1);
}

.agd-timelog-desc {
    flex: 1;
    color: var(--agd-text-light, #CCC);
}

.agd-timelog-billable {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background-color: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

/* Task Detail Sidebar */
.agd-task-detail-sidebar {
    width: 320px;
    min-width: 320px;
    background-color: var(--agd-bg-secondary, #111111);
    border-left: 1px solid var(--agd-border-color, #2A2A2A);
    padding: 24px;
    overflow-y: auto;
}

.agd-task-sidebar-section {
    margin-bottom: 20px;
}

.agd-task-sidebar-section > label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--agd-text-muted, #888);
    margin-bottom: 8px;
}

.agd-task-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.agd-task-label-chip {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.15s;
}

.agd-task-label-chip.selected {
    border-color: transparent !important;
}

.agd-task-recur-options {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
    .agd-task-sidebar {
        display: none;
    }

    .agd-task-detail-sidebar {
        width: 280px;
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .agd-task-detail-content {
        flex-direction: column;
    }

    .agd-task-detail-sidebar {
        width: 100%;
        min-width: 100%;
        border-left: none;
        border-top: 1px solid var(--agd-border-color, #2A2A2A);
    }

    .agd-task-toolbar {
        flex-wrap: wrap;
    }

    .agd-task-filters {
        width: 100%;
        flex-wrap: wrap;
    }
}

/* Task Page - Dark Theme Overrides */
[data-theme="dark"] .agd-task-detail-page {
    background-color: var(--agd-bg-base);
}

[data-theme="dark"] .agd-task-detail-header {
    background-color: #151528;
    border-bottom-color: rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] .agd-task-detail-sidebar {
    background-color: #12121f;
    border-left-color: rgba(139, 92, 246, 0.15);
}

[data-theme="dark"] .agd-subtask-item,
[data-theme="dark"] .agd-attachment-item,
[data-theme="dark"] .agd-timelog-item {
    background-color: #0d0d18;
}

[data-theme="dark"] .agd-attachment-drop {
    border-color: rgba(139, 92, 246, 0.2);
    background-color: rgba(15, 15, 26, 0.5);
}

[data-theme="dark"] .agd-attachment-drop:hover {
    border-color: var(--agd-primary);
    background-color: rgba(99, 102, 241, 0.08);
}

[data-theme="dark"] .agd-task-section {
    border-top-color: rgba(139, 92, 246, 0.15);
}

[data-theme="dark"] .agd-comment-add,
[data-theme="dark"] .agd-subtask-add {
    background-color: transparent;
}

[data-theme="dark"] .agd-task-sidebar-section > label {
    color: var(--agd-text-secondary);
}

/* ========================================
   TASK LIST TOOLTIP
   ======================================== */
.agd-task-tooltip.k-tooltip {
    max-width: 400px;
    padding: 0;
}

.agd-task-tooltip .k-tooltip-content {
    padding: 0;
}

.agd-task-tooltip-content {
    padding: 12px 16px;
    max-width: 380px;
}

.agd-task-tooltip-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--agd-text-color);
    margin-bottom: 8px;
    line-height: 1.4;
}

.agd-task-tooltip-desc {
    font-size: 13px;
    color: var(--agd-text-light);
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
}

[data-theme="dark"] .agd-task-tooltip.k-tooltip {
    background-color: #2D2D2D;
    border-color: #404040;
}

[data-theme="dark"] .agd-task-tooltip-title {
    color: #E0E0E0;
}

[data-theme="dark"] .agd-task-tooltip-desc {
    color: #B0B0B0;
}

/* ========================================
   CUSTOM POPUP (pure HTML/CSS - no Telerik interference)
   ======================================== */
.agd-custom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100000;
}

.agd-custom-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    background-color: #1E1E1E;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 100001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.agd-custom-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #252525;
    border-bottom: 1px solid #404040;
}

.agd-custom-popup-title {
    font-weight: 600;
    font-size: 16px;
    color: #E0E0E0;
}

.agd-custom-popup-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #B0B0B0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.agd-custom-popup-close:hover {
    background-color: #404040;
    color: #E0E0E0;
}

.agd-custom-popup-content {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.agd-custom-popup-footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px;
    background-color: #252525;
    border-top: 1px solid #404040;
}

/* ========================================
   CUSTOMER SEARCH POPUP
   ======================================== */

.agd-customer-search-content {
    display: flex;
    flex-direction: column;
}

.agd-search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    color: #B0B0B0;
}

.agd-search-no-results {
    text-align: center;
    padding: 24px;
    color: #808080;
    font-style: italic;
}

.agd-customer-search-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #404040;
    border-radius: 6px;
    background-color: #252525;
}

.agd-customer-list {
    background: transparent !important;
}

.agd-customer-list .k-listview-content {
    background: transparent !important;
}

.agd-customer-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #404040;
    cursor: pointer;
    transition: background-color 0.15s ease;
    background-color: #252525;
}

.agd-customer-list-item:last-child {
    border-bottom: none;
}

.agd-customer-list-item:hover {
    background-color: #333333;
}

.agd-customer-list-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.agd-customer-list-name {
    font-weight: 600;
    color: #E0E0E0;
}

.agd-customer-list-email,
.agd-customer-list-phone {
    font-size: 12px;
    color: #B0B0B0;
}

/* Custom popup styles (used for customer search) */
.agd-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99998;
}

.agd-popup-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #1E1E1E;
    border: 1px solid #3A3A3A;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 99999;
    min-width: 400px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.agd-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #3A3A3A;
    background-color: #252525;
    border-radius: 8px 8px 0 0;
}

.agd-popup-title {
    font-size: 16px;
    font-weight: 600;
    color: #E0E0E0;
}

.agd-popup-close {
    background: none;
    border: none;
    color: #808080;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.agd-popup-close:hover {
    background-color: #3A3A3A;
    color: #E0E0E0;
}

.agd-popup-content {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.agd-popup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #3A3A3A;
    background-color: #1E1E1E;
}

.agd-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.agd-btn-primary {
    background-color: var(--agd-brand-color);
    border: 1px solid var(--agd-brand-color);
    color: #FFFFFF;
}

.agd-btn-primary:hover {
    background-color: var(--agd-brand-hover);
    border-color: var(--agd-brand-hover);
}

.agd-btn-secondary {
    background-color: transparent;
    border: 1px solid #444444;
    color: #E0E0E0;
}

.agd-btn-secondary:hover {
    background-color: #2A2A2A;
    border-color: #555555;
}

/* Customer search specific */
.agd-customer-search-popup {
    width: 500px;
}

.agd-search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.agd-search-input {
    flex: 1;
    padding: 8px 12px;
    background-color: #2A2A2A;
    border: 1px solid #3A3A3A;
    border-radius: 4px;
    color: #E0E0E0;
    font-size: 14px;
}

.agd-search-input:focus {
    outline: none;
    border-color: #6366F1;
}

.agd-search-input::placeholder {
    color: #808080;
}

.agd-search-button {
    padding: 8px 16px;
    background-color: #6366F1;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    cursor: pointer;
}

.agd-search-button:hover {
    background-color: #5558E3;
}

.agd-search-button:disabled {
    background-color: #4A4A4A;
    cursor: not-allowed;
}

.agd-select-button {
    background: none;
    border: none;
    color: #6366F1;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
}

.agd-select-button:hover {
    color: #8B8EF5;
}

/* ==================== USER MANAGEMENT ==================== */

.agd-user-setup {
    width: 100%;
}

/* ==================== PERMISSION EDITOR ==================== */

.agd-permission-editor {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.agd-perm-presets {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px;
    background: var(--agd-surface, #1E1E1E);
    border-radius: 4px;
    margin-bottom: 8px;
}

.agd-perm-preset-label {
    color: var(--agd-text-secondary, #A0A0A0);
    font-size: 13px;
    margin-right: 8px;
}

.agd-perm-modules {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.agd-perm-module {
    background: var(--agd-surface, #1E1E1E);
    border-radius: 4px;
    margin-bottom: 4px;
}

.agd-perm-module-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.agd-perm-module-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--agd-text-primary, #E0E0E0);
    cursor: pointer;
}

.agd-perm-entities {
    padding: 12px 0 12px 24px;
}

.agd-perm-table {
    width: 100%;
    border-collapse: collapse;
}

.agd-perm-table thead th {
    text-align: center;
    padding: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--agd-text-secondary, #A0A0A0);
    border-bottom: 1px solid var(--agd-border, #333);
}

.agd-perm-table thead th.agd-perm-entity-col {
    text-align: left;
    width: 45%;
}

.agd-perm-table thead th.agd-perm-action-col {
    width: 13%;
}

.agd-perm-table tbody tr {
    border-bottom: 1px solid var(--agd-border-light, #2A2A2A);
}

.agd-perm-table tbody tr:last-child {
    border-bottom: none;
}

.agd-perm-entity-name {
    padding: 10px 8px;
    font-size: 13px;
    color: var(--agd-text-primary, #E0E0E0);
}

.agd-perm-action-cell {
    text-align: center;
    padding: 8px;
}

/* Entity Access Section */

.agd-perm-entity-access {
    margin-top: 16px;
    padding: 16px;
    background: var(--agd-surface, #1E1E1E);
    border-radius: 4px;
}

.agd-perm-entity-access h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--agd-text-primary, #E0E0E0);
}

.agd-perm-access-group {
    margin-top: 16px;
    padding: 12px;
    background: var(--agd-surface-dark, #161616);
    border-radius: 4px;
}

.agd-perm-access-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.agd-perm-access-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--agd-text-primary, #E0E0E0);
    cursor: pointer;
}

.agd-perm-access-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-left: 24px;
}

.agd-perm-access-item {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
}

.agd-perm-access-item label {
    font-size: 13px;
    color: var(--agd-text-secondary, #A0A0A0);
    cursor: pointer;
}

/* Info Box */

.agd-info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--agd-info-bg, #1E3A5F);
    border-radius: 4px;
    color: var(--agd-info-text, #7EB8E8);
    font-size: 14px;
}

/* Hint Text */

.agd-hint-text {
    font-size: 12px;
    color: var(--agd-text-tertiary, #888);
    margin-top: 4px;
    margin-bottom: 8px;
}

/* Checkbox Label */

.agd-checkbox-label {
    margin-left: 6px;
    cursor: pointer;
}

/* ========================================
   MARKETING MODULE
   ======================================== */

/* Marketing Page Layout */
.agd-mkt-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: #0A0A0A;
}

.agd-mkt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background-color: #111111;
    border-bottom: 1px solid #2A2A2A;
}

.agd-mkt-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #FFFFFF;
}

.agd-mkt-stats {
    display: flex;
    align-items: center;
    gap: 24px;
}

.agd-mkt-stat-item {
    font-size: 14px;
    color: #B0B0B0;
}

.agd-mkt-stat-item strong {
    color: #FFFFFF;
    font-weight: 600;
    margin-right: 4px;
}

/* Marketing TabStrip */
.agd-mkt-tabstrip {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.agd-mkt-tabstrip .k-tabstrip-items-wrapper {
    background-color: #111111 !important;
    border-bottom: 1px solid #2A2A2A !important;
    padding: 0 24px !important;
}

.agd-mkt-tabstrip .k-tabstrip-items {
    background-color: transparent !important;
}

.agd-mkt-tabstrip .k-tabstrip-item {
    background-color: transparent !important;
    border: none !important;
    color: #888888 !important;
    transition: all 0.2s ease;
}

.agd-mkt-tabstrip .k-tabstrip-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #CCCCCC !important;
}

.agd-mkt-tabstrip .k-tabstrip-item.k-active,
.agd-mkt-tabstrip .k-tabstrip-item.k-selected {
    background-color: rgba(99, 102, 241, 0.08) !important;
    color: #FFFFFF !important;
    border-bottom: 3px solid var(--agd-brand-color, #6366f1) !important;
}

.agd-mkt-tabstrip .k-tabstrip-item .k-link {
    padding: 12px 20px !important;
    color: inherit !important;
    background: transparent !important;
}

/* Marketing tab label with icon */
.agd-mkt-tab-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agd-mkt-tab-label span {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.agd-mkt-tabstrip .k-tabstrip-item.k-active .agd-mkt-tab-label .k-svg-icon,
.agd-mkt-tabstrip .k-tabstrip-item.k-selected .agd-mkt-tab-label .k-svg-icon {
    color: var(--agd-brand-color, #6366f1) !important;
}

.agd-mkt-tabstrip .k-tabstrip-content,
.agd-mkt-tabstrip > .k-content {
    flex: 1;
    background-color: #0A0A0A !important;
    border: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 !important;
}

/* Campaign Layout */
.agd-mkt-campaign-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    height: 100%;
    overflow: hidden;
    transition: grid-template-columns 0.3s ease;
}

.agd-mkt-campaign-layout.settings-collapsed {
    grid-template-columns: 40px 1fr;
}

.agd-mkt-campaign-settings {
    overflow: hidden;
    display: flex;
    flex-direction: row;
    min-width: 0;
    transition: min-width 0.3s ease;
}

.agd-mkt-campaign-settings .agd-mkt-settings-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 8px;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
    border-right: 1px solid #333;
    background: #1E1E1E;
    border-radius: 8px 0 0 8px;
}

.agd-mkt-campaign-settings .agd-mkt-settings-toggle:hover {
    background: #2A2A2A;
}

.agd-mkt-campaign-settings .agd-mkt-settings-content {
    flex: 1;
    overflow-y: auto;
    min-width: 0;
}

.agd-mkt-campaign-settings.collapsed .agd-mkt-settings-content {
    display: none;
}

/* Note cell in campaign task grid */
.agd-mkt-note-cell {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    color: #AAAAAA;
    white-space: normal;
    line-height: 1.4;
}

.agd-mkt-campaign-tasks {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.agd-mkt-campaign-tasks .agd-cust-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.agd-mkt-campaign-tasks .agd-cust-card-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
    min-height: 0;
}

.agd-mkt-campaign-tasks .k-grid {
    height: 100% !important;
}

.agd-mkt-campaign-header-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    margin-right: 16px;
}

.agd-mkt-stat {
    font-size: 14px;
    color: #B0B0B0;
}

/* Marketing Grid Layout */
.agd-mkt-prospect-grid,
.agd-mkt-campaign-grid,
.agd-mkt-agent-grid {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.agd-mkt-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background-color: #0D0D0D;
    border-bottom: 1px solid #2A2A2A;
}

.agd-mkt-search {
    flex: 1;
    max-width: 400px;
}

.agd-mkt-filters {
    display: flex;
    gap: 8px;
}

.agd-mkt-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.agd-mkt-grid-container {
    flex: 1;
    overflow: hidden;
    padding: 16px;
    position: relative;
}

.agd-mkt-grid-container .k-grid {
    height: 100%;
    background-color: #141414 !important;
    border: 1px solid #2A2A2A !important;
    border-radius: 10px !important;
}

.agd-mkt-actions-cell {
    display: flex;
    gap: 4px;
}

.agd-mkt-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
}

/* Task Filters */
.agd-mkt-task-filters {
    margin-left: auto;
}

/* Status Badges */
.agd-mkt-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.agd-mkt-status-badge.status-ready,
.agd-mkt-status-badge.status-r {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
}

.agd-mkt-status-badge.status-executing,
.agd-mkt-status-badge.status-e {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

.agd-mkt-status-badge.status-paused,
.agd-mkt-status-badge.status-p {
    background-color: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
}

.agd-mkt-status-badge.status-finished,
.agd-mkt-status-badge.status-f {
    background-color: rgba(107, 114, 128, 0.2);
    color: #9CA3AF;
}

.agd-mkt-status-badge.status-cancelled,
.agd-mkt-status-badge.status-c {
    background-color: rgba(239, 68, 68, 0.2);
    color: #F87171;
}

/* Task Status Badges */
.agd-mkt-status-badge.status-pending {
    background-color: rgba(107, 114, 128, 0.2);
    color: #9CA3AF;
}

.agd-mkt-status-badge.status-interested {
    background-color: rgba(14, 165, 233, 0.2);
    color: #38BDF8;
}

.agd-mkt-status-badge.status-success {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

.agd-mkt-status-badge.status-processing {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
}

.agd-mkt-status-badge.status-retry {
    background-color: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
}

.agd-mkt-status-badge.status-failed {
    background-color: rgba(239, 68, 68, 0.2);
    color: #F87171;
}

.agd-mkt-status-badge.status-not-interested {
    background-color: rgba(156, 163, 175, 0.2);
    color: #9CA3AF;
}

.agd-mkt-status-badge.status-opted-out {
    background-color: rgba(168, 85, 247, 0.2);
    color: #C084FC;
}

/* Prospect Status Badges */
.agd-mkt-status-badge.status-active {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

.agd-mkt-status-badge.status-hold {
    background-color: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
}

.agd-mkt-status-badge.status-no-contact {
    background-color: rgba(107, 114, 128, 0.2);
    color: #9CA3AF;
}

/* Selected Count */
.agd-mkt-selected-count {
    font-size: 13px;
    color: var(--agd-brand-color, #6366f1);
    font-weight: 500;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
}

/* Context Menu */
.agd-mkt-ctx-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.agd-mkt-ctx-item svg {
    width: 16px;
    height: 16px;
}

/* AI Classify Dialog */
.agd-ai-classify-label {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    color: var(--agd-text-primary, #FFFFFF);
}

.agd-ai-classify-hint {
    font-size: 13px;
    color: var(--agd-text-muted, #888888);
    margin-top: 8px;
}

/* Interest Badges */
.agd-mkt-interest {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.agd-mkt-interest.interest-hot {
    background-color: rgba(239, 68, 68, 0.2);
    color: #F87171;
}

.agd-mkt-interest.interest-warm {
    background-color: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
}

.agd-mkt-interest.interest-cold {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
}

.agd-mkt-interest.interest-none {
    background-color: rgba(107, 114, 128, 0.2);
    color: #9CA3AF;
}

/* Task Grid Cells */
.agd-mkt-name-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.agd-mkt-name-primary {
    font-weight: 500;
    color: #FFFFFF;
}

.agd-mkt-name-secondary {
    font-size: 12px;
    color: #888888;
}

.agd-mkt-phone-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Empty State */
.agd-mkt-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666666;
    text-align: center;
}

.agd-mkt-empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
    margin-bottom: 16px;
}

.agd-mkt-empty p {
    margin: 0;
    font-size: 14px;
}

.agd-mkt-empty-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    color: #666666;
    text-align: center;
}

.agd-mkt-empty-small p {
    margin: 0;
    font-size: 13px;
}

/* Agent Grid */
.agd-mkt-agent-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agd-mkt-agent-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agd-mkt-agent-initials {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #FFFFFF;
}

.agd-mkt-linked-user {
    color: var(--agd-brand-color, #6366f1);
    font-weight: 500;
}

.agd-mkt-no-link {
    color: #666666;
    font-style: italic;
    font-size: 12px;
}

.agd-mkt-campaign-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.agd-mkt-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--agd-brand-color, #6366f1);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
}

/* Campaigns Dialog */
.agd-mkt-campaigns-dialog {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agd-mkt-dialog-subtitle {
    margin: 0;
    font-size: 14px;
    color: #B0B0B0;
}

.agd-mkt-campaign-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.agd-mkt-campaign-title {
    font-weight: 500;
}

/* Form Styles */
.agd-mkt-label {
    display: block;
    font-size: 13px;
    color: #B0B0B0;
    margin-bottom: 6px;
}

.agd-mkt-field {
    display: flex;
    flex-direction: column;
}

.agd-mkt-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Data Grabber */
.agd-mkt-datagrab {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    overflow: hidden;
}

.agd-mkt-datagrab-form {
    background: #1E1E1E;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #333;
}

.agd-mkt-datagrab-form h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #FFFFFF;
}

.agd-mkt-datagrab-desc {
    margin: 0 0 20px 0;
    font-size: 13px;
    color: #888;
}

.agd-mkt-datagrab-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agd-mkt-datagrab-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.agd-mkt-datagrab-jobs {
    flex: 0 0 auto;
    max-height: 250px;
    overflow-y: auto;
}

.agd-mkt-datagrab-jobs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    cursor: pointer;
    padding: 8px 12px;
    background: #1E1E1E;
    border-radius: 6px;
}

.agd-mkt-datagrab-jobs-header:hover {
    background: #252525;
}

.agd-mkt-datagrab-jobs-header h4 {
    margin: 0;
    font-size: 14px;
    color: #B0B0B0;
}

.agd-mkt-collapse-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agd-mkt-collapse-toggle .k-svg-icon {
    color: #888;
}

.agd-mkt-datagrab-job-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agd-mkt-datagrab-job {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #1E1E1E;
    border: 1px solid #333;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.agd-mkt-datagrab-job:hover {
    background: #252525;
    border-color: #444;
}

.agd-mkt-datagrab-job.selected {
    background: #252525;
    border-color: var(--agd-brand-color, #6366f1);
}

.agd-mkt-datagrab-job-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.agd-mkt-datagrab-job-query {
    font-weight: 600;
    color: #FFFFFF;
}

.agd-mkt-datagrab-job-details {
    font-size: 12px;
    color: #888;
}

.agd-mkt-datagrab-job-date {
    font-size: 11px;
    color: #666;
}

.agd-mkt-datagrab-job-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agd-mkt-datagrab-job-count {
    font-size: 12px;
    color: #888;
}

.agd-mkt-datagrab-delete-btn {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.agd-mkt-datagrab-job:hover .agd-mkt-datagrab-delete-btn {
    opacity: 1;
}

.agd-mkt-datagrab-results {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    overflow: hidden;
}

.agd-mkt-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 100;
}

.agd-mkt-loading-overlay p {
    color: #FFFFFF;
    font-size: 14px;
}

/* Data Grabber Tab Strip */
.agd-mkt-tab-strip {
    display: flex;
    gap: 4px;
    margin-right: auto;
}

.agd-mkt-tab {
    padding: 6px 16px;
    background: transparent;
    border: 1px solid #444;
    border-radius: 4px;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.agd-mkt-tab:hover {
    background: #252525;
    color: #B0B0B0;
}

.agd-mkt-tab.active {
    background: var(--agd-brand-color, #6366f1);
    border-color: var(--agd-brand-color, #6366f1);
    color: #FFFFFF;
}

/* Data Grabber AI Filter */
.agd-mkt-ai-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agd-mkt-ai-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 4px;
    color: #A78BFA;
    font-size: 12px;
}

/* Data Grabber Exclude Filter */
.agd-mkt-exclude-filter {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Task Detail Layout */
.agd-mkt-task-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    height: 100%;
    overflow: hidden;
}

.agd-mkt-task-prospect {
    overflow-y: auto;
}

.agd-mkt-task-details {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.agd-mkt-task-header-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* Prospect Summary */
.agd-mkt-prospect-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agd-mkt-prospect-name {
    font-size: 18px;
    font-weight: 600;
    color: #FFFFFF;
}

.agd-mkt-prospect-owner {
    font-size: 14px;
    color: #B0B0B0;
}

.agd-mkt-prospect-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888888;
}

.agd-mkt-prospect-detail svg {
    color: var(--agd-primary, #6366f1);
    width: 14px;
    height: 14px;
}

.agd-mkt-prospect-detail a {
    color: var(--agd-primary, #6366f1);
    text-decoration: none;
}

.agd-mkt-prospect-detail a:hover {
    text-decoration: underline;
}

.agd-mkt-prospect-notes {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #2A2A2A;
}

.agd-mkt-prospect-notes label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.agd-mkt-note-content {
    font-size: 13px;
    color: #B0B0B0;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Call History */
.agd-mkt-call-history {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 16px;
}

.agd-mkt-call-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid #2A2A2A;
}

.agd-mkt-call-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.agd-mkt-call-icon.outcome-c {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

.agd-mkt-call-icon.outcome-na,
.agd-mkt-call-icon.outcome-bz,
.agd-mkt-call-icon.outcome-vm {
    background-color: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
}

.agd-mkt-call-icon.outcome-wn {
    background-color: rgba(239, 68, 68, 0.2);
    color: #F87171;
}

.agd-mkt-call-info {
    flex: 1;
}

.agd-mkt-call-outcome {
    font-weight: 500;
    color: #FFFFFF;
    font-size: 14px;
}

.agd-mkt-call-time {
    font-size: 12px;
    color: #888888;
    margin-top: 2px;
}

.agd-mkt-call-duration {
    font-size: 12px;
    color: #B0B0B0;
    margin-top: 2px;
}

.agd-mkt-call-note {
    width: 100%;
    font-size: 13px;
    color: #888888;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #2A2A2A;
}

/* Call Dialog */
.agd-mkt-call-dialog {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 8px;
}

.agd-mkt-call-phone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid #2A2A2A;
}

.agd-mkt-call-phone svg {
    color: var(--agd-brand-color, #6366f1);
}

.agd-mkt-call-number {
    font-size: 24px;
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: 1px;
}

.agd-mkt-call-timer {
    font-size: 32px;
    font-weight: 700;
    color: #34D399;
    font-family: 'Courier New', monospace;
}

.agd-mkt-call-label {
    font-size: 14px;
    color: #B0B0B0;
}

.agd-mkt-call-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
}

.agd-mkt-call-status-text {
    text-align: center;
    font-size: 14px;
    color: #B0B0B0;
    padding: 8px;
}

.agd-mkt-call-status.in-progress {
    color: #34D399;
}

.agd-mkt-call-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.agd-mkt-call-outcome-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #2A2A2A;
}

.agd-mkt-callback-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agd-mkt-callback-row .k-checkbox {
    flex-shrink: 0;
}

/* Call Dialog - Start/Hangup Buttons */
.agd-mkt-call-start,
.agd-mkt-call-hangup {
    width: 100%;
    padding: 16px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

.agd-mkt-call-hint {
    text-align: center;
    font-size: 13px;
    color: #888888;
    margin: 0;
}

/* Call Outcome Form */
.agd-mkt-call-outcome h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
}

.agd-mkt-call-outcome-options {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 16px;
}

.agd-mkt-call-interest {
    margin-bottom: 16px;
}

.agd-mkt-call-interest label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #B0B0B0;
    margin-bottom: 8px;
}

.agd-mkt-call-note {
    margin-bottom: 16px;
}

.agd-mkt-call-callback {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 16px;
}

.agd-mkt-call-callback label {
    font-size: 13px;
    color: #B0B0B0;
    cursor: pointer;
}

.agd-mkt-call-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Import Dialog */
.agd-mkt-import-dialog {
    padding: 16px;
    min-width: 500px;
}

.agd-mkt-import-upload {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agd-mkt-import-upload h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
}

.agd-mkt-import-upload p {
    margin: 0;
    font-size: 13px;
    color: #888888;
}

.agd-mkt-import-file-input {
    position: relative;
}

.agd-mkt-import-file-input input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.agd-mkt-import-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed #3A3A3A;
    border-radius: 12px;
    color: #B0B0B0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.agd-mkt-import-file-label:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--agd-brand-color, #6366f1);
    color: #FFFFFF;
}

.agd-mkt-import-file-label svg {
    width: 32px;
    height: 32px;
    color: var(--agd-brand-color, #6366f1);
}

.agd-mkt-import-template {
    display: flex;
    justify-content: center;
}

.agd-mkt-import-preview {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #2A2A2A;
}

.agd-mkt-import-preview h4,
.agd-mkt-import-preview h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
}

.agd-mkt-import-mapping {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.agd-mkt-import-mapping-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.agd-mkt-import-csv-col {
    flex: 1;
    font-size: 13px;
    color: #B0B0B0;
    font-family: monospace;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.agd-mkt-import-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

.agd-mkt-import-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 20px;
    min-height: 200px;
}

.agd-mkt-import-progress p {
    margin: 0;
    font-size: 14px;
    color: #B0B0B0;
}

.agd-mkt-import-progress .k-progressbar {
    width: 100%;
    max-width: 300px;
}

.agd-mkt-import-complete {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 20px;
    min-height: 200px;
}

.agd-mkt-import-complete h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #FFFFFF;
}

.agd-mkt-import-complete p {
    margin: 0;
    font-size: 14px;
    color: #B0B0B0;
}

.agd-mkt-import-skipped {
    color: #FBBF24 !important;
}

/* Marketing Dashboard */
.agd-mkt-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    overflow-y: auto;
    min-height: 0;
}

/* Dashboard date range toolbar */
.agd-mkt-dash-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.agd-mkt-date-presets {
    display: flex;
    gap: 4px;
}

.agd-mkt-date-range-picker {
    max-width: 320px;
}

/* Dark background for Telerik Charts in Marketing Dashboard */
.agd-mkt-chart-dark,
.agd-mkt-chart-dark.k-chart {
    background-color: #141414 !important;
}

.agd-mkt-chart-dark .k-chart-surface {
    background-color: #141414 !important;
}

/* Target the SVG background path */
.agd-mkt-chart-dark svg > g > path[fill="rgb(255, 255, 255)"],
.agd-mkt-chart-dark svg > g > path[fill="#ffffff"],
.agd-mkt-chart-dark svg > g > path[fill="#fff"] {
    fill: #141414 !important;
}

/* Chart tooltip */
.agd-mkt-chart-dark .k-chart-tooltip,
.k-chart-tooltip {
    background-color: #1A1A1A !important;
    border-color: #3A3A3A !important;
    color: #FFFFFF !important;
}

.agd-mkt-dashboard-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

/* Stats Cards */
.agd-mkt-stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 1200px) {
    .agd-mkt-stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .agd-mkt-stats-cards {
        grid-template-columns: 1fr;
    }
}

.agd-mkt-stat-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid #2A2A2A;
    transition: all 0.2s ease;
}

.agd-mkt-stat-card:hover {
    border-color: #3A3A3A;
    background: rgba(255, 255, 255, 0.05);
}

.agd-mkt-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
}

.agd-mkt-stat-icon.prospects {
    background: rgba(99, 102, 241, 0.2);
    color: #818CF8;
}

.agd-mkt-stat-icon.campaigns {
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

.agd-mkt-stat-icon.calls {
    background: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
}

.agd-mkt-stat-icon.conversion {
    background: rgba(236, 72, 153, 0.2);
    color: #F472B6;
}

.agd-mkt-stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.agd-mkt-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1;
}

.agd-mkt-stat-label {
    font-size: 12px;
    color: #888888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agd-mkt-stat-detail {
    font-size: 11px;
    color: #B0B0B0;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}

.agd-mkt-stat-detail .positive {
    color: #34D399;
}

.agd-mkt-stat-detail .negative {
    color: #F87171;
}

/* Dashboard Panels */
.agd-mkt-dashboard-row {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
}

@media (max-width: 1200px) {
    .agd-mkt-dashboard-row {
        grid-template-columns: 1fr;
    }
}

.agd-mkt-dashboard-panel {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid #2A2A2A;
    overflow: hidden;
}

.agd-mkt-panel-small {
    max-width: 350px;
}

@media (max-width: 1200px) {
    .agd-mkt-panel-small {
        max-width: 100%;
    }
}

.agd-mkt-panel-full {
    grid-column: 1 / -1;
}

.agd-mkt-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #2A2A2A;
}

.agd-mkt-panel-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
}

.agd-mkt-panel-content {
    padding: 20px;
}

.agd-mkt-empty-chart {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #888888;
    font-size: 14px;
}

/* Leaderboard */
.agd-mkt-leaderboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agd-mkt-leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.agd-mkt-leaderboard-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2A2A2A;
    color: #B0B0B0;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.agd-mkt-leaderboard-rank.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000000;
}

.agd-mkt-leaderboard-rank.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: #000000;
}

.agd-mkt-leaderboard-rank.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: #FFFFFF;
}

.agd-mkt-leaderboard-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.agd-mkt-leaderboard-name {
    font-size: 14px;
    font-weight: 500;
    color: #FFFFFF;
}

.agd-mkt-leaderboard-calls {
    font-size: 12px;
    color: #888888;
}

.agd-mkt-leaderboard-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.agd-mkt-leaderboard-conversions {
    font-size: 18px;
    font-weight: 600;
    color: #34D399;
}

.agd-mkt-leaderboard-label {
    font-size: 11px;
    color: #888888;
}

/* Campaign Progress */
.agd-mkt-campaign-progress {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agd-mkt-campaign-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.agd-mkt-campaign-info {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.agd-mkt-campaign-name {
    font-size: 14px;
    font-weight: 500;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agd-mkt-campaign-tasks {
    font-size: 12px;
    color: #888888;
}

.agd-mkt-campaign-bar {
    flex: 2;
    min-width: 100px;
}

.agd-mkt-campaign-bar .k-progressbar .k-selected {
    background-color: var(--agd-brand-color, #6366f1) !important;
}

.agd-mkt-campaign-bar .k-progressbar {
    background-color: #2A2A2A !important;
}

.agd-mkt-campaign-percent {
    width: 50px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
}

/* Activity List */
.agd-mkt-activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.agd-mkt-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.agd-mkt-activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
}

.agd-mkt-activity-icon.activity-call {
    background: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
}

.agd-mkt-activity-icon.activity-prospect {
    background: rgba(99, 102, 241, 0.2);
    color: #818CF8;
}

.agd-mkt-activity-icon.activity-campaign {
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

.agd-mkt-activity-icon.activity-import {
    background: rgba(96, 165, 250, 0.2);
    color: #60A5FA;
}

.agd-mkt-activity-icon.activity-conversion {
    background: rgba(236, 72, 153, 0.2);
    color: #F472B6;
}

.agd-mkt-activity-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.agd-mkt-activity-text {
    font-size: 13px;
    color: #FFFFFF;
}

.agd-mkt-activity-time {
    font-size: 12px;
    color: #888888;
}

.agd-mkt-activity-agent {
    font-size: 12px;
    color: var(--agd-brand-color, #6366f1);
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

