:root {
    --ah-primary-color: #4f46e5;
    --ah-primary-hover: #4338ca;
    --ah-surface: #ffffff;
    --ah-surface-muted: #f9fafb;
    --ah-border: #e5e7eb;
    --ah-text: #111827;
    --ah-text-muted: #6b7280;
    --ah-radius: 14px;
    --ah-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --ah-shadow-md: 0 16px 40px rgba(15, 23, 42, 0.12);
}

body.ah-plugin-page {
    background: #ffffff;
    color: var(--ah-text);
}

body.ah-plugin-page .ah-card,
body.ah-plugin-page .card.ah-card,
body.ah-plugin-page .card {
    border-radius: var(--ah-radius) !important;
    box-shadow: none;
    border: 1px solid var(--ah-border);
}

body.ah-plugin-page .card:hover.ah-card {
    box-shadow: var(--ah-shadow-sm);
}

body.ah-plugin-page .btn-primary {
    background-color: var(--ah-primary-color) !important;
    border-color: var(--ah-primary-color) !important;
}

body.ah-plugin-page .btn-primary:hover {
    background-color: var(--ah-primary-hover) !important;
    border-color: var(--ah-primary-hover) !important;
}

body.ah-plugin-page .form-control,
body.ah-plugin-page .form-select {
    border-radius: 10px !important;
    border-color: var(--ah-border) !important;
    min-height: 42px;
    background: #fff !important;
}

body.ah-plugin-page .form-control:focus,
body.ah-plugin-page .form-select:focus {
    border-color: #c7d2fe !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
}

body.ah-plugin-page .table > :not(caption) > * > * {
    border-bottom-color: var(--ah-border);
}

.ah-msg-wrapper { display: flex; margin-bottom: 1rem; width: 100%; }
.ah-msg-mine-wrapper { justify-content: flex-end; }
.ah-msg-other-wrapper { justify-content: flex-start; }
.ah-msg { max-width: 75%; padding: 0.75rem 1rem; border-radius: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.ah-msg-mine { background-color: var(--ah-primary-color); color: #fff; border-bottom-right-radius: 0.25rem; }
.ah-msg-other { background-color: #eef2f7; color: var(--ah-text); border-bottom-left-radius: 0.25rem; }
.ah-msg-header { font-size: 0.8rem; opacity: 0.85; margin-bottom: 0.25rem; font-weight: 600; }
.ah-msg-time { font-size: 0.7rem; opacity: 0.75; margin-top: 0.25rem; text-align: right; }

.ah-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .ah-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        background: rgba(255,255,255,0.98);
        border-top: 1px solid var(--ah-border);
        box-shadow: 0 -8px 22px rgba(17, 38, 71, 0.10);
        padding: 8px;
    }

    .ah-bottom-nav a {
        text-decoration: none;
        color: var(--ah-text-muted);
        text-align: center;
        font-size: 12px;
        padding: 10px 6px;
        border-radius: 12px;
        font-weight: 600;
    }

    .ah-bottom-nav a.is-active {
        background: #eaf3ff;
        color: var(--ah-primary-color);
    }

    .ah-bottom-nav--inpage {
        display: grid;
    }
}

.ah-auth-container .login-username,
.ah-auth-container .login-password,
.ah-auth-container .login-remember,
.ah-auth-container .login-submit {
    margin-bottom: 14px;
}

.ah-auth-container .login-username label,
.ah-auth-container .login-password label {
    display: block;
    margin-bottom: 6px;
    color: var(--ah-text);
    font-weight: 500;
}

.ah-auth-container .login-username input,
.ah-auth-container .login-password input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--ah-border);
    border-radius: 12px;
    padding: 0 12px;
    outline: none;
    box-sizing: border-box;
}

