/* ═══════════════════════════════════════════════════════
   WPMAT Admin — Morphic Light × Telegram v2.3.1
   Minimalist · Compact · One-screen
   ═══════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.toplevel_page_wpmat .update-nag,
.toplevel_page_wpmat .notice:not(.wpmat-notice),
.toplevel_page_wpmat .error:not(.wpmat-notice-error),
.toplevel_page_wpmat .updated,
.toplevel_page_wpmat .notice-warning,
.toplevel_page_wpmat .notice-success,
.toplevel_page_wpmat .notice-info { display: none !important; }

:root {
    --wm-bg: #f9fafb;
    --wm-surface: #ffffff;
    --wm-surface2: #f3f4f6;
    --wm-border: #e5e7eb;
    --wm-border-hover: #d1d5db;
    --wm-accent: #3390ec;
    --wm-accent-dim: rgba(51,144,236,0.1);
    --wm-accent-glow: rgba(51,144,236,0.2);
    --wm-text: #0f172a;
    --wm-text2: #475569;
    --wm-text3: #64748b;
    --wm-green: #10b981;
    --wm-red: #ef4444;
    --wm-radius: 12px;
    --wm-radius-sm: 8px;
    --wm-font: 'Inter',-apple-system,BlinkMacSystemFont,sans-serif;
    --wm-mono: 'SF Mono',ui-monospace,Menlo,monospace;
    --wm-transition: 0.2s ease;
}

/* ── Wrapper ─────────────────────────────────────────── */
.wpmat-wrap {
    max-width: 720px;
    margin: 12px auto;
    font-family: var(--wm-font);
    -webkit-font-smoothing: antialiased;
    color: var(--wm-text);
}

/* ── Header ──────────────────────────────────────────── */
.wpmat-header {
    background: transparent;
    border: none;
    padding: 10px 4px 20px 4px;
    margin-bottom: 0;
    box-shadow: none;
}

.wpmat-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wpmat-header-logo {
    width: auto;
    height: 32px;
    max-width: 140px;
    object-fit: contain;
    margin-bottom: 6px;
    align-self: flex-start;
}

.wpmat-header-text h1 {
    color: var(--wm-text);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.wpmat-subtitle {
    margin: 0;
    font-size: 12px;
    color: var(--wm-text3);
    font-weight: 400;
}

/* ── Topbar (Support + Save) ─────────────────────────── */
.wpmat-topbar {
    display: flex;
    align-items: center;
    background: var(--wm-surface);
    border: 1px solid var(--wm-border);
    border-radius: var(--wm-radius);
    margin-bottom: 12px;
    padding: 10px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.wpmat-topbar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.wpmat-support-icon {
    font-size: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--wm-accent-dim);
    border: 1px solid rgba(51,144,236,0.15);
}

.wpmat-support-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--wm-text2);
}

.wpmat-support-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--wm-accent);
    text-decoration: none;
    background: var(--wm-accent-dim);
    padding: 3px 8px;
    border-radius: 4px;
}
.wpmat-support-link:hover { text-decoration: underline; background: rgba(51,144,236,0.15); }

.wpmat-submit-wrapper { margin: 0; padding: 0; display: inline-flex; }

