/* ========================================================================== */
/* ATA | AI automation center                                                 */
/* ========================================================================== */

.ai-automation-page {
    --automation-ink: #123f49;
    --automation-copy: #54747a;
    --automation-muted: #81989c;
    --automation-teal: #078f81;
    --automation-teal-dark: #075d58;
    --automation-mint: #57cb93;
    --automation-canvas: #f2f9f7;
    --automation-soft: #eaf7f3;
    --automation-line: #d8eae6;
    --automation-danger: #c94d59;
    --automation-warning: #b77619;
    --automation-shadow: 0 18px 46px rgba(12, 64, 67, .08);
    background:
        radial-gradient(circle at 8% 5%, rgba(80, 204, 148, .08), transparent 27%),
        radial-gradient(circle at 95% 12%, rgba(22, 150, 183, .055), transparent 25%),
        var(--automation-canvas);
    color: var(--automation-copy);
    font-family: "DM Sans", "Quicksand", sans-serif;
    margin-left: -15px;
    margin-right: -15px;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 96px;
}

.ai-automation-page * { box-sizing: border-box; }
.ai-automation-page #set-footer.ai-app-footer { left: 0; right: 0; width: auto; }
.ai-automation-shell { margin: 0 auto; max-width: 1580px; padding: 92px 36px 72px; }
.ai-automation-page h1,
.ai-automation-page h2,
.ai-automation-page h3 { color: var(--automation-ink); font-family: "Manrope", "Quicksand", sans-serif; margin-top: 0; }

