.app-nav-disabled {
    cursor: default;
    opacity: .58;
}

.app-nav-disabled .nav-badge {
    font-size: 9px;
}

.app-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--zc-primary), var(--zc-secondary));
}

.app-status-value {
    margin-top: 16px;
    font-size: 25px;
}

.app-avatar-sm {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 13px;
}

.app-toolbar,
.app-search-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-toolbar {
    justify-content: space-between;
}

.app-search-form {
    width: min(100%, 360px);
}

.app-table th {
    white-space: nowrap;
    color: var(--zc-text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.app-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--zc-text-secondary);
    font-size: 13px;
}

.app-department-card {
    position: relative;
    overflow: hidden;
}

.app-department-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--department-color);
}

.app-department-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--department-color);
    background: color-mix(in srgb, var(--department-color) 12%, transparent);
    font-size: 20px;
}

.app-card-description {
    min-height: 42px;
}

.app-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.app-metric-grid div {
    padding: 10px;
    border-radius: 10px;
    background: var(--zc-bg-secondary);
    text-align: center;
}

.app-metric-grid strong,
.app-metric-grid span {
    display: block;
}

.app-metric-grid span {
    margin-top: 2px;
    color: var(--zc-text-secondary);
    font-size: 11px;
}

.app-multi-select {
    min-height: 142px;
}

.app-hours-list {
    display: grid;
    gap: 10px;
}

.app-hours-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(280px, 1.4fr);
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--zc-border-light);
}

.app-hours-row:last-child {
    border-bottom: 0;
}

.app-holiday-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--zc-border-light);
}

.app-holiday-row div,
.app-holiday-row span {
    display: block;
}

.app-color-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--item-color);
}

.app-integration-card {
    min-height: 285px;
}

.app-integration-logo {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #1546a0, #18a6c9);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .08em;
}

.app-integration-state {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--zc-border-light);
    font-size: 13px;
}

.app-integration-state span {
    color: var(--zc-text-secondary);
}

.app-integration-planned {
    border-style: dashed;
    opacity: .72;
}

.app-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.app-detail-grid div,
.app-detail-grid span,
.app-detail-grid strong {
    display: block;
}

.app-detail-grid span {
    margin-bottom: 4px;
    color: var(--zc-text-secondary);
    font-size: 12px;
}

.app-detail-wide {
    grid-column: 1 / -1;
}

.app-summary-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.app-summary-stack div {
    padding: 16px 10px;
    border-radius: 12px;
    background: var(--zc-bg-secondary);
    text-align: center;
}

.app-summary-stack strong,
.app-summary-stack span {
    display: block;
}

.app-summary-stack strong {
    color: var(--zc-primary);
    font-size: 24px;
}

.app-summary-stack span {
    color: var(--zc-text-secondary);
    font-size: 11px;
}

.app-ticket-list {
    display: grid;
    gap: 12px;
}

.app-ticket-item {
    padding: 14px;
    border: 1px solid var(--zc-border-light);
    border-radius: 12px;
}

.app-ticket-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.app-conversation-filters {
    display: grid;
    grid-template-columns: minmax(190px, 1.7fr) minmax(120px, 1fr) minmax(130px, 1fr) auto;
    gap: 8px;
    width: min(100%, 680px);
}

.app-conversation-list {
    display: grid;
}

.app-conversation-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) minmax(150px, auto);
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--zc-border-light);
    color: inherit;
    transition: background .18s ease;
}

.app-conversation-row:hover {
    background: var(--zc-bg-secondary);
}

.app-channel-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--zc-primary);
    background: var(--zc-primary-xlight);
}

.app-conversation-preview {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-conversation-meta {
    display: grid;
    justify-items: end;
    color: var(--zc-text-secondary);
    font-size: 11px;
}

.app-conversation-meta strong {
    color: var(--zc-text-primary);
    font-size: 12px;
}

.app-chat-card {
    overflow: hidden;
}

.app-chat-timeline {
    min-height: 430px;
    max-height: 65vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: color-mix(in srgb, var(--zc-bg-secondary) 72%, transparent);
}

.app-message {
    width: min(78%, 680px);
    padding: 13px 15px;
    border: 1px solid var(--zc-border-light);
    border-radius: 16px 16px 16px 4px;
    background: var(--zc-bg-primary);
}

.app-message-agent {
    align-self: flex-end;
    border-radius: 16px 16px 4px 16px;
    border-color: color-mix(in srgb, var(--zc-primary) 22%, var(--zc-border-light));
    background: var(--zc-primary-xlight);
}

.app-message-internal {
    align-self: center;
    width: min(88%, 760px);
    border-style: dashed;
    border-radius: 10px;
    background: rgba(245, 158, 11, .08);
}

.app-message-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
    font-size: 12px;
}