.ah-auth-container .login-username input:focus,
.ah-auth-container .login-password input:focus {
    border-color: var(--ah-primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.ah-auth-container .login-submit .button-primary,
.ah-auth-container .login-submit input[type="submit"] {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--ah-primary-color);
    color: #fff;
    font-weight: 600;
}

.ah-auth-container .login-submit .button-primary:hover,
.ah-auth-container .login-submit input[type="submit"]:hover {
    background: var(--ah-primary-hover);
}

.ah-chat-layout {
    overflow: hidden;
}

.ah-chat-sidebar {
    height: min(78vh, 760px);
    display: flex;
    flex-direction: column;
    background: #fff;
}

.ah-chat-sidebar-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--ah-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ah-thread-list {
    overflow: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ah-thread-item {
    width: 100%;
    border: 1px solid var(--ah-border);
    background: #fff;
    border-radius: 14px;
    padding: 10px;
    text-align: left;
    display: flex;
    gap: 10px;
    align-items: center;
    cursor: pointer;
}

.ah-thread-item.is-active {
    border-color: #b7d3fb;
    background: #eef5ff;
}

.ah-thread-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #e9eef6;
}

.ah-thread-body {
    min-width: 0;
    width: 100%;
}

.ah-thread-top,
.ah-thread-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ah-thread-name {
    font-weight: 700;
    color: var(--ah-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ah-thread-last {
    color: var(--ah-text-muted);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 210px;
}

.ah-thread-time {
    color: var(--ah-text-muted);
    font-size: 12px;
    flex-shrink: 0;
}

.ah-chat-main {
    display: flex;
    flex-direction: column;
    height: min(78vh, 760px);
    background: #fff;
}

.ah-chat-messages {
    flex: 1;
    overflow: auto;
    background: #f7f9fc;
    padding: 16px;
}

.ah-msg-row {
    display: flex;
    margin-bottom: 10px;
}

.ah-msg-row.is-mine {
    justify-content: flex-end;
}

.ah-msg-bubble {
    max-width: 74%;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--ah-border);
    padding: 10px 12px;
}

.ah-msg-row.is-mine .ah-msg-bubble {
    background: #eaf3ff;
    border-color: #cae0ff;
}

.ah-msg-author {
    font-size: 12px;
    color: var(--ah-text-muted);
    margin-bottom: 4px;
}

.ah-msg-text {
    color: var(--ah-text);
}

.ah-msg-date {
    margin-top: 6px;
    font-size: 11px;
    color: var(--ah-text-muted);
    text-align: right;
}

.ah-services-manager {
  position: relative;
}

.ah-services-manager--busy .ah-service-add,
.ah-services-manager--busy .ah-service-save,
.ah-services-manager--busy .ah-service-delete {
  pointer-events: none;
  opacity: 0.65;
}

.ah-services-loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(1px);
}

.ah-services-loading.hidden {
  display: none;
}

.ah-services-loading-card {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.ah-services-loading-spinner {
  width: 1rem;
  height: 1rem;
  animation: ah-services-spin 0.8s linear infinite;
  color: #4f46e5;
}

@keyframes ah-services-spin {
  to {
    transform: rotate(360deg);
  }
}

.ah-dashboard-chat-input {
  field-sizing: content;
  overflow-y: hidden;
}

.ah-dashboard-chat-messages {
    background-color: var(--ah-bg-color, #0f172a);
}

.ah-dashboard-chat-messages .ah-msg-row {
    display: block;
    width: 100%;
    clear: both;
}

.ah-dashboard-chat-messages .ah-msg-bubble {
    display: block;
    width: fit-content;
    max-width: min(78%, 520px);
    border-radius: 18px;
    padding: 10px 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    word-break: break-word;
}

.ah-dashboard-chat-messages .ah-msg-bubble--audio {
    min-width: 250px;
    max-width: 360px;
}

.ah-dashboard-chat-messages .ah-msg-bubble--theirs {
    margin-right: auto;
    margin-left: 0;
    background: var(--ah-surface-color, #ffffff);
    border: 1px solid var(--ah-border-color, #e2e8f0);
    color: var(--ah-text-color, #0f172a);
    border-bottom-left-radius: 6px;
}

.ah-dashboard-chat-messages .ah-msg-bubble--mine {
    margin-left: auto;
    margin-right: 0;
    background: var(--ah-button-color, #4f46e5);
    border: 1px solid var(--ah-button-color, #4f46e5);
    color: var(--ah-button-text-color, #ffffff);
    border-bottom-right-radius: 6px;
}

.ah-dashboard-chat-messages .ah-msg-bubble--system {
    margin-left: auto;
    margin-right: auto;
    background: var(--ah-surface-muted-color, #f1f5f9);
    border: 1px dashed var(--ah-border-color, #cbd5e1);
    color: var(--ah-text-muted-color, #64748b);
    font-size: 12px;
}

.ah-dashboard-chat-messages .ah-msg-text {
    font-size: 14px;
    line-height: 1.45;
    color: inherit;
}

.ah-dashboard-chat-messages .ah-msg-date {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    width: 100%;
    font-size: 11px;
    text-align: right;
    color: var(--ah-text-muted-color, #94a3b8);
}

.ah-dashboard-chat-messages .ah-msg-receipt {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.ah-dashboard-chat-messages .ah-msg-receipt-icon {
    width: 16px;
    height: 11px;
}

.ah-dashboard-chat-messages .ah-msg-receipt.is-sent {
    color: var(--ah-text-muted-color, #94a3b8);
}

.ah-dashboard-chat-messages .ah-msg-bubble--mine .ah-msg-receipt.is-sent,
.ah-dashboard-chat-messages .ah-msg-bubble--mine .ah-msg-receipt.is-delivered {
    color: var(--ah-button-text-color, #ffffff);
    opacity: 0.72;
}

.ah-dashboard-chat-messages .ah-msg-receipt.is-delivered {
    color: var(--ah-text-muted-color, #94a3b8);
}

.ah-dashboard-chat-messages .ah-msg-receipt.is-read {
    color: #38bdf8;
}

.ah-dashboard-chat-messages .ah-msg-bubble--mine .ah-msg-receipt.is-read {
    color: #bae6fd;
    opacity: 1;
}

.ah-dashboard-chat-messages .ah-chat-video {
    display: block;
    width: 100%;
}

.ah-dashboard-chat-messages .ah-chat-pdf-open {
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 0;
    text-align: left;
}

.ah-dashboard-chat-messages .ah-msg-bubble--mine .ah-msg-date {
    color: var(--ah-button-text-color, #ffffff);
    opacity: 0.78;
}

.ah-dashboard-chat-messages .ah-msg-attachments {
    margin-top: 8px;
}

.ah-dashboard-chat-messages .ah-msg-bubble--mine a,
.ah-dashboard-chat-messages .ah-msg-bubble--mine .ah-chat-attachment-link {
    color: var(--ah-button-text-color, #ffffff);
    opacity: 0.92;
}

.ah-dashboard-chat-messages .ah-msg-bubble--theirs a,
.ah-dashboard-chat-messages .ah-msg-bubble--theirs .ah-chat-attachment-link {
    color: var(--ah-link-color, #4f46e5);
}

.ah-dashboard-chat-messages .ah-msg-bubble--mine .ah-chat-image-open {
    border-color: var(--ah-border-color, rgba(255, 255, 255, 0.25));
}

.ah-dashboard-chat-messages .ah-msg-bubble--theirs .ah-chat-image-open {
    border-color: var(--ah-border-color, #e2e8f0);
}

.ah-dashboard-chat-messages .ah-msg-row[data-ah-side="mine"] .ah-msg-bubble {
    margin-left: auto;
    margin-right: 0;
}

.ah-dashboard-chat-messages .ah-msg-row[data-ah-side="theirs"] .ah-msg-bubble {
    margin-right: auto;
    margin-left: 0;
}

.ah-dashboard-chat-empty {
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.35);
    color: #cbd5e1;
}

.ah-chat-pinned-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(245, 158, 11, 0.35);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.08));
    padding: 10px 16px;
}

.ah-chat-pinned-bar__body {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    color: inherit;
    cursor: pointer;
}

.ah-chat-pinned-bar__icon {
    font-size: 18px;
    line-height: 1;
}

.ah-chat-pinned-bar__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.ah-chat-pinned-bar__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fbbf24;
}

.ah-chat-pinned-bar__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    color: #fef3c7;
}

.ah-chat-pinned-bar__unpin {
    flex-shrink: 0;
    border: 1px solid rgba(251, 191, 36, 0.45);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.25);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fde68a;
    cursor: pointer;
}

.ah-chat-pinned-bar__unpin:hover {
    background: rgba(15, 23, 42, 0.45);
}

.ah-chat-toast {
    position: absolute;
    top: 12px;
    left: 50%;
    z-index: 50;
    max-width: min(92%, 420px);
    transform: translateX(-50%);
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
}

.ah-chat-toast.is-success {
    border: 1px solid rgba(16, 185, 129, 0.45);
    background: rgba(6, 78, 59, 0.95);
    color: #d1fae5;
}

.ah-chat-toast.is-error {
    border: 1px solid rgba(239, 68, 68, 0.45);
    background: rgba(127, 29, 29, 0.95);
    color: #fee2e2;
}

.ah-chat-toast.is-info {
    border: 1px solid rgba(59, 130, 246, 0.45);
    background: rgba(30, 58, 138, 0.95);
    color: #dbeafe;
}

.ah-msg-row--highlight .ah-msg-bubble {
    animation: ah-msg-highlight 1.2s ease;
}

@keyframes ah-msg-highlight {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.65); }
    100% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
}

.ah-msg-text.is-hidden {
    display: none;
}

.ah-msg-edit-form {
    margin-top: 4px;
}

.ah-msg-edit-input {
    width: 100%;
    min-height: 72px;
    resize: vertical;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.35);
    padding: 10px 12px;
    color: inherit;
    font: inherit;
    line-height: 1.45;
}

.ah-msg-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.ah-msg-edit-save,
.ah-msg-edit-cancel {
    border: 0;
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ah-msg-edit-save {
    background: #f59e0b;
    color: #111827;
}

.ah-msg-edit-cancel {
    background: rgba(148, 163, 184, 0.25);
    color: inherit;
}

.ah-msg-context-menu.is-mobile-sheet {
    right: 12px;
    left: 12px !important;
    width: auto;
}

#ah-dashboard-chat-conversation-panel {
    position: relative;
}

.ah-dashboard-chat-messages .ah-msg-bubble {
    position: relative;
}

.ah-msg-menu-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
    font-size: 16px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.ah-msg-bubble:hover .ah-msg-menu-btn,
.ah-msg-bubble:focus-within .ah-msg-menu-btn {
    opacity: 1;
}

.ah-msg-text--deleted {
    font-style: italic;
    opacity: 0.75;
}

.ah-msg-edited {
    margin-left: 6px;
    font-size: 0.65rem;
    opacity: 0.7;
}

.ah-msg-bubble--pinned {
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.45);
}

.ah-msg-context-menu {
    position: fixed;
    z-index: 140;
    min-width: 160px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.ah-msg-context-item {
    display: block;
    width: 100%;
    border: 0;
    background: #fff;
    padding: 10px 14px;
    text-align: left;
    font-size: 14px;
    color: #0f172a;
}

.ah-msg-context-item:hover {
    background: #f8fafc;
}

.ah-msg-context-item.is-danger {
    color: #dc2626;
}

.ah-chat-emoji-picker {
    position: fixed;
    z-index: 140;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    width: min(280px, calc(100vw - 24px));
    max-height: min(280px, 42vh);
    overflow-y: auto;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 16px;
    background: #1e293b;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
}

.ah-chat-emoji-picker.is-mobile-sheet {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    width: auto;
    max-height: min(240px, 36vh);
    border-radius: 18px 18px 14px 14px;
    padding: 12px;
}

.ah-chat-emoji-item {
    border: 0;
    border-radius: 10px;
    background: transparent;
    padding: 8px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.ah-chat-emoji-item:hover {
    background: rgba(148, 163, 184, 0.18);
}

@media (max-width: 767px) {
    #ah-dashboard-chat {
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 12rem);
    }

    #ah-dashboard-chat-list-panel,
    #ah-dashboard-chat-conversation-panel {
        min-height: calc(100vh - 14rem);
    }

    .ah-msg-menu-btn {
        opacity: 1;
    }

    #ah-dashboard-chat-form .flex.items-end {
        flex-wrap: wrap;
    }

    #ah-dashboard-chat-input,
    #ah-dashboard-chat-input-wrap {
        min-width: 0;
        flex: 1 1 calc(100% - 11rem);
    }

    #ah-dashboard-chat-archive {
        width: 100%;
        margin-top: 0.25rem;
    }

    .ah-msg-context-menu {
        left: 12px !important;
        right: 12px;
        width: auto;
        bottom: 12px;
        top: auto !important;
        border-radius: 18px 18px 0 0;
    }
}

.ah-chat-widget {
    position: fixed;
    right: 16px;
    bottom: 18px;
    z-index: 120;
}

.ah-chat-widget-toggle {
    border: 0;
    border-radius: 999px;
    background: var(--ah-primary-color);
    color: #fff;
    padding: 10px 16px;
    font-weight: 700;
    box-shadow: var(--ah-shadow-md);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ah-chat-widget-badge {
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    font-size: 12px;
}

.ah-chat-widget-panel {
    width: 340px;
    height: 460px;
    background: #fff;
    border: 1px solid var(--ah-border);
    border-radius: 16px;
    box-shadow: var(--ah-shadow-md);
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ah-chat-widget-head {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ah-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ah-chat-widget-threads {
    overflow: auto;
    flex: 1;
}

.ah-chat-widget-thread {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--ah-border);
    background: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    text-align: left;
}

.ah-chat-widget-thread:hover {
    background: #f7faff;
}

.ah-chat-widget-thread-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ah-chat-widget-thread-avatar--empty {
    background: #e9eef6;
}

.ah-chat-widget-thread-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ah-chat-widget-thread-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ah-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ah-chat-widget-thread-last {
    font-size: 12px;
    color: var(--ah-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ah-chat-widget-thread-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    color: var(--ah-text-muted);
}

.ah-chat-widget-conversation {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ah-chat-widget-conversation-head {
    padding: 8px 10px;
    border-bottom: 1px solid var(--ah-border);
    display: flex;
    justify-content: space-between;
}

.ah-chat-widget-messages {
    flex: 1;
    overflow: auto;
    padding: 10px;
    background: #f7f9fc;
}

.ah-chat-widget-msg {
    display: flex;
    margin-bottom: 8px;
}

.ah-chat-widget-msg.is-mine {
    justify-content: flex-end;
}

.ah-chat-widget-msg-bubble {
    max-width: 80%;
    border: 1px solid var(--ah-border);
    border-radius: 10px;
    background: #fff;
    padding: 7px 9px;
    font-size: 13px;
}

.ah-chat-widget-msg.is-mine .ah-chat-widget-msg-bubble {
    background: #eaf3ff;
    border-color: #cae0ff;
}

.ah-chat-widget-msg-bubble small {
    display: block;
    margin-top: 4px;
    color: var(--ah-text-muted);
    text-align: right;
}

.ah-chat-widget-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    border-top: 1px solid var(--ah-border);
    padding: 10px;
}

@media (max-width: 991px) {
    .ah-chat-sidebar,
    .ah-chat-main {
        height: auto;
        min-height: 380px;
    }
}

@media (max-width: 768px) {
    .ah-chat-widget {
        right: 10px;
        left: 10px;
        bottom: 12px;
    }

    .ah-chat-widget-panel {
        width: 100%;
        height: 62vh;
    }
}

.ah-dashboard-shell .ah-dashboard-nav {
    display: flex;
    gap: 8px;
    overflow: auto;
    white-space: nowrap;
}

.ah-dash-link {
    text-decoration: none;
    color: var(--ah-text-muted);
    border: 1px solid var(--ah-border);
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
}

.ah-dash-link:hover {
    color: var(--ah-primary-color);
    border-color: #bfd8ff;
    background: #f3f8ff;
}

.ah-dash-link.is-active {
    color: var(--ah-primary-color);
    border-color: #c7d2fe;
    background: #eef2ff;
}

.ah-section {
    max-width: 1200px;
    margin: 0 auto;
}

.ah-page-head {
    margin-bottom: 24px;
}

.ah-page-head h1 {
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.2;
    margin-bottom: 8px;
}

.ah-page-head p {
    color: var(--ah-text-muted);
    margin: 0;
}

.ah-filter-card {
    border: 1px solid var(--ah-border);
    border-radius: var(--ah-radius);
    background: #fff;
    padding: 14px;
}

.ah-advisor-grid .card-title {
    font-size: 20px;
    line-height: 1.3;
}

.ah-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--ah-border);
    background: #f8fafc;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    color: var(--ah-text-muted);
}

.ah-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 14px;
}

.ah-price-row strong {
    font-size: 16px;
    color: var(--ah-text);
}


#ah-dashboard-calendar,
#ah-client-dashboard-calendar {
  --ah-calendar-toolbar-gap: 0.5rem;
}

body.ah-plugin-page .fc .fc-list-day-cushion,
body.ah-plugin-page #ah-dashboard-calendar .fc-list-day-cushion,
body.ah-plugin-page #ah-client-dashboard-calendar .fc-list-day-cushion {
  background-color: var(--ah-surface-muted-color, #f1f5f9) !important;
  color: var(--ah-text-color, #0f172a) !important;
}

body.ah-plugin-page .fc .fc-list-day-text,
body.ah-plugin-page #ah-dashboard-calendar .fc-list-day-text,
body.ah-plugin-page #ah-client-dashboard-calendar .fc-list-day-text {
  color: var(--ah-text-color, #0f172a) !important;
}

body.ah-plugin-page .fc .fc-list-day-text:hover,
body.ah-plugin-page #ah-dashboard-calendar .fc-list-day-text:hover,
body.ah-plugin-page #ah-client-dashboard-calendar .fc-list-day-text:hover {
  color: var(--ah-link-color, #4f46e5) !important;
}

body.ah-plugin-page .fc .fc-col-header,
body.ah-plugin-page .fc .fc-col-header-cell,
body.ah-plugin-page #ah-dashboard-calendar .fc-col-header-cell,
body.ah-plugin-page #ah-client-dashboard-calendar .fc-col-header-cell {
  background-color: var(--ah-surface-muted-color, #f1f5f9) !important;
}

body.ah-plugin-page .fc .fc-col-header-cell-cushion,
body.ah-plugin-page .fc .fc-col-header-cell a,
body.ah-plugin-page #ah-dashboard-calendar .fc-col-header-cell-cushion,
body.ah-plugin-page #ah-client-dashboard-calendar .fc-col-header-cell-cushion {
  color: var(--ah-text-color, #0f172a) !important;
}

body.ah-plugin-page .fc .fc-timegrid-axis,
body.ah-plugin-page .fc .fc-timegrid-slot-label,
body.ah-plugin-page #ah-dashboard-calendar .fc-timegrid-axis,
body.ah-plugin-page #ah-client-dashboard-calendar .fc-timegrid-slot-label {
  background-color: var(--ah-surface-color, #ffffff) !important;
}

body.ah-plugin-page .fc .fc-timegrid-slot-label-cushion,
body.ah-plugin-page .fc .fc-timegrid-axis-cushion,
body.ah-plugin-page #ah-dashboard-calendar .fc-timegrid-slot-label-cushion,
body.ah-plugin-page #ah-client-dashboard-calendar .fc-timegrid-slot-label-cushion {
  color: var(--ah-text-muted-color, #64748b) !important;
}

body.ah-plugin-page .ah-review-card {
  background-color: var(--ah-surface-color, #ffffff) !important;
}

body.ah-plugin-page .ah-review-card .ah-review-body {
  color: var(--ah-text-color, #0f172a) !important;
}

body.ah-plugin-page .ah-review-card .ah-review-stars {
  color: #f59e0b !important;
}

body.ah-dashboard-page .ah-dash-sidebar-action {
  display: inline-flex;
  width: 100%;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.ah-dashboard-page .ah-dash-sidebar-action--muted {
  border: 1px solid var(--ah-border-color, #e2e8f0);
  background-color: var(--ah-surface-color, #ffffff);
  color: var(--ah-text-color, #334155) !important;
}

body.ah-dashboard-page .ah-dash-sidebar-action--muted:hover {
  background-color: var(--ah-surface-muted-color, #f8fafc);
  color: var(--ah-text-color, #0f172a) !important;
}

body.ah-dashboard-page .ah-dash-sidebar-action--primary {
  border: 1px solid var(--ah-button-color, #4f46e5);
  background-color: var(--ah-button-color, #4f46e5) !important;
  color: var(--ah-button-text-color, #ffffff) !important;
}

body.ah-dashboard-page .ah-dash-sidebar-action--primary:hover {
  background-color: var(--ah-button-hover, #4338ca) !important;
  border-color: var(--ah-button-hover, #4338ca);
  color: var(--ah-button-text-hover-color, #ffffff) !important;
}

body.ah-dashboard-page .ah-dash-chat-header-action,
body.ah-dashboard-page .ah-dash-client-card-action {
  border: 1px solid var(--ah-border-color, #e2e8f0);
  background-color: var(--ah-surface-color, #ffffff);
  color: var(--ah-text-color, #334155) !important;
  text-decoration: none;
}

body.ah-dashboard-page .ah-dash-chat-header-action:hover,
body.ah-dashboard-page .ah-dash-client-card-action:hover {
  background-color: var(--ah-surface-muted-color, #f8fafc);
  color: var(--ah-text-color, #0f172a) !important;
}

body.ah-dashboard-page .ah-dash-chat-header-action.is-muted,
body.ah-dashboard-page .ah-dash-client-card-action.is-muted {
  border-color: #f59e0b;
  background-color: rgba(245, 158, 11, 0.14);
  color: #fbbf24 !important;
}

body.ah-dashboard-page .ah-dash-chat-header-action.is-muted:hover,
body.ah-dashboard-page .ah-dash-client-card-action.is-muted:hover {
  background-color: rgba(245, 158, 11, 0.22);
  color: #fcd34d !important;
}

body.ah-plugin-page .hover\:bg-slate-50:hover,
body.ah-plugin-page a.hover\:bg-slate-50:hover,
body.ah-plugin-page button.hover\:bg-slate-50:hover {
  background-color: var(--ah-surface-muted-color, #f1f5f9) !important;
  color: var(--ah-text-color, #0f172a) !important;
}

body.ah-plugin-page .hover\:bg-slate-100:hover,
body.ah-plugin-page a.hover\:bg-slate-100:hover,
body.ah-plugin-page button.hover\:bg-slate-100:hover {
  background-color: var(--ah-surface-muted-color, #f1f5f9) !important;
  color: var(--ah-text-color, #0f172a) !important;
}

body.ah-plugin-page a.bg-indigo-600.hover\:bg-indigo-700:hover,
body.ah-plugin-page button.bg-indigo-600.hover\:bg-indigo-700:hover {
  background-color: var(--ah-button-hover, #4338ca) !important;
  border-color: var(--ah-button-hover, #4338ca) !important;
  color: var(--ah-button-text-hover-color, #ffffff) !important;
}

@media (max-width: 767px) {
  #ah-dashboard-calendar .fc-header-toolbar,
  #ah-client-dashboard-calendar .fc-header-toolbar {
    flex-direction: column;
    gap: var(--ah-calendar-toolbar-gap);
    align-items: stretch;
  }

  #ah-dashboard-calendar .fc-toolbar-chunk,
  #ah-client-dashboard-calendar .fc-toolbar-chunk {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
  }

  #ah-dashboard-calendar .fc-toolbar-title,
  #ah-client-dashboard-calendar .fc-toolbar-title {
    font-size: 1rem;
    line-height: 1.4;
    text-align: center;
  }

  #ah-dashboard-calendar .fc-button,
  #ah-client-dashboard-calendar .fc-button {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
  }

  #ah-dashboard-calendar .fc-list-event-title,
  #ah-client-dashboard-calendar .fc-list-event-title,
  #ah-dashboard-calendar .fc-list-event-time,
  #ah-client-dashboard-calendar .fc-list-event-time {
    font-size: 0.8125rem;
  }

  #ah-dashboard-calendar .fc-daygrid-day-number,
  #ah-client-dashboard-calendar .fc-daygrid-day-number {
    font-size: 0.75rem;
    padding: 0.25rem;
  }
}

body.ah-plugin-page a.ah-login-attach-link {
  color: #f59e0b !important;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #fbbf24;
  text-underline-offset: 2px;
}

body.ah-plugin-page a.ah-login-attach-link:hover {
  color: #d97706 !important;
  text-decoration-color: #f59e0b;
}

body.ah-plugin-page a.bg-slate-900[href*="meet."],
body.ah-plugin-page a.bg-slate-900[href*="jit.si"],
body.ah-plugin-page a.bg-slate-800[href*="meet."],
body.ah-plugin-page a.bg-slate-800[href*="jit.si"] {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  color: #451a03 !important;
  border: 1px solid #f59e0b !important;
  box-shadow: 0 8px 20px -12px rgba(245, 158, 11, 0.85);
}

body.ah-plugin-page a.bg-slate-900[href*="meet."]:hover,
body.ah-plugin-page a.bg-slate-900[href*="jit.si"]:hover,
body.ah-plugin-page a.bg-slate-800[href*="meet."]:hover,
body.ah-plugin-page a.bg-slate-800[href*="jit.si"]:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #451a03 !important;
}

body.ah-plugin-page .ah-btn-join-video svg,
body.ah-dashboard-page .ah-btn-join-video svg,
body.ah-plugin-page a.bg-slate-900[href*="meet."] svg,
body.ah-plugin-page a.bg-slate-900[href*="jit.si"] svg {
  color: #451a03 !important;
  stroke: #451a03 !important;
}

body.ah-plugin-page .ah-btn-platform-fee,
body.ah-dashboard-page .ah-btn-platform-fee,
body.ah-plugin-page .ah-btn-join-video,
body.ah-dashboard-page .ah-btn-join-video {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  color: #451a03 !important;
  box-shadow: 0 8px 20px -12px rgba(245, 158, 11, 0.85);
  border: 1px solid #f59e0b;
}

body.ah-plugin-page .ah-btn-platform-fee:hover,
body.ah-dashboard-page .ah-btn-platform-fee:hover,
body.ah-plugin-page .ah-btn-join-video:hover,
body.ah-dashboard-page .ah-btn-join-video:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #451a03 !important;
}

.ah-chat-spell-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

#ah-dashboard-chat-input-wrap {
  min-width: 0;
}

.ah-chat-spell-mirror {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  white-space: pre-wrap;
  word-wrap: break-word;
  z-index: 2;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.ah-chat-spell-mirror.hidden {
  display: none;
}

.ah-chat-spell-mirror--single {
  white-space: pre;
  overflow-x: hidden;
}

body.ah-plugin-page .ah-chat-spell-wrap .ah-dashboard-chat-input,
body.ah-dashboard-page .ah-chat-spell-wrap .ah-dashboard-chat-input,
body.ah-plugin-page .ah-chat-spell-wrap #ah-chat-input,
body.ah-dashboard-page .ah-chat-spell-wrap #ah-chat-input {
  position: relative;
  z-index: 1;
}

.ah-chat-spell-error {
  text-decoration: underline wavy #ef4444;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: none;
}