/* ITKapocs v35 – AI Ticket Assistant */

.aiAssistantPage {
    width: min(1380px, calc(100% - 44px));
    margin: 30px auto 56px;
    color: #0f172a;
}

.aiHero {
    border-radius: 34px;
    padding: 32px;
    background:
        radial-gradient(circle at 18% 0%, rgba(125, 211, 252, .34), transparent 32%),
        linear-gradient(135deg, #0f1d35 0%, #1e3a5f 52%, #2563eb 130%);
    box-shadow: 0 30px 80px rgba(15,23,42,.16);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 26px;
    overflow: hidden;
    position: relative;
}

.aiHero::after {
    content: "";
    position: absolute;
    right: -140px;
    bottom: -180px;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: rgba(14,165,233,.28);
}

.aiHero > * {
    position: relative;
    z-index: 1;
}

.aiEyebrow {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.aiHero h1 {
    margin: 12px 0 8px;
    color: #fff;
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1;
    letter-spacing: -.055em;
}

.aiHero p {
    margin: 0;
    color: rgba(226,232,240,.92);
    font-size: 16px;
    line-height: 1.55;
    max-width: 760px;
}

.aiHeroActions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.aiBtn,
.aiInlineBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 16px;
    padding: 0 18px;
    border: 0;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    font-weight: 950;
    box-shadow: 0 16px 36px rgba(37,99,235,.24);
    cursor: pointer;
}

.aiBtn.ghost {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 16px 34px rgba(15,23,42,.14);
}

.aiBtn.secondary {
    background: linear-gradient(135deg, #0f766e, #10b981);
}

.aiBtn:disabled {
    opacity: .58;
    cursor: not-allowed;
}

.aiAlert {
    margin-top: 20px;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #9a3412;
    border-radius: 22px;
    padding: 18px 20px;
}

.aiAlert strong {
    display: block;
    font-size: 17px;
    margin-bottom: 5px;
}

.aiGrid {
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: 22px;
    margin-top: 24px;
}

.aiPanel {
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(203,213,225,.86);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(15,23,42,.08);
    padding: 26px;
    min-width: 0;
}

.aiPanelHeader {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.aiPanelHeader h2 {
    margin: 0;
    color: #0f172a;
    font-size: 24px;
    letter-spacing: -.035em;
}

.aiPanelHeader p {
    margin: 7px 0 0;
    color: #64748b;
    line-height: 1.55;
}

.aiBadge {
    display: inline-flex;
    border-radius: 999px;
    padding: 8px 12px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 950;
    font-size: 12px;
    white-space: nowrap;
}

.aiBadge.success {
    background: #dcfce7;
    color: #166534;
}

.aiTicketCard h3 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 24px;
    letter-spacing: -.03em;
}

.aiTicketCard p {
    color: #475569;
    line-height: 1.7;
}

.aiMetaGrid,
.aiSuggestionList,
.aiFormGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.aiMetaGrid div,
.aiSuggestionList div {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 14px;
    background: #f8fafc;
}

.aiMetaGrid span,
.aiSuggestionList span,
.aiSettingsForm label span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 7px;
}

.aiMetaGrid b,
.aiSuggestionList b {
    color: #0f172a;
    word-break: break-word;
}

.aiTextBlock {
    margin-top: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 18px;
    background: #fff;
}

.aiTextBlock h3 {
    margin: 0 0 10px;
    color: #0f172a;
}

.aiTextBlock p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.aiTextBlock textarea {
    width: 100%;
    min-height: 170px;
    border: 1px solid #dbe5f1;
    border-radius: 16px;
    padding: 14px;
    resize: vertical;
    font: inherit;
    color: #0f172a;
    background: #f8fafc;
}

.aiCopyBtn {
    margin-top: 12px;
    border: 0;
    border-radius: 14px;
    background: #0f172a;
    color: #fff;
    padding: 11px 14px;
    font-weight: 900;
    cursor: pointer;
}

.aiApplyForm {
    margin-top: 20px;
}

.aiEmpty {
    min-height: 220px;
    border: 1px dashed #93c5fd;
    border-radius: 22px;
    background: #f8fbff;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 28px;
    color: #64748b;
}

.aiEmpty strong {
    display: block;
    color: #0f172a;
    font-size: 19px;
    margin-bottom: 8px;
}

.aiSettingsForm input,
.aiSettingsForm select {
    width: 100%;
    border: 1px solid #dbe5f1;
    border-radius: 16px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-weight: 650;
    padding: 14px 15px;
    outline: none;
}

.aiSettingsForm input:focus,
.aiSettingsForm select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

.aiActionBar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    padding: 18px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.aiActionBar p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.aiTableWrap {
    overflow-x: auto;
}

.aiTable {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

.aiTable th {
    text-align: left;
    color: #475569;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 14px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.aiTable td {
    color: #334155;
    padding: 15px 12px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 750;
}

.aiTicketInline {
    width: min(1380px, calc(100% - 44px));
    margin: 20px auto 0;
    border: 1px solid #bfdbfe;
    border-radius: 22px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: #0f172a;
}

.aiTicketInline strong {
    display: block;
    font-size: 18px;
}

.aiTicketInline span {
    display: block;
    color: #64748b;
    margin-top: 4px;
}

@media (max-width: 980px) {
    .aiGrid,
    .aiMetaGrid,
    .aiSuggestionList,
    .aiFormGrid {
        grid-template-columns: 1fr;
    }

    .aiHero,
    .aiActionBar,
    .aiTicketInline {
        flex-direction: column;
        align-items: stretch;
    }

    .aiHeroActions,
    .aiBtn,
    .aiInlineBtn {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .aiAssistantPage,
    .aiTicketInline {
        width: min(100% - 24px, 1380px);
    }

    .aiHero,
    .aiPanel {
        padding: 20px;
        border-radius: 24px;
    }
}