.ai-automation-hero {
    align-items: center;
    background: linear-gradient(116deg, #093d43 0%, #075852 58%, #08776d 100%);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(7, 61, 64, .16);
    color: #fff;
    display: flex;
    gap: 24px;
    min-height: 176px;
    overflow: hidden;
    padding: 34px 40px;
    position: relative;
}

.ai-automation-hero::after,
.ai-automation-detail-hero::after {
    background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
    background-size: 28px 28px;
    content: "";
    height: 270px;
    opacity: .5;
    position: absolute;
    right: -35px;
    top: -64px;
    transform: rotate(-8deg);
    width: 500px;
}

.ai-automation-hero__icon,
.ai-automation-detail-hero__icon {
    align-items: center;
    background: rgba(255,255,255,.11);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 18px;
    display: inline-flex;
    flex: 0 0 72px;
    font-size: 30px;
    height: 72px;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.ai-automation-hero__copy { flex: 1; min-width: 0; position: relative; z-index: 1; }
.ai-automation-eyebrow { color: var(--automation-teal); display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.ai-automation-hero .ai-automation-eyebrow,
.ai-automation-detail-hero .ai-automation-eyebrow { color: #86e3c5; }
.ai-automation-hero h1 { color: #fff; font-size: 36px; font-weight: 500; letter-spacing: -.035em; margin: 7px 0 9px; }
.ai-automation-hero p { color: rgba(255,255,255,.73); font-size: 14px; margin: 0; }

.ai-automation-button {
    align-items: center;
    background: var(--automation-teal);
    border: 1px solid var(--automation-teal);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 600;
    gap: 8px;
    min-height: 40px;
    padding: 0 17px;
}
.ai-automation-button:hover { background: var(--automation-teal-dark); border-color: var(--automation-teal-dark); }
.ai-automation-button--light { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); position: relative; z-index: 1; }
.ai-automation-button--light:hover { background: #fff; border-color: #fff; color: var(--automation-teal-dark); }

.ai-automation-kpis { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); margin: -18px 22px 24px; position: relative; z-index: 2; }
.ai-automation-kpi { align-items: center; background: #fff; border: 1px solid var(--automation-line); border-radius: 17px; box-shadow: var(--automation-shadow); display: flex; gap: 14px; min-height: 102px; padding: 17px 18px; }
.ai-automation-kpi.has-alert { border-color: rgba(201,77,89,.35); }
.ai-automation-kpi__icon { align-items: center; background: #e8f6f2; border-radius: 13px; color: var(--automation-teal); display: inline-flex; flex: 0 0 46px; font-size: 18px; height: 46px; justify-content: center; }
.ai-automation-kpi__icon.is-active { background: #e8f4f8; color: #1789aa; }
.ai-automation-kpi__icon.is-success { background: #e9f8ef; color: #249768; }
.ai-automation-kpi__icon.is-danger { background: #fff0f1; color: var(--automation-danger); }
.ai-automation-kpi div { min-width: 0; }
.ai-automation-kpi small,
.ai-automation-kpi strong,
.ai-automation-kpi div > span { display: block; }
.ai-automation-kpi small { color: var(--automation-muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ai-automation-kpi strong { color: var(--automation-ink); font-family: "Manrope", "Quicksand", sans-serif; font-size: 28px; font-weight: 500; line-height: 1.05; margin: 3px 0; }
.ai-automation-kpi div > span { color: var(--automation-muted); font-size: 10px; }

.ai-automation-panel { background: #fff; border: 1px solid var(--automation-line); border-radius: 22px; box-shadow: var(--automation-shadow); overflow: hidden; }
.ai-automation-panel__header { align-items: flex-end; border-bottom: 1px solid var(--automation-line); display: flex; justify-content: space-between; padding: 26px 30px 23px; }
.ai-automation-panel__header h2 { font-size: 25px; font-weight: 500; letter-spacing: -.025em; margin: 5px 0 4px; }
.ai-automation-panel__header p { color: var(--automation-muted); font-size: 12px; margin: 0; }
.ai-automation-count { background: var(--automation-soft); border-radius: 999px; color: var(--automation-teal-dark); font-size: 11px; font-weight: 700; padding: 8px 13px; white-space: nowrap; }

.ai-automation-filters { align-items: flex-end; background: #f9fcfb; border-bottom: 1px solid var(--automation-line); display: grid; gap: 14px; grid-template-columns: minmax(280px, 1fr) 210px 210px; padding: 17px 30px; }
.ai-automation-search { align-items: center; background: #fff; border: 1px solid #d5e8e4; border-radius: 11px; display: flex; margin: 0; min-height: 44px; padding: 0 13px; }
.ai-automation-search > i { color: var(--automation-teal); font-size: 14px; }
.ai-automation-search input { background: transparent; border: 0; color: var(--automation-ink); flex: 1; font-size: 12px; height: 42px; margin: 0 9px; min-width: 0; outline: 0; }
.ai-automation-search input::placeholder { color: #91a5a8; }
.ai-automation-search button { background: transparent; border: 0; color: var(--automation-muted); padding: 6px; }
.ai-automation-select { margin: 0; }
.ai-automation-select > span { color: var(--automation-muted); display: block; font-size: 9px; font-weight: 700; letter-spacing: .08em; margin: 0 0 5px 3px; text-transform: uppercase; }
.ai-automation-select select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23078f81' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E") no-repeat right 12px center; border: 1px solid #d5e8e4; border-radius: 11px; color: #365f66; font-size: 11px; height: 44px; outline: 0; padding: 0 34px 0 12px; width: 100%; }

.ai-automation-table-wrap { overflow-x: auto; padding: 8px 18px 2px; }
.ai-automation-table { border-collapse: separate; border-spacing: 0 8px; margin: 0; min-width: 1100px; width: 100%; }
.ai-automation-table th { border: 0; color: var(--automation-muted); font-size: 9px; font-weight: 700; letter-spacing: .09em; padding: 8px 13px 4px; text-transform: uppercase; }
.ai-automation-table tbody tr { background: #fbfdfc; cursor: pointer; outline: 0; transition: background .18s ease, box-shadow .18s ease, transform .18s ease; }
.ai-automation-table tbody tr:hover,
.ai-automation-table tbody tr:focus,
.ai-automation-table tbody tr.is-selected { background: #f0f9f6; box-shadow: 0 7px 18px rgba(11, 89, 82, .07); transform: translateY(-1px); }
.ai-automation-table td { border-bottom: 1px solid #e3efec; border-top: 1px solid #e3efec; color: var(--automation-copy); font-size: 11px; padding: 14px 13px; vertical-align: middle; }
.ai-automation-table td:first-child { border-left: 1px solid #e3efec; border-radius: 12px 0 0 12px; }
.ai-automation-table td:last-child { border-right: 1px solid #e3efec; border-radius: 0 12px 12px 0; text-align: right; width: 50px; }
.ai-automation-process { align-items: center; display: flex; gap: 11px; min-width: 250px; }
.ai-automation-process__icon { align-items: center; background: var(--automation-soft); border: 1px solid #d6ebe6; border-radius: 11px; color: var(--automation-teal); display: inline-flex; flex: 0 0 40px; font-size: 15px; height: 40px; justify-content: center; }
.ai-automation-process strong,
.ai-automation-process small { display: block; }
.ai-automation-process strong { color: var(--automation-ink); font-size: 12px; font-weight: 600; line-height: 1.35; max-width: 390px; }
.ai-automation-process small { color: var(--automation-muted); font-size: 9.5px; margin-top: 4px; }
.ai-automation-cell-title { color: #365f66; display: block; font-size: 11px; font-weight: 600; }
.ai-automation-cell-note { color: var(--automation-muted); display: block; font-size: 9.5px; margin-top: 4px; }
.ai-automation-cell-note i { color: var(--automation-danger); margin-right: 3px; }
.ai-automation-progress-label { align-items: center; display: flex; justify-content: space-between; min-width: 145px; }
.ai-automation-progress-label strong { color: var(--automation-ink); font-size: 10.5px; }
.ai-automation-progress-label span { color: var(--automation-muted); font-size: 9px; }
.ai-automation-progress { background: #e5efed; border-radius: 999px; height: 5px; margin-top: 7px; overflow: hidden; }
.ai-automation-progress span { background: linear-gradient(90deg, #4dca92, #078f81); border-radius: inherit; display: block; height: 100%; min-width: 2px; }
.ai-automation-status { align-items: center; background: #eaf5f3; border-radius: 999px; color: #28746e; display: inline-flex; font-size: 9.5px; font-weight: 700; gap: 6px; line-height: 1.2; padding: 7px 9px; white-space: nowrap; }
.ai-automation-status i { font-size: 6px; }
.ai-automation-status.is-success { background: #e8f8ef; color: #21815b; }
.ai-automation-status.is-danger { background: #fff0f1; color: #bd4652; }
.ai-automation-status.is-warning { background: #fff6e7; color: #a86916; }
.ai-automation-status.is-muted { background: #eef2f2; color: #718589; }
.ai-automation-status.is-active { background: #e8f4f8; color: #167b9b; }
.ai-automation-row-action { align-items: center; background: #fff; border: 1px solid #d4e8e3; border-radius: 10px; color: var(--automation-teal); display: inline-flex; height: 34px; justify-content: center; width: 34px; }
.ai-automation-row-action:hover { background: var(--automation-teal); border-color: var(--automation-teal); color: #fff; }
.ai-automation-tracking { background: #edf7f5; border-radius: 6px; color: #397169; display: inline-block; font-size: 9px; font-weight: 700; margin: 2px 3px 2px 0; padding: 5px 6px; }

.ai-automation-loading,
.ai-automation-error { align-items: center; display: flex; gap: 12px; justify-content: center; margin: 24px 30px; min-height: 88px; }
.ai-automation-loading { color: var(--automation-copy); }
.ai-automation-loading > i { color: var(--automation-teal); font-size: 22px; }
.ai-automation-error { background: #fff4f4; border: 1px solid #f2d2d5; border-radius: 14px; color: var(--automation-danger); justify-content: flex-start; padding: 17px; }
.ai-automation-error > i { font-size: 21px; }
.ai-automation-error strong,
.ai-automation-error span { display: block; }
.ai-automation-error span { font-size: 11px; margin-top: 2px; }
.ai-automation-empty { align-items: center; display: flex; flex-direction: column; justify-content: center; min-height: 280px; padding: 35px; text-align: center; }
.ai-automation-empty > span { align-items: center; background: var(--automation-soft); border-radius: 15px; color: var(--automation-teal); display: inline-flex; font-size: 22px; height: 58px; justify-content: center; width: 58px; }
.ai-automation-empty h3 { font-size: 18px; font-weight: 500; margin: 14px 0 6px; }
.ai-automation-empty p { color: var(--automation-muted); font-size: 11px; margin: 0 0 15px; }
.ai-automation-empty--compact { min-height: 190px; }
.ai-automation-pagination { border-top: 1px solid var(--automation-line); padding: 14px 28px 18px; }
.ai-automation-pagination .pagination { margin: 0; }
.ai-automation-pagination .pagination > li > a { border-color: #d8e9e5; color: var(--automation-teal-dark); font-size: 10px; }
.ai-automation-pagination .pagination > .active > a { background: var(--automation-teal); border-color: var(--automation-teal); color: #fff; }

.ai-automation-back { align-items: center; background: transparent; border: 0; color: var(--automation-teal-dark); display: inline-flex; font-size: 12px; font-weight: 600; gap: 9px; margin: 0 0 14px 3px; padding: 6px 0; }
.ai-automation-back:hover { color: var(--automation-teal); }
.ai-automation-detail-hero { align-items: center; background: linear-gradient(116deg, #093d43 0%, #075852 60%, #08776d 100%); border-radius: 24px; box-shadow: 0 20px 50px rgba(7,61,64,.16); color: #fff; display: flex; justify-content: space-between; min-height: 160px; overflow: hidden; padding: 30px 38px; position: relative; }
.ai-automation-detail-hero__identity { align-items: center; display: flex; gap: 20px; min-width: 0; position: relative; z-index: 1; }
.ai-automation-detail-hero h1 { color: #fff; font-size: 30px; font-weight: 500; letter-spacing: -.03em; margin: 5px 0 7px; }
.ai-automation-detail-hero p { color: rgba(255,255,255,.7); font-size: 12px; margin: 0; }
.ai-automation-detail-hero__status { align-items: flex-end; display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.ai-automation-detail-hero__status small { color: rgba(255,255,255,.66); font-size: 10px; }
.ai-automation-kpis--detail { margin-top: -17px; }
.ai-automation-process-meta { background: #fff; border: 1px solid var(--automation-line); border-radius: 16px; display: grid; gap: 0; grid-template-columns: repeat(6, 1fr); margin-bottom: 22px; padding: 16px 8px; }
.ai-automation-process-meta > div { border-right: 1px solid #e5efed; min-width: 0; padding: 2px 14px; }
.ai-automation-process-meta > div:last-child { border-right: 0; }
.ai-automation-process-meta small,
.ai-automation-process-meta strong { display: block; }
.ai-automation-process-meta small { color: var(--automation-muted); font-size: 8.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.ai-automation-process-meta strong { color: var(--automation-ink); font-size: 10.5px; font-weight: 600; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ai-automation-inspector { background: #fff; border: 1px solid var(--automation-line); border-radius: 22px; box-shadow: var(--automation-shadow); margin-top: 22px; overflow: hidden; }
.ai-automation-inspector > header { align-items: center; border-bottom: 1px solid var(--automation-line); display: flex; justify-content: space-between; padding: 23px 28px; }
.ai-automation-inspector h2 { font-size: 22px; font-weight: 500; margin: 4px 0; }
.ai-automation-inspector header p { color: var(--automation-muted); font-size: 11px; margin: 0; }
.ai-automation-inspector header button { align-items: center; background: #f1f8f6; border: 1px solid #d6e9e5; border-radius: 10px; color: var(--automation-teal); display: inline-flex; height: 38px; justify-content: center; width: 38px; }
.ai-automation-inspector__summary { background: #f9fcfb; border-bottom: 1px solid var(--automation-line); display: grid; grid-template-columns: repeat(4, 1fr); padding: 17px 28px; }
.ai-automation-inspector__summary > div { border-right: 1px solid #e1edeb; padding: 0 18px; }
.ai-automation-inspector__summary > div:first-child { padding-left: 0; }
.ai-automation-inspector__summary > div:last-child { border-right: 0; }
.ai-automation-inspector__summary small,
.ai-automation-inspector__summary strong { display: block; }
.ai-automation-inspector__summary small { color: var(--automation-muted); font-size: 8.5px; font-weight: 700; letter-spacing: .08em; margin-bottom: 6px; text-transform: uppercase; }
.ai-automation-inspector__summary strong { color: var(--automation-ink); font-size: 11px; }
.ai-automation-issue { align-items: flex-start; background: #fff6f1; border: 1px solid #f2d9ca; border-radius: 13px; color: #a65b30; display: flex; gap: 11px; margin: 20px 28px 0; padding: 14px; }
.ai-automation-issue > i { font-size: 17px; margin-top: 2px; }
.ai-automation-issue small { display: block; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ai-automation-issue p { font-size: 11px; margin: 3px 0 0; }
.ai-automation-data-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 22px 28px 28px; }
.ai-automation-data-grid article { background: #f8fbfa; border: 1px solid #e0ece9; border-radius: 12px; min-width: 0; padding: 14px 15px; }
.ai-automation-data-grid small { color: var(--automation-teal-dark); display: block; font-size: 9px; font-weight: 700; letter-spacing: .06em; margin-bottom: 7px; overflow-wrap: anywhere; text-transform: uppercase; }
.ai-automation-data-grid pre { background: transparent; border: 0; color: #4d6c72; font-family: "DM Sans", "Quicksand", sans-serif; font-size: 10.5px; line-height: 1.5; margin: 0; overflow-wrap: anywhere; padding: 0; white-space: pre-wrap; word-break: break-word; }
.ai-automation-footer { margin: 0; }

@media (max-width: 1100px) {
    .ai-automation-kpis { grid-template-columns: repeat(2, 1fr); }
    .ai-automation-process-meta { grid-template-columns: repeat(3, 1fr); }
    .ai-automation-process-meta > div:nth-child(3) { border-right: 0; }
    .ai-automation-process-meta > div:nth-child(-n+3) { border-bottom: 1px solid #e5efed; padding-bottom: 12px; }
    .ai-automation-process-meta > div:nth-child(n+4) { padding-top: 12px; }
}

@media (max-width: 760px) {
    .ai-automation-shell { padding: 84px 13px 60px; }
    .ai-automation-hero { align-items: flex-start; flex-wrap: wrap; padding: 27px 23px; }
    .ai-automation-hero__icon { flex-basis: 56px; font-size: 23px; height: 56px; }
    .ai-automation-hero h1 { font-size: 27px; }
    .ai-automation-hero .ai-automation-button { margin-left: 80px; }
    .ai-automation-kpis { gap: 10px; grid-template-columns: 1fr 1fr; margin: -12px 10px 18px; }
    .ai-automation-kpi { min-height: 92px; padding: 13px; }
    .ai-automation-kpi__icon { display: none; }
    .ai-automation-kpi strong { font-size: 24px; }
    .ai-automation-panel__header { align-items: flex-start; gap: 12px; padding: 21px 18px; }
    .ai-automation-panel__header h2 { font-size: 21px; }
    .ai-automation-panel__header p { display: none; }
    .ai-automation-filters { grid-template-columns: 1fr; padding: 15px 18px; }
    .ai-automation-table-wrap { padding-left: 8px; padding-right: 8px; }
    .ai-automation-detail-hero { align-items: flex-start; flex-direction: column; gap: 18px; padding: 26px 22px; }
    .ai-automation-detail-hero__icon { flex-basis: 54px; font-size: 22px; height: 54px; }
    .ai-automation-detail-hero h1 { font-size: 24px; }
    .ai-automation-detail-hero__status { align-items: flex-start; margin-left: 74px; }
    .ai-automation-process-meta { grid-template-columns: repeat(2, 1fr); }
    .ai-automation-process-meta > div { border-bottom: 1px solid #e5efed; border-right: 1px solid #e5efed !important; padding: 11px 12px !important; }
    .ai-automation-process-meta > div:nth-child(even) { border-right: 0 !important; }
    .ai-automation-process-meta > div:nth-last-child(-n+2) { border-bottom: 0; }
    .ai-automation-inspector__summary { grid-template-columns: repeat(2, 1fr); gap: 15px 0; }
    .ai-automation-inspector__summary > div { border-bottom: 1px solid #e1edeb; }
    .ai-automation-inspector__summary > div:nth-child(even) { border-right: 0; }
    .ai-automation-inspector__summary > div:nth-last-child(-n+2) { border-bottom: 0; }
    .ai-automation-data-grid { grid-template-columns: 1fr; padding: 17px; }
}