.app-message-heading time {
    color: var(--zc-text-secondary);
    font-size: 10px;
}

.app-message p {
    margin: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.app-attachment-link {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .04);
    font-size: 12px;
}

.app-attachment-link span {
    margin-left: auto;
    color: var(--zc-text-secondary);
}

.app-reply-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.app-visibility-select {
    width: 180px;
}

.app-detail-stack {
    display: grid;
    gap: 14px;
}

.app-detail-stack div,
.app-detail-stack span,
.app-detail-stack strong {
    display: block;
}

.app-detail-stack span {
    color: var(--zc-text-secondary);
    font-size: 11px;
}

.app-transfer-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--zc-border-light);
}

.app-transfer-item:last-child {
    border-bottom: 0;
}

.app-transfer-item strong,
.app-transfer-item span {
    display: block;
}

.app-procedure-content {
    color: var(--zc-text-primary);
    font-size: 15px;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.app-procedure-editor {
    min-height: 420px;
    line-height: 1.65;
}

.app-version-content {
    max-height: 220px;
    overflow-y: auto;
    padding: 10px;
    border-radius: 8px;
    background: var(--zc-bg-secondary);
    white-space: normal;
    overflow-wrap: anywhere;
}

.app-transfer-item span {
    color: var(--zc-text-secondary);
    font-size: 11px;
}

.app-webchat-body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at top left, rgba(80, 70, 229, .16), transparent 38%), var(--zc-bg-secondary);
}

.app-webchat-shell {
    width: min(100% - 24px, 760px);
    margin: 0 auto;
    padding: 24px 0;
}

.app-webchat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    color: var(--zc-text-secondary);
    font-size: 12px;
}

.app-webchat-card {
    overflow: hidden;
}

.app-online-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--zc-success);
    box-shadow: 0 0 0 5px rgba(34, 197, 94, .12);
}

.app-webchat-messages {
    height: min(60vh, 540px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--zc-bg-secondary);
}

.app-webchat-message {
    width: min(80%, 520px);
    padding: 11px 13px;
    border-radius: 15px 15px 15px 4px;
    background: var(--zc-bg-primary);
}

.app-webchat-message.from-customer {
    align-self: flex-end;
    border-radius: 15px 15px 4px 15px;
    color: #fff;
    background: var(--zc-primary);
}

.app-webchat-message strong,
.app-webchat-message time {
    display: block;
    font-size: 10px;
}

.app-webchat-attachment {
    display: block;
    margin: 6px 0;
    padding: 7px 9px;
    border-radius: 8px;
    color: inherit;
    background: rgba(0, 0, 0, .08);
    font-size: 11px;
}

.app-webchat-message p {
    margin: 3px 0;
    overflow-wrap: anywhere;
}

.app-webchat-message time {
    text-align: right;
    opacity: .7;
}

.app-holiday-row span {
    color: var(--zc-text-secondary);
    font-size: 12px;
}

.app-phase-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--zc-border-light);
}

.app-phase-row:last-child {
    border-bottom: 0;
}

.app-phase-number {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--zc-primary);
    background: var(--zc-primary-xlight);
    font-weight: 800;
}

.app-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 15px;
}

.app-check-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--zc-text-secondary);
}

.app-check-list i {
    color: var(--zc-success);
}

.input-group-addon[type="button"] {
    cursor: pointer;
    background: transparent;
}

@media (max-width: 575px) {
    .auth-form-container {
        padding-left: 18px;
        padding-right: 18px;
    }

    .app-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

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

    .app-detail-grid {
        grid-template-columns: 1fr;
    }

    .app-conversation-filters,
    .app-conversation-row {
        grid-template-columns: 1fr;
    }

    .app-channel-icon {
        display: none;
    }

    .app-conversation-meta {
        justify-items: start;
    }

    .app-message {
        width: 92%;
    }

    .app-reply-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}
.app-ai-response {
    min-height: 180px;
    white-space: normal;
    line-height: 1.75;
    color: var(--zentic-text, #243247);
}
