.ayloti-converter,
.ayloti-converter * { box-sizing: border-box; }

body.ayloti-converter-page .ach-dedicated-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1px 0 48px;
    background: linear-gradient(180deg, #f6f8fc 0, #fbfcff 320px, #ffffff 640px);
}

.ayloti-converter {
    --ach-ink: #263047;
    --ach-muted: #747d92;
    --ach-line: #e7e8f0;
    --ach-soft: #f8f8fb;
    --ach-blue: #7f8fbe;
    --ach-blue-dark: #54648f;
    --ach-lav: #eef1fb;
    --ach-green: #eef7f4;
    --ach-green-ink: #53776a;
    --ach-shadow: 0 22px 65px rgba(65, 72, 104, .085);
    width: min(1240px, calc(100% - 28px));
    margin: 28px auto;
    color: var(--ach-ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ayloti-converter button,
.ayloti-converter input,
.ayloti-converter select,
.ayloti-converter textarea { font: inherit; }

.ach-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: stretch;
    gap: 26px;
    padding: 46px;
    border: 1px solid #e4e5ee;
    border-radius: 30px;
    background:
        radial-gradient(circle at 94% -10%, rgba(191, 201, 228, .26), transparent 36%),
        radial-gradient(circle at 0 110%, rgba(222, 235, 232, .34), transparent 35%),
        linear-gradient(145deg, #ffffff 0%, #f5f7fc 56%, #f3f8f8 100%);
    box-shadow: var(--ach-shadow);
}

.ach-hero::after {
    content: "";
    position: absolute;
    right: 255px;
    top: -55px;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(126, 139, 188, .13);
    border-radius: 50%;
}

.ach-hero-copy,
.ach-hero-side { position: relative; z-index: 1; }

.ach-kicker,
.ach-section-heading span {
    color: var(--ach-blue-dark);
    font-weight: 850;
    font-size: 11px;
    letter-spacing: .14em;
}

.ach-hero h1 {
    margin: 10px 0 12px;
    max-width: 800px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: .98;
    letter-spacing: -.055em;
}

.ach-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--ach-muted);
    font-size: clamp(15px, 2vw, 19px);
    line-height: 1.62;
}

.ach-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

.ach-hero-actions button,
.ach-recent button {
    border: 1px solid #d9e0f0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .88);
    color: var(--ach-ink);
    padding: 9px 13px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: .18s ease;
}

.ach-hero-actions button:hover,
.ach-recent button:hover {
    border-color: #cbd0e6;
    color: var(--ach-blue-dark);
    transform: translateY(-1px);
}

.ach-hero-side {
    display: grid;
    gap: 12px;
    align-content: end;
}

.ach-privacy-pill,
.ach-stat {
    border: 1px solid rgba(219, 226, 239, .9);
    border-radius: 18px;
    background: rgba(255, 255, 255, .77);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 25px rgba(39, 53, 88, .06);
}

.ach-privacy-pill {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 15px;
    color: var(--ach-green-ink);
    font-weight: 800;
    font-size: 12px;
}

.ach-privacy-pill span {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--ach-green);
}

.ach-stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 15px 17px;
}

.ach-stat strong { font-size: 28px; letter-spacing: -.04em; }
.ach-stat span { color: var(--ach-muted); font-size: 12px; font-weight: 700; }

.ach-recent {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 0;
    padding: 11px 14px;
    border: 1px solid var(--ach-line);
    border-radius: 16px;
    background: #fff;
}

