:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f6f8;
    color: #18202a;
}
* { box-sizing: border-box; }
body { margin: 0; }
.login-page {
    min-height: 100vh;
    background: radial-gradient(circle at top, #ffffff 0, #f4f6f8 44%, #edf1f4 100%);
}
.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.login-card {
    width: min(100%, 430px);
    background: rgba(255,255,255,.96);
    border: 1px solid #e3e8ed;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(23, 35, 48, .10);
    padding: 38px;
}
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: #17212b;
    color: #fff;
    font-weight: 800;
    letter-spacing: .06em;
}
.eyebrow {
    margin: 26px 0 6px;
    color: #687581;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 12px;
    font-weight: 700;
}
h1 { margin: 0; font-size: 32px; letter-spacing: -.03em; }
.muted { color: #687581; line-height: 1.6; margin: 10px 0 26px; }
label { display: block; margin: 18px 0 7px; font-size: 14px; font-weight: 700; }
input {
    width: 100%;
    height: 48px;
    border: 1px solid #ccd4dc;
    border-radius: 11px;
    padding: 0 14px;
    background: #fff;
    color: #18202a;
    font: inherit;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus { border-color: #657687; box-shadow: 0 0 0 4px rgba(101,118,135,.12); }
button {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 11px;
    margin-top: 24px;
    background: #17212b;
    color: #fff;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}
button:hover { background: #253443; }
.alert { margin: 18px 0; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.alert-error { background: #fff0f0; color: #8f2727; border: 1px solid #f1c7c7; }
.alert-success { background: #eef9f1; color: #22653a; border: 1px solid #c8e8d2; }
.login-footer { margin: 26px 0 0; text-align: center; color: #8a949e; font-size: 12px; }
@media (max-width: 520px) {
    .login-shell { padding: 14px; }
    .login-card { padding: 28px 22px; border-radius: 18px; }
}

/* ===== MKC Admin V2 / Update 002 ===== */
.admin-body { background:#f4f6f8; color:#18202a; min-height:100vh; }
.app-shell { min-height:100vh; }
.sidebar { position:fixed; inset:0 auto 0 0; width:238px; background:#17212b; color:#fff; padding:24px 18px; display:flex; flex-direction:column; z-index:20; }
.sidebar-brand { color:#fff; text-decoration:none; display:flex; align-items:center; gap:12px; padding:2px 6px 24px; border-bottom:1px solid rgba(255,255,255,.09); }
.sidebar-brand strong,.sidebar-brand small { display:block; }
.sidebar-brand strong { font-size:15px; }
.sidebar-brand small { color:#9eabb6; margin-top:2px; font-size:11px; }
.sidebar-logo { width:38px; height:38px; display:grid; place-items:center; border-radius:11px; background:#fff; color:#17212b; font-weight:850; font-size:12px; letter-spacing:.05em; }
.sidebar-nav { display:grid; gap:6px; margin-top:22px; }
.nav-item { color:#b8c2ca; text-decoration:none; padding:11px 12px; border-radius:10px; font-size:14px; font-weight:650; }
.nav-item:hover { background:rgba(255,255,255,.07); color:#fff; }
.nav-item.active { background:#fff; color:#17212b; }
.sidebar-foot { margin-top:auto; border-top:1px solid rgba(255,255,255,.09); padding:18px 6px 0; display:grid; gap:6px; font-size:12px; }
.sidebar-user { color:#fff; font-weight:700; overflow:hidden; text-overflow:ellipsis; }
.sidebar-foot a { color:#9eabb6; text-decoration:none; }
.main-content { margin-left:238px; padding:36px 38px 60px; max-width:1680px; }
.narrow-content { max-width:1050px; }
.page-header { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:26px; }
.page-header .eyebrow { margin:0 0 7px; }
.page-header h1 { font-size:30px; }
.page-subtitle { color:#687581; margin:7px 0 0; }
.button { appearance:none; border:0; border-radius:10px; padding:10px 14px; min-height:40px; width:auto; margin:0; display:inline-flex; align-items:center; justify-content:center; text-decoration:none; font:inherit; font-size:13px; font-weight:750; cursor:pointer; }
.button-primary { background:#17212b; color:#fff; }
.button-primary:hover { background:#253443; color:#fff; }
.button-secondary { background:#fff; color:#253443; border:1px solid #dce3e9; }
.button-secondary:hover { background:#f8fafb; }
.button-small { padding:7px 10px; min-height:34px; font-size:12px; }
.button-block { width:100%; height:48px; }
.metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:22px; }
.metric-grid-compact { grid-template-columns:repeat(3,minmax(0,1fr)); }
.metric-card { background:#fff; border:1px solid #e1e7ec; border-radius:15px; padding:19px 20px; box-shadow:0 8px 24px rgba(23,33,43,.035); }
.metric-card span { color:#697681; font-size:12px; font-weight:700; }
.metric-card strong { display:block; margin-top:10px; font-size:26px; letter-spacing:-.035em; }
.metric-card small { display:block; color:#9aa4ad; margin-top:4px; font-size:11px; }
.metric-wide { grid-column:span 2; }
.content-grid { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(320px,.75fr); gap:18px; }
.panel-card { background:#fff; border:1px solid #e1e7ec; border-radius:16px; box-shadow:0 8px 26px rgba(23,33,43,.035); overflow:hidden; }
.panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:20px 22px; border-bottom:1px solid #edf0f3; }
.panel-head h2 { margin:0; font-size:16px; letter-spacing:-.01em; }
.panel-head p { margin:5px 0 0; color:#7a8791; font-size:12px; }
.panel-head a { color:#33475b; text-decoration:none; font-size:12px; font-weight:750; }
.table-wrap { overflow-x:auto; }
.data-table { width:100%; border-collapse:collapse; }
.data-table th,.data-table td { border-bottom:1px solid #edf0f3; padding:13px 15px; text-align:left; white-space:nowrap; font-size:13px; }
.data-table th { background:#fafbfc; color:#73808b; font-size:10px; text-transform:uppercase; letter-spacing:.06em; }
.data-table tr:last-child td { border-bottom:0; }
.data-table tbody tr:hover td { background:#fcfdfe; }
.align-right { text-align:right !important; }
.primary-link { color:#17212b; font-weight:750; text-decoration:none; }
.primary-link:hover { text-decoration:underline; }
.status { display:inline-flex; align-items:center; padding:5px 8px; border-radius:999px; font-size:10px; line-height:1; font-weight:800; }
.status-success { background:#eaf7ee; color:#22663b; }
.status-info { background:#edf5ff; color:#285f91; }
.status-warning { background:#fff5db; color:#8b6214; }
.status-danger { background:#fff0f0; color:#9c3030; }
.status-neutral { background:#edf0f2; color:#5c6871; }
.text-success { color:#267447; font-weight:700; }
.text-danger { color:#a33a3a; font-weight:700; }
.text-warning { color:#8b6214; font-weight:700; }
.empty-cell,.empty-state { color:#89949d; text-align:center; padding:28px !important; }
.activity-list { padding:5px 20px; }
.activity-item { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 2px; border-bottom:1px solid #edf0f3; }
.activity-item:last-child { border-bottom:0; }
.activity-item strong,.activity-item span { display:block; }
.activity-item strong { font-size:13px; }
.activity-item span { color:#85919a; font-size:11px; margin-top:3px; }
.activity-item b { font-size:13px; white-space:nowrap; }
.notice { border-radius:11px; padding:12px 14px; margin:0 0 18px; font-size:13px; line-height:1.45; }
.notice-error { background:#fff1f1; border:1px solid #f2cccc; color:#8f2727; }
.notice-warning { background:#fff8e5; border:1px solid #eddca6; color:#715817; }
.payment-card { padding:24px; }
.payment-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.payment-summary > div { border:1px solid #e4e9ee; border-radius:12px; padding:14px 15px; }
.payment-summary span,.payment-summary strong { display:block; }
.payment-summary span { color:#7a8791; font-size:11px; font-weight:700; margin-bottom:6px; }
.payment-summary strong { font-size:15px; }
.payment-total { background:#f7f9fa; }
.payment-total strong { font-size:22px; }
.confirmation-card { text-align:center; padding:40px 24px; }
.confirmation-card h2 { margin:14px 0 8px; }
.confirmation-card p { color:#687581; }
.confirmation-card .button { margin-top:14px; }
.success-mark { width:52px; height:52px; border-radius:50%; background:#eaf7ee; color:#267447; display:grid; place-items:center; font-size:25px; font-weight:900; margin:0 auto; }
@media (max-width:1100px) {
    .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .metric-grid-compact { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .content-grid { grid-template-columns:1fr; }
}
@media (max-width:760px) {
    .sidebar { position:static; width:auto; padding:14px; }
    .sidebar-brand { padding-bottom:13px; }
    .sidebar-nav { display:flex; overflow-x:auto; margin-top:12px; }
    .nav-item { white-space:nowrap; }
    .sidebar-foot { display:none; }
    .main-content { margin-left:0; padding:24px 15px 40px; }
    .page-header { align-items:flex-start; flex-direction:column; }
    .metric-grid,.metric-grid-compact { grid-template-columns:1fr 1fr; }
    .metric-wide { grid-column:span 2; }
    .payment-summary { grid-template-columns:1fr; }
}
@media (max-width:480px) {
    .metric-grid,.metric-grid-compact { grid-template-columns:1fr; }
    .metric-wide { grid-column:auto; }
    .page-header h1 { font-size:26px; }
}

/* ===== MKC Admin V2 / Update 003: Clientes ===== */
.filter-card { margin-bottom:18px; padding:16px; }
.search-form { display:flex; align-items:center; gap:10px; }
.search-form input { height:42px; margin:0; min-width:280px; flex:1; }
.search-form .button { flex:0 0 auto; }
.table-subline { display:block; margin-top:4px; color:#89949d; font-size:11px; font-weight:500; }
.client-table td:first-child { min-width:210px; }
.profile-grid { display:grid; grid-template-columns:minmax(280px,.8fr) minmax(0,2fr); gap:18px; align-items:stretch; }
.profile-contact-card { height:100%; }
.detail-list { margin:0; padding:8px 22px 18px; }
.detail-list > div { display:grid; grid-template-columns:90px minmax(0,1fr); gap:12px; padding:12px 0; border-bottom:1px solid #edf0f3; }
.detail-list > div:last-child { border-bottom:0; }
.detail-list dt { color:#7a8791; font-size:11px; font-weight:750; }
.detail-list dd { margin:0; color:#253443; font-size:13px; overflow-wrap:anywhere; }
.detail-list a { color:#253443; }
.metric-grid-profile { grid-template-columns:repeat(2,minmax(0,1fr)); margin-bottom:0; height:100%; }
.section-gap { margin-top:18px; }
.notes-cell { max-width:340px; white-space:normal !important; line-height:1.45; }
@media (max-width:980px) {
    .profile-grid { grid-template-columns:1fr; }
}
@media (max-width:640px) {
    .search-form { align-items:stretch; flex-direction:column; }
    .search-form input { min-width:0; }
    .search-form .button { width:100%; }
    .metric-grid-profile { grid-template-columns:1fr 1fr; }
}
@media (max-width:480px) {
    .metric-grid-profile { grid-template-columns:1fr; }
}

/* ===== MKC Admin V2 / Update 004: Alta de clientes ===== */
.client-form-card { overflow:visible; }
.client-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; padding:22px; }
.form-field { min-width:0; }
.form-field-full { grid-column:1 / -1; }
.form-field label { margin:0 0 7px; }
.form-field input,
.form-field textarea { width:100%; border:1px solid #ccd4dc; border-radius:11px; background:#fff; color:#18202a; font:inherit; outline:none; transition:border-color .15s ease,box-shadow .15s ease; box-sizing:border-box; }
.form-field input { height:46px; padding:0 13px; }
.form-field textarea { min-height:92px; padding:12px 13px; resize:vertical; }
.form-field input:focus,
.form-field textarea:focus { border-color:#657687; box-shadow:0 0 0 4px rgba(101,118,135,.12); }
.form-field small { display:block; margin-top:6px; color:#89949d; font-size:11px; line-height:1.45; }
.form-actions { display:flex; justify-content:flex-end; gap:10px; padding:18px 22px; border-top:1px solid #edf0f3; }
.form-actions .button { margin:0; width:auto; }
@media (max-width:640px) {
    .client-form-grid { grid-template-columns:1fr; }
    .form-field-full { grid-column:auto; }
    .form-actions { flex-direction:column-reverse; }
    .form-actions .button { width:100%; }
}

/* ===== MKC Admin V2 / Update 005: Ficha de dominio y correo individual ===== */
.header-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:9px; }
.domain-header { align-items:flex-start; }
.domain-metrics .metric-status { margin-top:12px; min-height:28px; display:flex; align-items:center; }
.domain-metrics .metric-status .status { font-size:11px; }
.domain-profile-grid { grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr); }
.detail-list-wide { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:24px; }
.detail-list-wide > div { grid-template-columns:110px minmax(0,1fr); }
.detail-list-wide .detail-full { grid-column:1 / -1; }
.text-neutral { color:#89949d; font-weight:700; }
.mail-compose-card { overflow:visible; }
.mail-form-grid { grid-template-columns:1fr; }
.form-field textarea.mail-body { min-height:320px; line-height:1.6; }
@media (max-width:980px) {
    .domain-profile-grid { grid-template-columns:1fr; }
    .header-actions { justify-content:flex-start; }
}
@media (max-width:640px) {
    .header-actions { width:100%; }
    .header-actions .button { flex:1 1 100%; }
    .detail-list-wide { grid-template-columns:1fr; }
    .detail-list-wide .detail-full { grid-column:auto; }
}

/* ===== MKC Admin V2 / Update 006: Plantillas de correo ===== */
.notice-success { background:#edf8f1; border:1px solid #cbe7d5; color:#25613d; }
.template-help-card { padding-bottom:18px; }
.template-token-list { display:flex; flex-wrap:wrap; gap:8px; padding:0 22px; }
.template-token-list code { display:inline-flex; align-items:center; min-height:31px; padding:0 10px; border:1px solid #dde4e9; border-radius:8px; background:#f6f8fa; color:#394957; font-size:12px; }
.table-actions { text-align:right; white-space:nowrap; }
.button-small { min-height:34px; padding:7px 11px; font-size:12px; }
.template-form-grid select,
.template-picker-form select { width:100%; height:46px; border:1px solid #ccd4dc; border-radius:11px; background:#fff; color:#18202a; font:inherit; padding:0 12px; box-sizing:border-box; }
.check-row { display:inline-flex !important; align-items:center; gap:9px; cursor:pointer; }
.check-row input { width:17px !important; height:17px !important; margin:0; }
.template-picker-card { overflow:visible; }
.template-picker-form { display:grid; grid-template-columns:minmax(220px,1fr) auto auto; gap:10px; align-items:center; padding:0 22px 22px; }
.button-ghost { background:transparent; border:1px solid transparent; color:#52616d; }
@media (max-width:760px) {
    .template-picker-form { grid-template-columns:1fr; }
    .template-picker-form .button { width:100%; }
}

/* ===== MKC Admin V2 / Update 007: Editor y vista previa de correo ===== */
.template-editor-content { max-width:1500px; }
.template-editor-layout { display:grid; grid-template-columns:minmax(560px,1fr) minmax(430px,.9fr); gap:20px; align-items:start; }
.token-help { margin:0 0 10px; color:#7a8791; font-size:12px; }
.template-token-list.compact-tokens { padding:0; gap:7px; }
.template-token { display:inline-flex; flex-direction:column; align-items:flex-start; gap:2px; padding:7px 10px; border:1px solid #dde4e9; border-radius:9px; background:#f8fafb; color:#2c3a46; cursor:pointer; text-align:left; }
.template-token:hover { background:#eef3f6; border-color:#cbd6de; }
.template-token strong { font-size:11px; font-weight:750; }
.template-token code { padding:0; border:0; background:transparent; color:#74818c; font-size:10px; }
.template-actions { justify-content:space-between; align-items:center; flex-wrap:wrap; }
.test-mail-row,.save-actions { display:flex; gap:9px; align-items:center; }
.test-mail-row input { width:230px; height:40px; border:1px solid #ccd4dc; border-radius:9px; padding:0 11px; box-sizing:border-box; }
.preview-column { position:sticky; top:18px; min-width:0; }
.preview-heading { display:flex; justify-content:space-between; margin:0 0 10px; }
.preview-heading h2 { margin:0; font-size:17px; }
.preview-heading p { margin:4px 0 0; color:#89949d; font-size:11px; }
.dual-preview { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(220px,.7fr); gap:12px; align-items:start; }
.preview-device { min-width:0; }
.device-label { display:block; margin:0 0 6px; color:#7b8791; font-size:10px; font-weight:750; text-transform:uppercase; letter-spacing:.08em; }
.email-preview-frame { overflow:hidden; border:1px solid #dce3e8; border-radius:13px; background:#f2f5f7; box-shadow:0 8px 24px rgba(28,39,49,.06); }
.preview-subject { padding:11px 13px; border-bottom:1px solid #dfe5e9; background:#fff; color:#273541; font-size:12px; font-weight:750; overflow-wrap:anywhere; }
.preview-mail { margin:15px; padding:20px; border:1px solid #e3e8ec; border-radius:12px; background:#fff; color:#283743; font-size:12px; line-height:1.65; overflow-wrap:anywhere; }
.preview-mail small { display:block; margin-bottom:12px; color:#8a959e; font-size:9px; }
.phone-shell { max-width:285px; margin:0 auto; padding:7px; border:1px solid #ccd5dc; border-radius:22px; background:#fff; box-shadow:0 8px 24px rgba(28,39,49,.08); }
.phone-shell .email-preview-frame { border-radius:16px; }
.phone-shell .preview-mail { margin:9px; padding:13px; font-size:10px; }
.phone-shell .preview-subject { padding:9px; font-size:10px; }
@media (max-width:1180px) { .template-editor-layout { grid-template-columns:1fr; } .preview-column { position:static; } }
@media (max-width:720px) { .dual-preview { grid-template-columns:1fr; } .template-actions,.test-mail-row,.save-actions { width:100%; } .test-mail-row input { flex:1; width:auto; } .save-actions .button { flex:1; } }

/* ===== MKC Admin V2 / Update 007a: resumen compacto de variables ===== */
.template-variable-summary .panel-head { align-items:center; }
.variable-help-link { white-space:nowrap; }
.variable-summary-list {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    padding:14px 22px 20px;
}
.variable-summary-chip {
    display:inline-flex;
    align-items:center;
    gap:7px;
    min-height:34px;
    padding:6px 9px;
    border:1px solid #e0e6eb;
    border-radius:9px;
    background:#f8fafb;
    color:#344451;
}
.variable-summary-chip span {
    font-size:11px;
    font-weight:750;
    white-space:nowrap;
}
.variable-summary-chip code {
    padding:0;
    border:0;
    background:transparent;
    color:#7a8791;
    font-size:10px;
    white-space:nowrap;
}
@media (max-width:760px) {
    .template-variable-summary .panel-head { align-items:flex-start; }
    .variable-summary-list { padding:12px 15px 16px; }
    .variable-summary-chip { width:100%; justify-content:space-between; }
}

/* ===== MKC Admin V2 / Update 008 ===== */
.status-notice-1 { background:#f3f8df; color:#63751d; border-color:#dce9a9; }
.status-notice-2 { background:#fff4d6; color:#936a00; border-color:#f1d990; }
.status-notice-3 { background:#fff0ef; color:#b83a32; border-color:#f0c4bf; }
.variable-inline-field { padding-top:2px; }
.variable-inline-head { display:flex; align-items:center; gap:10px; margin-bottom:7px; }
.variable-inline-head label { margin:0; }
.variable-inline-head span { color:#8b96a0; font-size:10px; }
.template-token-list.compact-tokens { display:flex; flex-wrap:wrap; gap:5px; padding:0; }
.template-token-list.compact-tokens .template-token { display:inline-flex; flex-direction:row; align-items:center; min-height:28px; padding:4px 8px; border-radius:999px; }
.template-token-list.compact-tokens .template-token strong { font-size:10px; font-weight:750; line-height:1; }
.cron-health { display:flex; align-items:center; gap:10px; }
.cron-dot { width:10px; height:10px; border-radius:50%; flex:0 0 auto; }
.cron-dot-ok { background:#2f9e62; box-shadow:0 0 0 4px rgba(47,158,98,.12); }
.cron-dot-missing { background:#d9534f; box-shadow:0 0 0 4px rgba(217,83,79,.12); }
.cron-dot-warning { background:#d99b21; box-shadow:0 0 0 4px rgba(217,155,33,.12); }
.report-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.report-card { padding:18px; }
.report-card span { display:block; color:#7b8791; font-size:12px; }
.report-card strong { display:block; margin-top:6px; color:#1c2731; font-size:24px; }
.report-card small { display:block; margin-top:4px; color:#8a959e; font-size:11px; }
.year-money-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; padding:0 22px 22px; }
.year-money-item { padding:14px; border:1px solid #e1e7eb; border-radius:12px; background:#fafbfc; }
.year-money-item span { display:block; color:#7b8791; font-size:11px; }
.year-money-item strong { display:block; margin-top:4px; font-size:18px; }
@media (max-width:1050px) { .report-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:620px) { .report-grid { grid-template-columns:1fr; } .variable-inline-head { align-items:flex-start; flex-direction:column; gap:2px; } }


/* Update 008a: selector de variables compacto */
.template-variable-list--compact,
.template-variable-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 8px 0 14px !important;
}
.template-variable-list--compact > *,
.template-variable-list > *,
.template-variable--compact,
.template-variable,
.variable-chip {
    display: inline-flex !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 10px !important;
    margin: 0 !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}
.template-variable-list--compact > * br,
.template-variable-list > * br,
.template-variable--compact br,
.template-variable br,
.variable-chip br {
    display: none !important;
}


/* Update 008b: corrige regla global button que hacía cada variable de ancho completo */
.variable-inline-field .template-token-list.compact-tokens {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.variable-inline-field .template-token-list.compact-tokens > button.template-token {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: max-content !important;
    height: auto !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 6px 10px !important;
    border: 1px solid #dde4e9 !important;
    border-radius: 999px !important;
    background: #f8fafb !important;
    color: #2c3a46 !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

.variable-inline-field .template-token-list.compact-tokens > button.template-token:hover {
    background: #eef3f6 !important;
    border-color: #cbd6de !important;
}

.variable-inline-field .template-token-list.compact-tokens > button.template-token strong {
    display: inline !important;
    margin: 0 !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 750 !important;
}

@media (max-width: 640px) {
    .variable-inline-field .template-token-list.compact-tokens > button.template-token {
        width: auto !important;
        flex: 0 0 auto !important;
    }
}

/* Update 009: reglas de cobro */
.billing-editor-card{margin-bottom:22px}.billing-form-grid{align-items:start}.billing-live-total{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-top:18px;padding:16px 18px;border:1px solid #e5e7eb;border-radius:14px;background:#f8fafc}.billing-live-total span{font-size:13px;color:#64748b}.billing-live-total strong{font-size:24px}.field-error{display:none!important;margin-top:5px;color:#b91c1c!important;font-size:12px!important}.field-error.visible{display:block!important}.billing-disabled{opacity:.5}.billing-disabled input{pointer-events:none}.billing-breakdown{display:grid;gap:8px}.billing-breakdown>div{display:flex;justify-content:space-between;gap:20px}.billing-breakdown .billing-total{padding-top:10px;margin-top:4px;border-top:1px solid #e5e7eb;font-size:17px}

/* Update 010 · ficha de servicio */
.service-editor-card{margin-bottom:22px}.service-form-grid{align-items:start}.service-notes-field{grid-column:1/-1}.service-notes-field textarea{min-height:105px;resize:vertical}.field-help{display:block;margin-top:6px;color:#7b8794;font-size:12px;line-height:1.4}
@media (max-width:760px){.service-notes-field{grid-column:auto}}
\n\n/* Update 011 · Último aviso parpadeante en Resumen operativo */\n.status-last-alert-blink {\n    animation: mkc-last-alert-blink 1.8s ease-in-out infinite;\n    transform-origin: center;\n}\n@keyframes mkc-last-alert-blink {\n    0%, 100% { opacity:1; box-shadow:0 0 0 0 rgba(184,58,50,0); }\n    50% { opacity:.48; box-shadow:0 0 0 4px rgba(184,58,50,.10); }\n}\n@media (prefers-reduced-motion: reduce) {\n    .status-last-alert-blink { animation:none; }\n}\n

/* Update 015 · Monitor y bitácora del cron */
.cron-card-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.button-small{padding:8px 11px!important;font-size:12px!important}
.cron-health-alert{animation:mkc-cron-alert 1.8s ease-in-out infinite}
@keyframes mkc-cron-alert{
    0%,100%{opacity:1}
    50%{opacity:.55}
}
.cron-today-card{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:24px;
    margin-bottom:18px;
    padding:22px 24px;
    border:1px solid #dfe7ec;
    border-radius:16px;
    background:#fff;
}
.cron-today-card h2{margin:4px 0 5px;font-size:25px}
.cron-today-card p{margin:0;color:#75818b;font-size:13px}
.cron-today-kicker{display:block;color:#82909b;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.cron-today-danger{border-color:#efc1bd;background:#fff8f7}
.cron-state-pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:28px;
    padding:5px 10px;
    border:1px solid transparent;
    border-radius:999px;
    font-size:11px;
    font-weight:800;
    white-space:nowrap;
}
.cron-state-success{background:#edf8f1;color:#237348;border-color:#c4e6d1}
.cron-state-warning{background:#fff6dd;color:#8a6500;border-color:#edd894}
.cron-state-danger{background:#fff0ef;color:#b83a32;border-color:#efc1bd}
.cron-missed-row td{background:#fffafa}
.cron-metric-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}
.notice-success{background:#eef9f2;border-color:#c8ead4;color:#276b45}
@media(max-width:900px){
    .cron-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
    .cron-today-card{align-items:flex-start;flex-direction:column}
    .cron-metric-grid{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){
    .cron-health-alert{animation:none}
}