.wpmat-btn {
    background: var(--wm-accent) !important;
    border: none !important;
    border-radius: var(--wm-radius-sm) !important;
    padding: 7px 18px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    font-family: var(--wm-font) !important;
    color: #fff !important;
    cursor: pointer;
    transition: all var(--wm-transition) !important;
    box-shadow: 0 1px 2px rgba(51,144,236,0.3) !important;
    text-shadow: none;
    line-height: normal !important;
    height: auto !important;
}
.wpmat-btn:hover {
    background: #2b82d4 !important;
    box-shadow: 0 0 0 3px var(--wm-accent-glow) !important;
}
.wpmat-btn:active { background: #2574bd !important; }

/* ── Notices ──────────────────────────────────────────── */
.wpmat-notice {
    padding: 10px 14px;
    border-radius: var(--wm-radius-sm);
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 500;
}
.wpmat-notice-success {
    background: rgba(16,185,129,0.1);
    color: #047857;
    border: 1px solid rgba(16,185,129,0.2);
}
.wpmat-notice-error {
    background: rgba(239,68,68,0.1);
    color: #b91c1c;
    border: 1px solid rgba(239,68,68,0.2);
}

/* ── Cards ───────────────────────────────────────────── */
.wpmat-card {
    background: var(--wm-surface);
    border: 1px solid var(--wm-border);
    border-radius: var(--wm-radius);
    padding: 18px 22px;
    margin-bottom: 12px;
    transition: border-color var(--wm-transition), box-shadow var(--wm-transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.wpmat-card:hover { border-color: var(--wm-border-hover); box-shadow: 0 2px 5px rgba(0,0,0,0.04); }

.wpmat-card h2 {
    font-size: 12px;
    font-weight: 600;
    color: var(--wm-text2);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--wm-surface2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Status divider ──────────────────────────────────── */
.wpmat-status-divider {
    height: 1px;
    background: var(--wm-surface2);
    margin: 16px 0 12px;
}

/* ── Help text ───────────────────────────────────────── */
.wpmat-help {
    font-size: 12px;
    color: var(--wm-text3);
    margin: 0 0 10px 0;
    line-height: 1.5;
}
.wpmat-help code {
    background: var(--wm-accent-dim);
    color: var(--wm-accent);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--wm-mono);
}

/* ── Status table ────────────────────────────────────── */
.wpmat-status-table { width: 100%; border-collapse: collapse; }
.wpmat-status-table td {
    padding: 6px 0;
    font-size: 13px;
    border: none;
}
.wpmat-status-table td:first-child {
    color: var(--wm-text3);
    width: 130px;
    font-weight: 500;
    font-size: 12px;
}
.wpmat-status-table code {
    background: var(--wm-surface2);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--wm-text2);
    font-family: var(--wm-mono);
    border: 1px solid var(--wm-border);
}

/* ── Form inputs ─────────────────────────────────────── */
.form-table { margin: 0; }
.form-table th {
    font-weight: 500;
    color: var(--wm-text2);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 12px 8px 0;
    vertical-align: middle;
    width: 80px;
}
.form-table td { padding: 4px 0; }
.form-table input.regular-text {
    width: 100%;
    max-width: 100%;
    padding: 9px 12px;
    border-radius: var(--wm-radius-sm);
    border: 1px solid var(--wm-border);
    background: var(--wm-bg);
    color: var(--wm-text);
    font-family: var(--wm-mono);
    font-size: 13px;
    transition: border-color var(--wm-transition), box-shadow var(--wm-transition);
    box-sizing: border-box;
}
.form-table input.regular-text:focus {
    border-color: var(--wm-accent);
    box-shadow: 0 0 0 3px var(--wm-accent-glow);
    outline: none;
    background: #fff;
}
.form-table input.regular-text::placeholder { color: var(--wm-text3); }
.form-table .description { margin-top: 4px; }
.form-table .description a {
    color: var(--wm-accent);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
}
.form-table .description a:hover { text-decoration: underline; }

/* ── Accordion ───────────────────────────────────────── */
.wpmat-accordion-header {
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    user-select: none;
}
.wpmat-accordion-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--wm-text2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wpmat-arrow {
    font-size: 10px;
    color: var(--wm-text3);
    transition: transform var(--wm-transition);
}

/* ── Toggle ──────────────────────────────────────────── */
.wpmat-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 0;
    background: none;
    border: none;
}
.wpmat-toggle input {
    margin-right: 8px !important;
    width: 16px !important;
    height: 16px !important;
    cursor: pointer;
    accent-color: var(--wm-accent);
}
.wpmat-toggle-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--wm-text);
}

/* ── Status blocks ───────────────────────────────────── */
.wpmat-status-block {
    background: var(--wm-surface2);
    border: 1px solid var(--wm-border);
    border-radius: var(--wm-radius-sm);
    padding: 8px 12px;
    margin-bottom: 6px;
    transition: border-color var(--wm-transition);
}
.wpmat-status-block:hover { border-color: var(--wm-border-hover); background: #fff; }
.wpmat-status-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.wpmat-status-header label { font-size: 13px !important; font-weight: 500; }
.wpmat-status-header label strong {
    font-size: 13px !important;
    color: var(--wm-text) !important;
}
.wpmat-status-header code {
    font-size: 11px !important;
    background: var(--wm-surface) !important;
    color: var(--wm-text3) !important;
    padding: 2px 6px !important;
    border: 1px solid var(--wm-border) !important;
    border-radius: 4px !important;
}

/* ── Textareas ───────────────────────────────────────── */
.wpmat-status-body textarea {
    border-radius: var(--wm-radius-sm) !important;
    border: 1px solid var(--wm-border) !important;
    background: var(--wm-surface) !important;
    color: var(--wm-text) !important;
    font-family: var(--wm-mono) !important;
    font-size: 12px !important;
    padding: 10px 12px !important;
    line-height: 1.5 !important;
    resize: vertical;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}
.wpmat-status-body textarea:focus {
    border-color: var(--wm-accent) !important;
    box-shadow: 0 0 0 3px var(--wm-accent-glow) !important;
    outline: none;
}

/* ── Checkbox ────────────────────────────────────────── */
.wpmat-status-block input[type="checkbox"] {
    accent-color: var(--wm-accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ── Links ───────────────────────────────────────────── */
.wpmat-card a {
    color: var(--wm-accent);
    font-weight: 500;
    text-decoration: none;
    font-size: 12px;
}
.wpmat-card a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
    .wpmat-wrap { margin: 12px; }
    .wpmat-topbar-left { flex-direction: column; align-items: flex-start; gap: 8px; }
}