.ach-recent > span {
    flex: 0 0 auto;
    color: var(--ach-muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.ach-recent > div { display: flex; flex-wrap: wrap; gap: 7px; }
.ach-recent button { padding: 7px 10px; background: var(--ach-soft); }

.ach-toolbar {
    position: sticky;
    top: 10px;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin: 22px 0 26px;
    padding: 7px;
    border: 1px solid rgba(225, 231, 241, .92);
    border-radius: 19px;
    background: rgba(255, 255, 255, .90);
    backdrop-filter: blur(14px);
    box-shadow: 0 11px 34px rgba(40, 52, 85, .08);
}

.admin-bar .ach-toolbar { top: 42px; }

.ach-search {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
}

.ach-search > span {
    color: #7f889b;
    font-size: 24px;
    transform: rotate(-18deg);
}

.ach-search input {
    width: 100%;
    min-height: 46px;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--ach-ink);
}

.ach-filters {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.ach-filters::-webkit-scrollbar { display: none; }

.ach-filters button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 12px;
    padding: 10px 13px;
    background: transparent;
    color: var(--ach-muted);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.ach-filters button.is-active {
    background: var(--ach-lav);
    color: var(--ach-blue-dark);
}

.ach-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 30px 2px 16px;
}

.ach-section-heading h2 {
    margin: 5px 0 0;
    font-size: clamp(25px, 4vw, 36px);
    line-height: 1.05;
    letter-spacing: -.035em;
}

.ach-section-heading small { color: var(--ach-muted); font-size: 12px; }

.ach-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.ach-card {
    min-width: 0;
    min-height: 188px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 20px;
    border: 1px solid var(--ach-line);
    border-radius: 22px;
    background: #fff;
    color: inherit;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    box-shadow: 0 8px 24px rgba(36, 50, 84, .045);
}

.ach-card:hover,
.ach-card:focus-visible {
    transform: translateY(-4px);
    border-color: #d0d4e8;
    box-shadow: 0 18px 38px rgba(36, 50, 84, .11);
    outline: none;
}

.ach-card-icon {
    display: grid;
    place-items: center;
    min-width: 48px;
    height: 48px;
    padding: 0 10px;
    border-radius: 15px;
    background: var(--ach-lav);
    color: var(--ach-blue-dark);
    font-weight: 900;
    font-size: 14px;
    letter-spacing: -.03em;
}

.ach-card:nth-child(3n+2) .ach-card-icon { background: #edf8f3; color: #26704c; }
.ach-card:nth-child(3n+3) .ach-card-icon { background: #f1effa; color: #716894; }

.ach-card-copy {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 17px;
}

.ach-card strong { font-size: 17px; line-height: 1.22; }
.ach-card small { color: var(--ach-muted); font-size: 12.5px; line-height: 1.5; }

.ach-card-arrow {
    margin-top: auto;
    padding-top: 15px;
    color: #8690a5;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ach-no-results {
    display: grid;
    place-items: center;
    gap: 5px;
    min-height: 180px;
    padding: 35px;
    text-align: center;
    border: 1px dashed #cfd7e6;
    border-radius: 22px;
    background: #fff;
}

.ach-no-results strong { font-size: 18px; }
.ach-no-results span { color: var(--ach-muted); font-size: 13px; }

.ach-workspace {
    padding: 26px;
    border: 1px solid var(--ach-line);
    border-radius: 27px;
    background: #fff;
    box-shadow: var(--ach-shadow);
}

.ach-workspace-head {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    margin-bottom: 23px;
    padding-bottom: 21px;
    border-bottom: 1px solid var(--ach-line);
}

.ach-workspace-title > span {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 8px;
    background: var(--ach-lav);
    color: var(--ach-blue-dark);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .06em;
}

.ach-workspace-head h2 {
    margin: 7px 0 5px;
    font-size: clamp(27px, 4vw, 38px);
    line-height: 1.05;
    letter-spacing: -.035em;
}

.ach-workspace-head p { margin: 0; color: var(--ach-muted); }

.ach-back {
    flex: 0 0 auto;
    border: 1px solid var(--ach-line);
    border-radius: 12px;
    background: var(--ach-soft);
    padding: 10px 13px;
    color: var(--ach-ink);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.ach-workspace-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 22px;
    align-items: start;
}

.ach-workspace-main { min-width: 0; }
.ach-workspace-aside { display: grid; gap: 12px; }

.ach-aside-card {
    padding: 17px;
    border: 1px solid var(--ach-line);
    border-radius: 17px;
    background: var(--ach-soft);
}

.ach-aside-card strong { font-size: 13px; }
.ach-aside-card p,
.ach-aside-card li { color: var(--ach-muted); font-size: 12px; line-height: 1.55; }
.ach-aside-card p { margin: 7px 0 0; }
.ach-aside-card ul { margin: 8px 0 0; padding-left: 18px; }

.ach-tool-panel { margin: 0; }

.ach-dropzone {
    position: relative;
    min-height: 225px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px;
    border: 2px dashed #d4d7e5;
    border-radius: 22px;
    background: linear-gradient(180deg, #fcfcfe, #f7f7fb);
    text-align: center;
    cursor: pointer;
    transition: .18s ease;
}

.ach-dropzone:hover,
.ach-dropzone.is-dragging {
    border-color: var(--ach-blue);
    background: #f4f3fb;
    transform: translateY(-1px);
}

.ach-dropzone input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.ach-drop-icon {
    display: grid;
    place-items: center;
    width: 57px;
    height: 57px;
    border-radius: 18px;
    background: var(--ach-lav);
    color: var(--ach-blue);
    font-size: 31px;
    font-weight: 500;
}

.ach-dropzone strong { margin-top: 4px; font-size: 17px; }
.ach-dropzone small { color: var(--ach-muted); font-size: 12px; }

.ach-browse {
    margin-top: 7px;
    padding: 8px 12px;
    border: 1px solid #e0e1eb;
    border-radius: 10px;
    background: #fff;
    color: var(--ach-blue-dark);
    font-size: 11px;
    font-weight: 850;
}

.ach-file-list { display: grid; gap: 9px; margin-top: 12px; }

.ach-file-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border: 1px solid var(--ach-line);
    border-radius: 14px;
    background: #fff;
}

.ach-file-badge {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    border-radius: 11px;
    background: var(--ach-lav);
    color: var(--ach-blue-dark);
    font-size: 10px;
    font-weight: 900;
}

.ach-file-meta { min-width: 0; display: flex; flex-direction: column; }
.ach-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; font-size: 12px; }
.ach-file-size { margin-top: 2px; color: var(--ach-muted); font-size: 10px; }

.ach-file-order { display: flex; gap: 3px; }
.ach-file-order button,
.ach-file-remove {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--ach-line);
    border-radius: 8px;
    background: var(--ach-soft);
    color: #788299;
    cursor: pointer;
    font-weight: 800;
}

.ach-file-remove:hover { color: #6d648f; background: #f4f3fb; }
.ach-file-order button:hover { color: var(--ach-blue-dark); background: var(--ach-lav); }

.ach-file-summary {
    padding: 8px 2px 0;
    color: var(--ach-muted);
    font-size: 11px;
    text-align: right;
}

.ach-options { display: grid; gap: 13px; margin: 20px 0; }
.ach-options-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ach-options-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ach-options-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.ach-options label { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ach-options label > span { color: #566078; font-size: 11px; font-weight: 850; }

.ach-options input:not([type=range]):not([type=checkbox]):not([type=color]),
.ach-options select {
    width: 100%;
    min-height: 45px;
    padding: 0 12px;
    border: 1px solid #dedfe8 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: var(--ach-ink) !important;
    box-shadow: none !important;
    font-size: 13px;
}

.ach-options input[type=color] {
    width: 100%;
    height: 45px;
    padding: 4px;
    border: 1px solid #dedfe8;
    border-radius: 12px;
    background: #fff;
}

.ach-options input[type=range] { width: 100%; accent-color: var(--ach-blue); }
.ach-options output { color: var(--ach-muted); font-size: 10px; }

.ach-check {
    align-self: end;
    min-height: 45px;
    flex-direction: row !important;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #dedfe8;
    border-radius: 12px;
    background: #fff;
}

.ach-check input { width: 18px; height: 18px; accent-color: var(--ach-blue); }
.ach-check span { color: var(--ach-ink) !important; font-size: 12px !important; }

.ach-tip {
    margin: 18px 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f3f4fa;
    color: #606b88;
    font-size: 12px;
}

.ach-action-row { display: flex; gap: 10px; align-items: center; margin-top: 18px; }

.ach-primary,
.ach-secondary {
    min-height: 48px;
    border-radius: 13px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.ach-primary {
    border: 1px solid var(--ach-blue);
    background: var(--ach-blue);
    color: #fff;
    box-shadow: 0 10px 24px rgba(91, 105, 163, .18);
}

.ach-primary:hover { background: var(--ach-blue-dark); }
.ach-primary:disabled { opacity: .55; cursor: not-allowed; }
.ach-secondary { border: 1px solid var(--ach-line); background: #fff; color: var(--ach-ink); }

.ach-status { min-height: 24px; margin-top: 14px; color: var(--ach-muted); font-size: 12px; }
.ach-status.is-error { color: #6d648f; font-weight: 750; }
.ach-status.is-success { color: #24724b; font-weight: 750; }

.ach-progress { height: 7px; overflow: hidden; border-radius: 999px; background: #ececf3; }
.ach-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--ach-blue); transition: width .18s ease; }

.ach-how,
.ach-faq { margin-top: 54px; }

.ach-how-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ach-how-grid article {
    min-height: 165px;
    padding: 20px;
    border: 1px solid var(--ach-line);
    border-radius: 20px;
    background: #fff;
}

.ach-how-grid b {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 22px;
    border-radius: 10px;
    background: var(--ach-lav);
    color: var(--ach-blue-dark);
    font-size: 13px;
}

.ach-how-grid strong { display: block; font-size: 16px; }
.ach-how-grid p { margin: 7px 0 0; color: var(--ach-muted); font-size: 12px; line-height: 1.55; }

.ach-faq details {
    margin-top: 9px;
    border: 1px solid var(--ach-line);
    border-radius: 15px;
    background: #fff;
}

.ach-faq summary {
    padding: 16px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.ach-faq details p { margin: 0; padding: 0 18px 17px; color: var(--ach-muted); font-size: 12px; line-height: 1.6; }

.ach-footer-note {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding: 15px 3px 0;
    border-top: 1px solid var(--ach-line);
    color: #7d8597;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.ayloti-converter [hidden] { display: none !important; }

@media (max-width: 1080px) {
    .ach-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ach-workspace-layout { grid-template-columns: minmax(0, 1fr) 235px; }
    .ach-options-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 840px) {
    .ach-hero { grid-template-columns: 1fr; padding: 36px; }
    .ach-hero-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ach-privacy-pill { grid-column: 1 / -1; }
    .ach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ach-toolbar { position: static; flex-direction: column; }
    .ach-filters { padding: 0 4px 3px; }
    .ach-workspace-layout { grid-template-columns: 1fr; }
    .ach-workspace-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .ayloti-converter { width: min(100% - 16px, 1240px); margin: 10px auto; }
    .ach-hero { padding: 25px; border-radius: 22px; }
    .ach-hero::after { display: none; }
    .ach-hero-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ach-privacy-pill { grid-column: 1 / -1; }
    .ach-stat { padding: 13px; }
    .ach-stat strong { font-size: 23px; }
    .ach-recent { align-items: flex-start; flex-direction: column; }
    .ach-section-heading { align-items: flex-start; flex-direction: column; }
    .ach-grid { grid-template-columns: 1fr; }
    .ach-card { min-height: 145px; }
    .ach-workspace { padding: 16px; border-radius: 20px; }
    .ach-workspace-head { flex-direction: column; gap: 12px; }
    .ach-workspace-aside { grid-template-columns: 1fr; }
    .ach-options-2,
    .ach-options-3,
    .ach-options-4 { grid-template-columns: 1fr; }
    .ach-action-row { align-items: stretch; flex-direction: column; }
    .ach-primary,
    .ach-secondary { width: 100%; }
    .ach-file-item { grid-template-columns: auto minmax(0, 1fr) auto; }
    .ach-file-order { display: none; }
    .ach-how-grid { grid-template-columns: 1fr; }
    .ach-footer-note { flex-direction: column; }
    .ach-dropzone { min-height: 195px; }
}


/* v1.2.1 — cooler soft palette, no warm/orange accents, cache-busted assets */
.ayloti-converter {
    --ach-mint: #edf5f3;
    --ach-mint-ink: #587567;
    --ach-blush: #f1effa;
    --ach-blush-ink: #716894;
    --ach-sky: #eef4fa;
    --ach-sky-ink: #61768b;
}

.ach-hero {
    box-shadow: 0 24px 70px rgba(72, 78, 108, .08);
}

.ach-hero-actions button,
.ach-recent button,
.ach-card,
.ach-workspace,
.ach-how-grid article,
.ach-faq details,
.ach-file-item {
    box-shadow: 0 10px 30px rgba(72, 78, 108, .045);
}

.ach-card:nth-child(4n+1) .ach-card-icon { background: var(--ach-lav); color: var(--ach-blue-dark); }
.ach-card:nth-child(4n+2) .ach-card-icon { background: var(--ach-mint); color: var(--ach-mint-ink); }
.ach-card:nth-child(4n+3) .ach-card-icon { background: var(--ach-blush); color: var(--ach-blush-ink); }
.ach-card:nth-child(4n+4) .ach-card-icon { background: var(--ach-sky); color: var(--ach-sky-ink); }

.ach-aside-preview-note {
    background: linear-gradient(145deg, #f4f3fa, #f1f7f4);
}

.ach-tip {
    border: 1px solid #e4e5ef;
    background: linear-gradient(135deg, #f6f6fb, #f1f6f4);
}

.ach-preview {
    margin-top: 18px;
    padding: 17px;
    border: 1px solid #e3e4ec;
    border-radius: 20px;
    background: linear-gradient(150deg, #fbfbfd 0%, #f7f7fb 58%, #f3f8f5 100%);
}

.ach-preview-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.ach-preview-head > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ach-preview-head span {
    color: var(--ach-blue-dark);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .13em;
}

.ach-preview-head strong {
    font-size: 15px;
    letter-spacing: -.015em;
}

.ach-preview-head small {
    color: var(--ach-muted);
    font-size: 10px;
    text-align: right;
}

.ach-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
}

.ach-preview-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e3e4ec;
    border-radius: 15px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 8px 20px rgba(72, 78, 108, .045);
}

.ach-preview-frame {
    position: relative;
    height: 145px;
    overflow: hidden;
    display: grid;
    place-items: center;
    padding: 10px;
    background:
        linear-gradient(45deg, #f1f1f5 25%, transparent 25%, transparent 75%, #f1f1f5 75%),
        linear-gradient(45deg, #f1f1f5 25%, #fafafd 25%, #fafafd 75%, #f1f1f5 75%);
    background-position: 0 0, 8px 8px;
    background-size: 16px 16px;
}

.ach-preview-frame img,
.ach-preview-frame canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 5px 18px rgba(53, 59, 83, .14);
    transition: transform .22s ease, filter .22s ease;
}

.ach-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 11px 11px;
}

.ach-preview-meta strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.ach-preview-meta small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ach-muted);
    font-size: 9px;
}

.ach-preview-loading,
.ach-preview-error {
    grid-column: 1 / -1;
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px dashed #d7d9e5;
    border-radius: 14px;
    color: var(--ach-muted);
    font-size: 11px;
    text-align: center;
}

.ach-preview-loading span {
    width: 18px;
    height: 18px;
    border: 2px solid #dfe1eb;
    border-top-color: var(--ach-blue);
    border-radius: 50%;
    animation: ach-preview-spin .75s linear infinite;
}

@keyframes ach-preview-spin { to { transform: rotate(360deg); } }

.ach-primary {
    border-color: #7888c2;
    background: linear-gradient(135deg, #8a98c2, #7383ad);
}

.ach-primary:hover { background: linear-gradient(135deg, #7d8bb8, #65749f); }

.ach-drop-icon {
    background: linear-gradient(145deg, #eef1fb, #eef6f4);
}

.ach-workspace {
    background: linear-gradient(180deg, #ffffff, #fdfdfe);
}

.ach-options input:focus,
.ach-options select:focus,
.ach-search input:focus {
    border-color: #b9c1df !important;
    outline: 3px solid rgba(130, 145, 201, .12) !important;
}

@media (max-width: 1080px) {
    .ach-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .ach-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ach-preview-frame { height: 132px; }
}

@media (max-width: 460px) {
    .ach-preview { padding: 13px; }
    .ach-preview-head { align-items: flex-start; flex-direction: column; }
    .ach-preview-head small { text-align: left; }
    .ach-preview-grid { grid-template-columns: 1fr; }
    .ach-preview-frame { height: 190px; }
}

.ach-preview-card.is-excluded {
    opacity: .48;
    border-color: #e4e2f0;
    background: #f7f7fc;
}

.ach-preview-card.is-excluded .ach-preview-frame::after {
    content: "REMOVED";
    position: absolute;
    inset: auto 9px 9px;
    z-index: 3;
    padding: 5px 7px;
    border-radius: 7px;
    background: rgba(98, 105, 147, .9);
    color: #fff;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .08em;
    text-align: center;
}

.ach-preview-order {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    display: grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    padding: 0 7px;
    border: 1px solid rgba(255,255,255,.82);
    border-radius: 999px;
    background: rgba(93, 108, 166, .9);
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    box-shadow: 0 5px 15px rgba(53, 59, 83, .18);
}

.ach-preview-watermark {
    position: absolute;
    z-index: 4;
    max-width: 84%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(11px, 1.5vw, 20px);
    font-weight: 900;
    letter-spacing: .06em;
    text-shadow: 0 1px 1px rgba(255,255,255,.8);
    pointer-events: none;
}

.ach-preview-watermark.is-diagonal {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-32deg);
}
.ach-preview-watermark.is-center { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.ach-preview-watermark.is-top { left: 50%; top: 15px; transform: translateX(-50%); }
.ach-preview-watermark.is-bottom { left: 50%; bottom: 15px; transform: translateX(-50%); }

/* v1.3.1 — aggressive override layer to kill theme orange accents */
.ayloti-converter,
.ayloti-converter * { accent-color: var(--ach-blue); }

.ayloti-converter a,
.ayloti-converter a:visited { color: var(--ach-blue-dark); text-decoration-color: rgba(84,100,143,.28); }

.ayloti-converter a:hover,
.ayloti-converter a:focus-visible { color: var(--ach-blue); text-decoration-color: rgba(127,143,190,.45); }

.ayloti-converter button,
.ayloti-converter input[type="button"],
.ayloti-converter input[type="submit"],
.ayloti-converter input[type="reset"] { -webkit-appearance: none; appearance: none; background-image: none !important; }

.ach-primary,
.ach-primary:hover,
.ach-primary:focus,
.ach-primary:active { border-color: #7888c2 !important; background: linear-gradient(135deg, #8a98c2, #7383ad) !important; color: #fff !important; }

.ach-primary:hover,
.ach-primary:focus,
.ach-primary:active { background: linear-gradient(135deg, #7d8bb8, #65749f) !important; }

.ach-secondary,
.ach-secondary:hover,
.ach-secondary:focus,
.ach-secondary:active,
.ach-back,
.ach-back:hover,
.ach-back:focus,
.ach-back:active,
.ach-hero-actions button,
.ach-hero-actions button:hover,
.ach-recent button,
.ach-recent button:hover,
.ach-filters button,
.ach-filters button:hover { color: var(--ach-ink) !important; background-image: none !important; }

.ach-secondary,
.ach-back,
.ach-hero-actions button,
.ach-recent button,
.ach-filters button { border-color: #d9e0f0 !important; background: #fff !important; }

.ach-secondary:hover,
.ach-back:hover,
.ach-hero-actions button:hover,
.ach-recent button:hover,
.ach-filters button:hover { border-color: #cbd3e8 !important; background: #f6f8fd !important; color: var(--ach-blue-dark) !important; }

.ach-filters button.is-active,
.ach-filters button.is-active:hover { background: var(--ach-lav) !important; color: var(--ach-blue-dark) !important; }

.ach-dropzone, .ach-workspace, .ach-preview, .ach-card, .ach-how-grid article, .ach-faq details { background-image: none; }

/* v1.3 — expanded tools and richer previews */
.ach-preview-watermark.is-top-left { left: 13px; top: 13px; }
.ach-preview-watermark.is-top-right { right: 13px; top: 13px; }
.ach-preview-watermark.is-bottom-left { left: 13px; bottom: 13px; }
.ach-preview-watermark.is-bottom-right { right: 13px; bottom: 13px; }

.ach-preview-page-number {
    position: absolute;
    z-index: 5;
    max-width: calc(100% - 20px);
    padding: 3px 6px;
    border: 1px solid rgba(255,255,255,.84);
    border-radius: 7px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 4px 12px rgba(53,59,83,.12);
    font-size: 8px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}
.ach-preview-page-number.is-bottom-center { left: 50%; bottom: 8px; transform: translateX(-50%); }
.ach-preview-page-number.is-bottom-left { left: 8px; bottom: 8px; }
.ach-preview-page-number.is-bottom-right { right: 8px; bottom: 8px; }
.ach-preview-page-number.is-top-center { left: 50%; top: 8px; transform: translateX(-50%); }
.ach-preview-page-number.is-top-left { left: 8px; top: 8px; }
.ach-preview-page-number.is-top-right { right: 8px; top: 8px; }

.ach-text-builder-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr);
    gap: 16px;
    margin-bottom: 18px;
}

.ach-text-input-card,
.ach-text-live-preview {
    padding: 18px;
    border: 1px solid var(--ach-line);
    border-radius: 20px;
    background: linear-gradient(150deg, #ffffff, #f7f9fd);
    box-shadow: 0 10px 30px rgba(72,78,108,.045);
}

.ach-text-input-card {
    display: grid;
    gap: 14px;
}

.ach-text-input-card label {
    display: grid;
    gap: 7px;
}

.ach-text-input-card label > span,
.ach-text-live-preview > span {
    color: var(--ach-blue-dark);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ach-text-input-card input,
.ach-text-input-card textarea {
    width: 100%;
    border: 1px solid #dedfe8;
    border-radius: 13px;
    background: #fff;
    color: var(--ach-ink);
    outline: none;
}

.ach-text-input-card input { min-height: 46px; padding: 0 13px; }
.ach-text-input-card textarea {
    min-height: 285px;
    padding: 14px;
    line-height: 1.6;
    resize: vertical;
}

.ach-text-input-card input:focus,
.ach-text-input-card textarea:focus {
    border-color: #b9c1df;
    outline: 3px solid rgba(130,145,201,.12);
}

.ach-text-live-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(150deg, #f5f7fc, #eef5f3);
}

.ach-text-live-preview article {
    flex: 1;
    min-height: 330px;
    overflow: hidden;
    padding: 32px 28px;
    border: 1px solid #e2e5ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(53,59,83,.09);
}

.ach-text-live-preview h3 {
    margin: 0 0 17px;
    color: #2d354b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    line-height: 1.25;
}

.ach-text-live-preview p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #4f586d;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-wrap;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 18;
}

@media (max-width: 840px) {
    .ach-text-builder-grid { grid-template-columns: 1fr; }
    .ach-text-live-preview article { min-height: 280px; }
}

@media (max-width: 520px) {
    .ach-text-input-card,
    .ach-text-live-preview { padding: 14px; border-radius: 16px; }
    .ach-text-live-preview article { min-height: 240px; padding: 24px 20px; }
}


/* final theme override shield */
body.ayloti-converter-page .ayloti-converter button,
body.ayloti-converter-page .ayloti-converter .ach-primary,
body.ayloti-converter-page .ayloti-converter .ach-secondary,
body.ayloti-converter-page .ayloti-converter .ach-back { box-shadow: none; }

body.ayloti-converter-page .ayloti-converter input:focus,
body.ayloti-converter-page .ayloti-converter select:focus,
body.ayloti-converter-page .ayloti-converter textarea:focus,
body.ayloti-converter-page .ayloti-converter button:focus-visible { outline-color: rgba(130,145,201,.16) !important; }


/* v1.3.2 — hard override for converter card accents: absolutely no orange/warm card boxes */
.ach-card .ach-card-icon,
.ach-card:nth-child(n) .ach-card-icon {
    background: #eef2fb !important;
    color: #5d6ea0 !important;
}

.ach-card:nth-child(4n+2) .ach-card-icon {
    background: #edf5f3 !important;
    color: #587567 !important;
}

.ach-card:nth-child(4n+3) .ach-card-icon {
    background: #eef1f8 !important;
    color: #66739b !important;
}

.ach-card:nth-child(4n+4) .ach-card-icon {
    background: #eef4fa !important;
    color: #61768b !important;
}

.ach-card,
.ach-tool-chip,
.ach-recent button,
.ach-hero-actions button {
    filter: saturate(.96);
}


/* v1.3.3 — theme-proof neutral converter cards */
.ayloti-converter button.ach-card,
.ayloti-converter button.ach-card:hover,
.ayloti-converter button.ach-card:focus,
.ayloti-converter button.ach-card:active {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    border-color: #e3e7f0 !important;
    color: #263047 !important;
}
.ayloti-converter button.ach-card .ach-card-icon,
.ayloti-converter button.ach-card:nth-child(n) .ach-card-icon {
    background: #eef2f8 !important;
    background-color: #eef2f8 !important;
    background-image: none !important;
    border: 1px solid #e1e6f0 !important;
    color: #596b96 !important;
}
