/* Tool page styles -- extracted from the design mockup. */

:root {
    --tp-bg: #F8F9FC;
    --tp-surface: #FFFFFF;
    --tp-text: #1A1D26;
    --tp-text-secondary: #5B6178;
    --tp-text-muted: #6E7490;
    --tp-text-light: #9198AE;
    --tp-accent: #3B5BDB;
    --tp-accent-dark: #2E4BB0;
    --tp-accent-light: #EBF0FF;
    --tp-accent-hover: #3350C4;
    --tp-border: #E2E5F0;
    --tp-border-light: #ECEEF5;
    --tp-radius: 12px;
    --tp-radius-sm: 8px;
}

.breadcrumb-nav {
    max-width: 1400px; margin: 0 auto; padding: 16px 32px 0;
    font-size: 13px; color: var(--tp-text-light);
}
.breadcrumb-nav a { color: var(--tp-text-secondary); text-decoration: none; }
.breadcrumb-nav a:hover { color: var(--tp-accent); text-decoration: underline; }
.breadcrumb-nav .sep { margin: 0 6px; color: var(--tp-text-light); }

.page-layout {
    max-width: 1400px; margin: 0 auto; padding: 24px 32px 80px;
    display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start;
}
.page-main { min-width: 0; }

.tool-hero {
    background: var(--tp-surface);
    border: 1.5px solid var(--tp-border);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 48px;
    box-shadow: 0 4px 20px rgba(59,91,219,0.10);
}
.tool-hero-header { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.tool-hero-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0;
}
.tool-hero h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; color: var(--tp-text); }
.tool-hero-subtitle { font-size: 15px; color: var(--tp-text-secondary); margin-bottom: 32px; margin-top: 4px; }
.tool-hero-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.action-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
    font-family: inherit; font-size: 13px; font-weight: 600;
    border: 1.5px solid var(--tp-border); border-radius: var(--tp-radius-sm);
    background: transparent; color: var(--tp-text-secondary); cursor: pointer; transition: all 0.2s;
}
.action-btn:hover { border-color: var(--tp-accent); color: var(--tp-accent); background: var(--tp-accent-light); }
.action-btn svg { width: 16px; height: 16px; }

.upload-zone {
    border: 2.5px dashed var(--tp-border);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    background: var(--tp-bg);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--tp-accent);
    background: var(--tp-accent-light);
}
.upload-zone-icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    background: var(--tp-accent-light); border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
}
.upload-zone-icon svg { width: 28px; height: 28px; color: var(--tp-accent); }
.upload-zone h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--tp-text); }
.upload-zone p { font-size: 14px; color: var(--tp-text-secondary); margin-bottom: 16px; }
.upload-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--tp-accent); color: #fff; border: none;
    padding: 12px 28px; border-radius: 50px;
    font-family: inherit; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: all 0.2s;
}
.upload-btn:hover { background: var(--tp-accent-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(59,91,219,0.3); }
.upload-limits { font-size: 12px; color: var(--tp-text-light); margin-top: 12px; }

.page-sidebar { position: sticky; top: 88px; }
.sidebar-card {
    background: var(--tp-surface); border: 1.5px solid var(--tp-border);
    border-radius: var(--tp-radius); padding: 24px; margin-bottom: 20px;
}
.sidebar-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; color: var(--tp-text); }
.sidebar-toc a {
    display: block; padding: 7px 0; font-size: 13px; color: var(--tp-text-secondary);
    text-decoration: none; border-bottom: 1px solid var(--tp-border-light); transition: color 0.2s;
}
.sidebar-toc a:last-child { border-bottom: none; }
.sidebar-toc a:hover { color: var(--tp-accent); }
.related-list a {
    display: flex; align-items: center; gap: 10px; padding: 10px 0;
    font-size: 14px; color: var(--tp-text); text-decoration: none;
    border-bottom: 1px solid var(--tp-border-light); transition: color 0.2s; font-weight: 600;
}
.related-list a:last-child { border-bottom: none; }
.related-list a:hover { color: var(--tp-accent); }
.related-icon {
    width: 34px; height: 34px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}

.article h2 {
    font-size: 24px; font-weight: 800; letter-spacing: -0.3px;
    color: var(--tp-text); margin-bottom: 16px; margin-top: 48px;
    padding-top: 32px; border-top: 1.5px solid var(--tp-border-light);
}
.article h2:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.article h3 { font-size: 18px; font-weight: 700; color: var(--tp-text); margin-bottom: 10px; margin-top: 28px; }
.article p { font-size: 16px; line-height: 1.75; color: var(--tp-text-secondary); margin-bottom: 16px; }
.article ul, .article ol { margin-bottom: 16px; padding-left: 24px; }
.article li { font-size: 16px; line-height: 1.75; color: var(--tp-text-secondary); margin-bottom: 6px; }
.article strong { color: var(--tp-text); font-weight: 700; }
.info-box {
    background: var(--tp-accent-light); border-left: 4px solid var(--tp-accent);
    border-radius: 0 var(--tp-radius-sm) var(--tp-radius-sm) 0; padding: 18px 22px; margin: 24px 0;
}
.info-box p { font-size: 14px; color: var(--tp-accent-dark); margin-bottom: 0; }
.steps-box {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0;
}
.step-item {
    background: var(--tp-surface); border: 1.5px solid var(--tp-border); border-radius: var(--tp-radius);
    padding: 24px 20px; text-align: center;
}
.step-num {
    width: 36px; height: 36px; background: var(--tp-accent); color: #fff;
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 800; margin-bottom: 12px;
}
.step-item h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; color: var(--tp-text); }
.step-item p { font-size: 13px; color: var(--tp-text-secondary); margin: 0; line-height: 1.5; }

.faq-section { margin-bottom: 48px; }
.faq-section h2 {
    font-size: 24px; font-weight: 800; margin-bottom: 20px;
    padding-top: 32px; border-top: 1.5px solid var(--tp-border-light); color: var(--tp-text);
}
.faq-item {
    background: var(--tp-surface); border: 1.5px solid var(--tp-border);
    border-radius: var(--tp-radius); margin-bottom: 12px; overflow: hidden;
}
.faq-question {
    width: 100%; padding: 18px 22px; font-family: inherit;
    font-size: 15px; font-weight: 700; color: var(--tp-text); background: transparent;
    border: none; cursor: pointer; text-align: left;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    transition: background 0.2s;
}
.faq-question:hover { background: var(--tp-bg); }
.faq-arrow { flex-shrink: 0; width: 20px; height: 20px; color: var(--tp-text-light); transition: transform 0.2s; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer-inner { padding: 0 22px 18px; font-size: 15px; line-height: 1.7; color: var(--tp-text-secondary); }

#fileList { margin-top: 24px; }
#fileList .fl-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--tp-text); }
#fileItems { display: flex; flex-direction: column; gap: 8px; }
.fl-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; background: var(--tp-bg);
    border: 1.5px solid var(--tp-border-light); border-radius: var(--tp-radius-sm);
}
.fl-item .fl-name { flex: 1; min-width: 0; }
.fl-item .fl-name b { font-size: 14px; font-weight: 600; color: var(--tp-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.fl-item .fl-name span { font-size: 12px; color: var(--tp-text-light); }
.fl-item .fl-remove { background: none; border: none; color: var(--tp-text-light); cursor: pointer; font-size: 18px; padding: 4px; }
#mergeBtn, .tool-action-btn {
    width: 100%; padding: 14px; margin-top: 16px;
    background: var(--tp-accent); color: #fff; border: none;
    border-radius: var(--tp-radius-sm);
    font-family: inherit; font-size: 16px; font-weight: 700;
    cursor: pointer; transition: all 0.2s;
}
#mergeBtn:hover, .tool-action-btn:hover { background: var(--tp-accent-hover); transform: translateY(-1px); }

@media (max-width: 1024px) {
    .page-layout { grid-template-columns: 1fr; }
    .page-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .sidebar-card { margin-bottom: 0; }
    .steps-box { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .breadcrumb-nav { padding: 12px 20px 0; }
    .page-layout { padding: 20px 20px 60px; gap: 32px; }
    .tool-hero { padding: 24px 18px; }
    .tool-hero h1 { font-size: 22px; }
    .tool-hero-header { flex-wrap: wrap; }
    .tool-hero-actions { width: 100%; margin-left: 0; margin-top: 12px; }
    .action-btn { flex: 1; justify-content: center; }
    .page-sidebar { grid-template-columns: 1fr; }
}

/* ---- Compact upload zone + progress UI (Phase 7) ---- */
.upload-zone .upload-zone-compact { display: none; }
.upload-zone.is-compact { padding: 14px 18px; cursor: default; text-align: left; background: #f8fafc; border-style: solid; }
.upload-zone.is-compact:hover { background: #f8fafc; border-color: var(--tp-border, #e5e7eb); }
.upload-zone.is-compact .upload-zone-full { display: none; }
.upload-zone.is-compact .upload-zone-compact {
    display: flex; align-items: center; gap: 14px;
}
.uz-compact-icon { font-size: 24px; line-height: 1; }
.uz-compact-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.uz-compact-meta strong { font-size: 14px; color: var(--tp-text, #111827); }
.uz-compact-meta span { font-size: 12px; color: var(--tp-text-light, #6b7280); }
.uz-compact-actions { display: flex; gap: 12px; flex-shrink: 0; }
.uz-link { background: none; border: none; color: var(--tp-accent, #6366f1); font-weight: 600; cursor: pointer; font-size: 13px; padding: 4px 0; }
.uz-link:hover { text-decoration: underline; }
.uz-link-danger { color: #b91c1c; }

.fl-item .fl-icon { font-size: 20px; }
.tool-action-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.tool-progress { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.tp-row { opacity: 0.55; transition: opacity 0.25s; }
.tp-row.is-active, .tp-row.is-done, .tp-row.is-failed { opacity: 1; }
.tp-row-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 6px;
}
.tp-row-title {
    font-size: 13px; font-weight: 600; color: var(--tp-text, #111827);
    display: inline-flex; align-items: center; gap: 6px;
}
.tp-row.is-done .tp-row-title::after { content: '\2713'; color: #10b981; font-weight: 700; margin-left: 6px; }
.tp-row.is-failed .tp-row-title::after { content: '\2715'; color: #dc2626; font-weight: 700; margin-left: 6px; }
.tp-row-meta { font-size: 12px; color: var(--tp-text-light, #6b7280); font-variant-numeric: tabular-nums; }

.tp-bar {
    position: relative; height: 10px; background: #eef2ff;
    border-radius: 999px; overflow: hidden;
}
.tp-bar-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.25s ease-out;
    border-radius: 999px;
}
.tp-row.is-done .tp-bar-fill { background: linear-gradient(90deg, #10b981, #059669); }
.tp-row.is-failed .tp-bar-fill { background: linear-gradient(90deg, #ef4444, #dc2626); }

.tool-status { margin-top: 12px; font-size: 13px; color: var(--tp-text, #374151); }
.tool-status.is-err { color: #b91c1c; }
.tool-status.is-ok  { color: #047857; }

/* ---------- Progress modal ---------- */
.tp-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.tp-modal.is-open { display: flex; }
.tp-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: tpFadeIn 180ms ease-out;
}
.tp-modal-dialog {
    position: relative;
    width: 100%; max-width: 440px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    padding: 28px 28px 22px;
    animation: tpPop 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes tpFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes tpPop    { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }

.tp-stage {
    position: relative;
    width: 160px; height: 160px;
    margin: 0 auto 6px;
}
.tp-lottie {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}
.tp-lottie svg { width: 100% !important; height: 100% !important; display: block; }

.tp-title {
    text-align: center;
    font-size: 18px; font-weight: 600;
    color: #0f172a;
    margin: 4px 0 18px;
}
.tp-modal .tp-row { margin-bottom: 12px; }
.tp-modal .tp-row:last-of-type { margin-bottom: 0; }

.tp-close-btn {
    display: block; margin: 16px auto 0;
    padding: 10px 24px;
    border: none; border-radius: 8px;
    background: #1f2937; color: #fff;
    font-size: 14px; font-weight: 500;
    cursor: pointer;
    transition: background 120ms ease;
}
.tp-close-btn:hover { background: #111827; }

/* Hide the inline old-style status when in modal context (modal has its own) */
.tp-modal .tool-status {
    text-align: center;
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f9fafb;
}
.tp-modal .tool-status.is-err {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.tp-modal .tool-status.is-ok {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Stage transition: fade between lotties */
.tp-lottie { transition: opacity 250ms ease; }

/* ---------- Watermark-PDF options panel ---------- */
.wm-panel { margin-top: 18px; padding: 18px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; }
.wm-grid { display: grid; grid-template-columns: minmax(260px, 1.1fr) minmax(220px, 1fr); gap: 22px; }
@media (max-width: 720px) { .wm-grid { grid-template-columns: 1fr; } }

.wm-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #374151; }
.wm-field > span { font-weight: 500; }
.wm-field > span em { font-style: normal; color: #6b7280; font-weight: 400; }
.wm-field input[type="text"], .wm-field select {
    padding: 9px 10px; border: 1px solid #d1d5db; border-radius: 7px; font-size: 14px; background: #fff;
}
.wm-row-2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 12px; }
@media (max-width: 520px) { .wm-row-2 { grid-template-columns: 1fr 1fr; } }

.wm-controls > .wm-field + .wm-field { margin-top: 12px; }

/* 3x3 position grid */
.wm-pos-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
    width: 132px; aspect-ratio: 1; padding: 4px;
    background: #fff; border: 1px solid #d1d5db; border-radius: 8px;
}
.wm-pos-cell {
    border: 1px solid transparent; background: #f3f4f6; border-radius: 5px;
    font-size: 16px; color: #6b7280; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 100ms ease;
}
.wm-pos-cell:hover { background: #e5e7eb; color: #1f2937; }
.wm-pos-cell.is-active { background: #2563eb; color: #fff; border-color: #1d4ed8; }
.wm-tile-toggle {
    margin-top: 8px; padding: 8px 12px; width: 100%; max-width: 220px;
    border: 1px solid #d1d5db; background: #fff; border-radius: 7px;
    font-size: 13px; color: #374151; cursor: pointer; text-align: left;
    display: inline-flex; align-items: center; gap: 8px;
}
.wm-tile-toggle:hover { background: #f3f4f6; }
.wm-tile-toggle.is-active { background: #2563eb; color: #fff; border-color: #1d4ed8; }
.wm-tile-icon { font-size: 16px; }

/* Color chips */
.wm-color-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wm-chip {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid #fff; outline: 1px solid #d1d5db; cursor: pointer; padding: 0;
    transition: transform 120ms ease;
}
.wm-chip:hover { transform: scale(1.08); }
.wm-chip.is-active { outline: 2px solid #2563eb; outline-offset: 1px; }
.wm-chip-custom {
    position: relative; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
    overflow: hidden;
}
.wm-chip-custom input[type="color"] {
    position: absolute; inset: -4px; opacity: 0; cursor: pointer; width: 36px; height: 36px;
}
.wm-hex-input {
    padding: 7px 9px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px;
    width: 100px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #fff;
}

/* Preview -- fixed pixel dimensions + CSS-only default so it's bulletproof */
.wm-preview-wrap { display: block; }
.wm-preview-label { font-size: 12px; font-weight: 500; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; text-align: center; }
.wm-preview {
    position: relative;
    width: 220px; height: 285px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #d1d5db; border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
}
.wm-preview-page { position: absolute; inset: 0; padding: 22px; }
.wm-preview-lines {
    position: absolute; top: 22px; left: 22px; right: 22px; bottom: 22px;
    display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.wm-preview-lines i { display: block; height: 6px; background: #e5e7eb; border-radius: 2px; width: 100%; }
.wm-preview-lines i:nth-child(3) { width: 80%; }
.wm-preview-lines i:nth-child(6) { width: 70%; }
.wm-preview-lines i:nth-child(9) { width: 60%; }

/* CSS-defaults so the mark is visible even if JS hasn't styled it yet */
.wm-preview-mark {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    transform-origin: center center;
    color: #dc2626; opacity: 0.35;
    font-size: 26px; font-weight: 800;
    white-space: nowrap; pointer-events: none;
    z-index: 2;
}
.wm-preview.is-tile .wm-tile-layer {
    position: absolute; inset: 18px;
    display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr);
    gap: 4px; pointer-events: none; z-index: 2;
}
.wm-tile-mark {
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; white-space: nowrap; overflow: hidden; font-size: 12px;
}

/* Mode tabs */
.wm-mode-tabs { display: flex; gap: 6px; margin-bottom: 12px; background: #f3f4f6; padding: 4px; border-radius: 10px; }
.wm-mode-tab {
    flex: 1; padding: 8px 12px; border: 0; background: transparent;
    font-size: 13px; font-weight: 500; color: #6b7280; cursor: pointer;
    border-radius: 7px; transition: all 0.15s;
}
.wm-mode-tab:hover { color: #1f2937; }
.wm-mode-tab.is-active { background: #fff; color: #111827; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* Image picker */
.wm-image-picker {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border: 1px dashed #d1d5db; border-radius: 8px;
    background: #fff; cursor: pointer; color: #4b5563; font-size: 13px;
    transition: border-color 0.15s;
}
.wm-image-picker:hover { border-color: #2563eb; color: #2563eb; }

/* Page range row */
.wm-row-pages {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-top: 12px; font-size: 13px; color: #374151;
}
.wm-row-label { font-weight: 500; min-width: 50px; }
.wm-range-line { display: inline-flex; align-items: center; gap: 6px; }
.wm-num {
    width: 60px; padding: 6px 8px; font: inherit;
    border: 1px solid #d1d5db; border-radius: 6px; background: #fff;
}
.wm-hint { font-size: 12px; color: #6b7280; flex-basis: 100%; }

/* Layer radio */
.wm-layer-row { display: flex; gap: 16px; flex-wrap: wrap; }
.wm-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #374151; cursor: pointer; }
.wm-radio input[type="radio"] { margin: 0; }

/* Preview foot */
.wm-preview-foot { margin-top: 8px; text-align: center; font-size: 12px; color: #6b7280; }
.wm-preview-foot b { color: #111827; font-weight: 600; }

/* ============ Tool actions (Save / Report) ============ */
.action-btn.ta-save.is-on { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.action-btn.ta-save.is-on svg { fill: #b91c1c; stroke: #b91c1c; }
.action-btn.ta-save svg { fill: none; }

.tool-hero-actions { position: relative; }
.ta-popover {
    position: absolute; top: calc(100% + 10px); right: 0; z-index: 50;
    width: 280px; background: #fff; border: 1px solid var(--tp-border, #E2E5F0);
    border-radius: 12px; padding: 16px; box-shadow: 0 12px 32px rgba(11,16,32,.14);
}
.ta-popover[hidden] { display: none !important; }
.ta-popover-arrow { position:absolute; top:-7px; right:24px; width:12px; height:12px; background:#fff; border-left:1px solid var(--tp-border,#E2E5F0); border-top:1px solid var(--tp-border,#E2E5F0); transform:rotate(45deg); }
.ta-popover strong { display: block; font-size: 15px; color: var(--tp-text, #1A1D26); margin-bottom: 4px; }
.ta-popover p { margin: 0 0 12px; font-size: 13px; color: var(--tp-text-secondary, #5B6178); }
.ta-popover-actions { display: flex; gap: 8px; }
.ta-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; border: 0; cursor: pointer; text-decoration: none; transition: all .15s; }
.ta-btn-primary { background: var(--tp-accent, #3B5BDB); color: #fff; }
.ta-btn-primary:hover { background: var(--tp-accent-hover, #3350C4); }
.ta-btn-ghost { background: var(--tp-border-light, #ECEEF5); color: var(--tp-text, #1A1D26); }
.ta-btn-ghost:hover { background: var(--tp-border, #E2E5F0); }

/* Report modal */
.ta-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ta-modal[hidden] { display: none !important; }
.ta-modal-backdrop { position: absolute; inset: 0; background: rgba(11,16,32,.55); backdrop-filter: blur(2px); }
.ta-modal-dialog { position: relative; background: #fff; border-radius: 14px; max-width: 520px; width: 100%; padding: 24px; box-shadow: 0 24px 60px rgba(0,0,0,.30); max-height: 90vh; overflow-y: auto; }
.ta-modal-dialog h3 { margin: 0 0 6px; font-size: 20px; color: var(--tp-text, #1A1D26); }
.ta-modal-sub { margin: 0 0 18px; font-size: 13px; color: var(--tp-text-secondary, #5B6178); }
.ta-modal-close { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; background: transparent; border: 0; font-size: 24px; line-height: 1; color: var(--tp-text-muted, #6E7490); cursor: pointer; border-radius: 6px; }
.ta-modal-close:hover { background: var(--tp-border-light, #ECEEF5); color: var(--tp-text, #1A1D26); }
.ta-field { display: block; margin-bottom: 14px; }
.ta-field > span { display: block; font-size: 13px; font-weight: 600; color: var(--tp-text, #1A1D26); margin-bottom: 6px; }
.ta-field > span em { color: var(--tp-text-light, #9198AE); font-style: normal; font-weight: 400; font-size: 12px; }
.ta-field input, .ta-field textarea, .ta-field select { width: 100%; padding: 10px 12px; border: 1px solid var(--tp-border, #E2E5F0); border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; color: var(--tp-text, #1A1D26); }
.ta-field input:focus, .ta-field textarea:focus, .ta-field select:focus { outline: none; border-color: var(--tp-accent, #3B5BDB); box-shadow: 0 0 0 3px rgba(59,91,219,.12); }
.ta-field textarea { resize: vertical; }
.ta-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.ta-modal-msg { margin-top: 12px; font-size: 13px; padding: 10px 12px; border-radius: 8px; }
.ta-modal-msg.ok    { background: #dcfce7; color: #166534; }
.ta-modal-msg.err   { background: #fee2e2; color: #991b1b; }
