:root {
    --side: #0b1c3a;
    --side-2: #13284f;
    --text: #122033;
    --muted: #6b7789;
    --line: #e6ebf2;
    --bg: #f4f7fb;
    --blue: #2f6fed;
    --green: #12b76a;
    --orange: #f79009;
    --purple: #7a5af8;
    --red: #e11d48;
    --shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: Manrope, "Source Sans 3", sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }
svg { width: 18px; height: 18px; }

.admin-shell { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }
.sidebar {
    background: linear-gradient(180deg, #08152d 0%, #0d2348 100%);
    color: #d7deea;
    padding: 22px 16px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.brand { display: block; padding: 4px 10px 18px; color: #fff; }
.brand strong { display: block; font-family: "Playfair Display", serif; font-size: 28px; letter-spacing: .4px; }
.brand small { color: #93a0b8; font-size: 10px; letter-spacing: .8px; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 3px; overflow: auto; }
.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #c5d0e0;
    font-size: 14px;
    font-weight: 600;
}
.sidebar nav a:hover, .sidebar nav a.active { background: rgba(255,255,255,.08); color: #fff; }
.sidebar nav a.active { box-shadow: inset 3px 0 0 #3b82f6; }
.nav-label {
    margin: 16px 12px 6px;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #7f8da3;
}
.sidebar-card {
    margin-top: auto;
    border-radius: 14px;
    overflow: hidden;
    background: #071226;
}
.sidebar-card img { height: 92px; width: 100%; object-fit: cover; }
.sidebar-card div { padding: 10px 12px 12px; }
.sidebar-card strong { display: block; color: #fff; font-family: "Playfair Display", serif; }
.sidebar-card small { color: #8b98ad; }

.admin-main { min-width: 0; }
.topbar {
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 8;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar h1 { margin: 0; font-size: 20px; }
.topbar p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    display: grid;
    place-items: center;
    position: relative;
    color: var(--text);
}
.icon-btn i {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
}
.userchip { display: flex; align-items: center; gap: 10px; }
.userchip strong { display: block; font-size: 14px; }
.userchip small { color: var(--muted); font-size: 12px; }
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    display: grid;
    place-items: center;
    font-weight: 800;
}
.avatar.sm { width: 34px; height: 34px; font-size: 12px; flex: none; }
.logout { color: var(--muted); }
.content { padding: 22px 24px 40px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat, .card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.stat { padding: 16px; display: flex; gap: 12px; align-items: center; }
.stat span, .stat small { color: var(--muted); }
.stat b { display: block; font-size: 28px; letter-spacing: -.4px; }
.stat .up { color: #12b76a; font-weight: 700; font-size: 12px; }
.icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    flex: none;
}
.icon svg { width: 22px; height: 22px; }
.icon.blue { background: linear-gradient(180deg, #4c8dff, #2f6fed); }
.icon.green { background: linear-gradient(180deg, #32d583, #12b76a); }
.icon.orange { background: linear-gradient(180deg, #fdb022, #f79009); }
.icon.purple { background: linear-gradient(180deg, #9b8afb, #7a5af8); }

.dash-row { display: grid; grid-template-columns: 1.4fr .9fr .7fr; gap: 16px; margin-top: 16px; }
.dash-row.wide { grid-template-columns: 1.7fr .8fr; }
.dash-row.three { grid-template-columns: 1.1fr .9fr .8fr; }
.card { padding: 16px 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 8px; }
.card-head h2 { margin: 0; font-size: 15px; }
.card-head a { color: var(--blue); font-size: 13px; font-weight: 700; }
.pill { background: #f2f4f8; color: var(--muted); border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.line-chart { width: 100%; height: 180px; }
.chart-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.donut-wrap { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: center; }
.donut {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}
.donut div {
    width: 78px;
    height: 78px;
    background: #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-align: center;
}
.donut b { font-size: 18px; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend strong { margin-left: auto; color: var(--muted); }
.quick { display: grid; gap: 8px; }
.q {
    display: block;
    padding: 11px 12px;
    border-radius: 10px;
    color: #fff !important;
    font-weight: 700;
    font-size: 13px;
}
.q.blue { background: var(--blue); }
.q.green { background: var(--green); }
.q.orange { background: var(--orange); }
.q.dark { background: #111827; }

.table-wrap { overflow: auto; }
.pro-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pro-table th { color: var(--muted); font-weight: 700; text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
.pro-table td { padding: 10px 8px; border-bottom: 1px solid #f1f4f8; vertical-align: middle; }
.news-cell { display: flex; align-items: center; gap: 10px; }
.news-cell img { width: 42px; height: 32px; object-fit: cover; border-radius: 6px; }
.muted { color: var(--muted); }
.chip, .badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.chip.local { background: #dbeafe; color: #1d4ed8; }
.chip.nacional { background: #dcfce7; color: #15803d; }
.chip.inter { background: #ffedd5; color: #c2410c; }
.chip.eco { background: #fef3c7; color: #b45309; }
.chip.dep { background: #fee2e2; color: #b91c1c; }
.chip.pol { background: #ede9fe; color: #6d28d9; }
.chip.tec { background: #e0f2fe; color: #0369a1; }
.chip.salud { background: #dcfce7; color: #047857; }
.chip.cul, .chip.seg, .chip.otro { background: #f1f5f9; color: #334155; }
.badge.ok { background: #e7f8ef; color: #027a48; }
.badge.warn { background: #fef4e6; color: #b54708; }
.actions a, .actions button { color: var(--blue); background: none; border: 0; font-weight: 700; cursor: pointer; margin-right: 8px; }

.read-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.read-list li { display: flex; gap: 10px; align-items: center; }
.read-list span { width: 22px; font-family: "Playfair Display", serif; font-size: 18px; color: #94a3b8; }
.read-list img { width: 48px; height: 36px; object-fit: cover; border-radius: 8px; }
.read-list a { display: block; font-weight: 700; font-size: 13px; }
.read-list small { color: var(--muted); }
.comment { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1f4f8; }
.comment p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.sys, .reminders { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sys li { display: grid; grid-template-columns: 1fr auto; gap: 6px; font-size: 14px; }
.ok-text { color: var(--green); }
.bar { grid-column: 1 / -1; height: 7px; background: #eef2f7; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); }
.reminders li { display: flex; gap: 8px; font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }
.dot.red { background: var(--red); }
.dot.blue { background: var(--blue); }
.dot.orange { background: var(--orange); }
blockquote {
    margin: 16px 0 0;
    padding: 12px;
    background: #f8fafc;
    border-left: 3px solid var(--blue);
    color: var(--muted);
    font-size: 13px;
}

.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 16px; }
.page-head h2 { margin: 0; font-size: 18px; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--blue);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}
.btn.ghost, .btn.secondary { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: #fff; color: var(--red); border: 1px solid #fecdd3; }
form .input, form .select, form .textarea, form .checkbox, form .datetime { margin-bottom: 12px; }
label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; color: var(--muted); }
input, select, textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
textarea { min-height: 140px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; margin-top: 8px; }
.message { padding: 11px 14px; border-radius: 12px; margin-bottom: 14px; background: #eef6ff; border: 1px solid #dbeafe; }
.message.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.message.success { background: #ecfdf3; border-color: #bbf7d0; }

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: #f3f7fc;
}
.login-visual {
    color: #fff;
    padding: 42px 48px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(8, 22, 48, .28) 0%, rgba(8, 22, 48, .78) 72%),
        url("https://images.unsplash.com/photo-1449824913935-59a10b8d2000?auto=format&fit=crop&w=1800&q=80") center/cover;
}
.login-brand { text-align: center; }
.login-logo { max-height: 72px; width: auto; margin: 0 auto 8px; display: block; }
.login-brand strong {
    display: block;
    font-family: "Playfair Display", serif;
    font-size: 64px;
    letter-spacing: 1px;
    line-height: .9;
}
.login-brand small {
    display: inline-block;
    margin-top: 10px;
    font-size: 11px;
    letter-spacing: 2.2px;
    color: #d7deea;
    position: relative;
}
.login-brand small::before,
.login-brand small::after {
    content: "";
    display: inline-block;
    width: 36px;
    height: 1px;
    background: rgba(255,255,255,.55);
    vertical-align: middle;
    margin: 0 10px;
}
.login-hero-copy h2 {
    font-family: "Playfair Display", serif;
    font-size: 40px;
    line-height: 1.12;
    margin: 0 0 14px;
    font-weight: 800;
}
.login-hero-copy p {
    max-width: 430px;
    color: #dbe4f3;
    margin: 0 0 28px;
    font-size: 15px;
}
.login-feats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.login-feats li { display: grid; justify-items: center; text-align: center; gap: 8px; }
.login-feats svg {
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    fill: none;
    stroke: #fff;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.login-feats span { font-size: 12px; color: #c9d4e4; }
.login-feats b { display: block; color: #fff; font-size: 13px; margin-bottom: 2px; }
.login-visual blockquote {
    margin: 28px 0 0;
    padding: 0;
    background: none;
    border: 0;
    color: #c5d0e0;
    font-style: italic;
    font-size: 14px;
}
.login-panel {
    display: flex;
    flex-direction: column;
    padding: 28px 48px 24px;
    min-width: 0;
}
.login-back {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #2f6fed;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 18px;
}
.login-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.login-card {
    background: #fff;
    margin: 0 auto;
    width: min(460px, 100%);
    border-radius: 22px;
    padding: 36px 32px 28px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
}
.login-card h1 { margin: 0 0 6px; font-size: 30px; text-align: center; }
.login-card .lede { color: var(--muted); margin: 0 0 22px; text-align: center; }
.login-form { display: grid; gap: 12px; }
.login-field { position: relative; }
.login-field > svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #94a3b8;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    z-index: 1;
}
.login-field input {
    padding-left: 42px;
    height: 48px;
    border-radius: 12px;
}
.login-field .toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    background: none;
    color: #94a3b8;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
}
.login-field .toggle-pass svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.login-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.remember { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; margin: 0; }
.remember input { width: auto; }
.forgot { color: #2f6fed; font-weight: 700; }
.muted-link { color: #2f6fed; cursor: default; }
.login-submit {
    width: 100%;
    justify-content: center;
    height: 48px;
    border-radius: 12px;
    background: #2f6fed;
    font-size: 15px;
}
.login-submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.login-help { text-align: center; color: var(--muted); font-size: 13px; margin: 18px 0 0; }
.login-help a { color: #2f6fed; font-weight: 800; }
.login-trust {
    list-style: none;
    margin: 28px auto 0;
    padding: 0;
    width: min(560px, 100%);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    text-align: center;
}
.login-trust svg {
    width: 28px;
    height: 28px;
    margin: 0 auto 6px;
    display: block;
    fill: none;
    stroke: #2f6fed;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.login-trust span { font-size: 12px; color: var(--muted); }
.login-trust b { display: block; color: var(--text); font-size: 13px; margin-bottom: 2px; }
.login-foot { margin-top: auto; padding-top: 28px; text-align: center; }
.login-foot strong { display: block; font-family: "Playfair Display", serif; font-size: 28px; }
.login-foot small { display: block; color: var(--muted); letter-spacing: 1.4px; font-size: 10px; margin: 4px 0 8px; }
.login-foot p { margin: 0; color: #94a3b8; font-size: 12px; }
.sidebar-logo { max-height: 48px; width: auto; margin-bottom: 6px; display: block; }
.color-picker { width: 72px; height: 44px; padding: 4px; border-radius: 10px; cursor: pointer; }
.brand-preview { max-height: 64px; max-width: 220px; display: block; margin: 0 0 10px; background: #f8fafc; padding: 8px; border-radius: 10px; border: 1px solid var(--line); }
.brand-preview.sm { max-height: 40px; max-width: 40px; }
.red-row {
    display: grid;
    grid-template-columns: minmax(160px, .7fr) minmax(220px, 1.3fr) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.red-row .input { margin-bottom: 0; }
.red-row .quitar-red { height: 42px; white-space: nowrap; }
#agregar-red { margin-top: 4px; }

.caratula-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.caratula-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.caratula-card.is-active { box-shadow: 0 0 0 2px var(--blue), var(--shadow); }
.caratula-preview {
    height: 148px;
    background: var(--preview, #0b1c3f);
    position: relative;
    overflow: hidden;
}
.caratula-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.caratula-preview em {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #12b76a;
    color: #fff;
    font-style: normal;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 999px;
}
.mini-layout {
    display: block;
    width: calc(100% - 28px);
    height: calc(100% - 36px);
    margin: 22px 14px 14px;
    border-radius: 8px;
    background:
        linear-gradient(#d9e2ef, #d9e2ef) 0 0 / 62% 58%,
        linear-gradient(#9fb0c9, #9fb0c9) 66% 0 / 34% 26%,
        linear-gradient(#b7c4d6, #b7c4d6) 66% 36% / 34% 22%,
        linear-gradient(#c5d0de, #c5d0de) 0 70% / 100% 26%;
    background-repeat: no-repeat;
}
.plantilla-magazine .mini-layout {
    background:
        linear-gradient(#8ea0bb, #8ea0bb) 0 0 / 100% 58%,
        linear-gradient(#d9e2ef, #d9e2ef) 0 68% / 30% 26%,
        linear-gradient(#c5d0de, #c5d0de) 35% 68% / 30% 26%,
        linear-gradient(#b7c4d6, #b7c4d6) 70% 68% / 30% 26%;
    background-repeat: no-repeat;
}
.plantilla-mosaico .mini-layout {
    background:
        linear-gradient(#8ea0bb, #8ea0bb) 0 0 / 48% 100%,
        linear-gradient(#d9e2ef, #d9e2ef) 52% 0 / 48% 48%,
        linear-gradient(#b7c4d6, #b7c4d6) 52% 52% / 48% 48%;
    background-repeat: no-repeat;
}
.plantilla-compacta .mini-layout {
    background:
        repeating-linear-gradient(180deg, #d9e2ef 0 18px, transparent 18px 28px);
}
.caratula-body { padding: 14px 16px 16px; }
.caratula-body h3 { margin: 0 0 4px; font-size: 16px; }
.caratula-body p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.caratula-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plantilla-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.plantilla-option {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    background: #fff;
    display: grid;
    gap: 6px;
}
.plantilla-option input { display: none; }
.plantilla-option:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 3px #dbeafe; }
.plantilla-option .caratula-preview { height: 78px; border-radius: 8px; }
.plantilla-option .mini-layout { margin: 10px 8px; height: calc(100% - 20px); width: calc(100% - 16px); }
.plantilla-option strong { font-size: 13px; }
.plantilla-option small { color: var(--muted); font-size: 11px; line-height: 1.3; }
.inline-check { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.inline-check input { width: auto; }

.news-composer { display: grid; gap: 16px; }
.composer-title .input { margin: 0 0 8px; }
.composer-title label { display: none; }
.composer-headline {
    font-family: "Playfair Display", serif;
    font-size: 34px;
    font-weight: 700;
    border: 0;
    padding: 4px 2px 8px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
}
.composer-deck {
    border: 0;
    padding: 6px 2px;
    font-size: 18px;
    color: var(--muted);
    border-radius: 0;
}
.composer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: start;
}
.composer-side { display: grid; gap: 16px; }
.composer-side .card { margin: 0; }
.composer-actions { position: sticky; bottom: 12px; }
.word-html { position: absolute; left: -9999px; width: 1px; height: 1px; min-height: 0; opacity: 0; pointer-events: none; }
.word-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    min-width: 0;
}
.word-ribbon {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}
.ribbon-group {
    display: grid;
    gap: 4px;
    padding-right: 10px;
    border-right: 1px solid var(--line);
}
.ribbon-group.grow { flex: 1; border-right: 1px solid var(--line); }
.ribbon-group:last-child { border-right: 0; }
.ribbon-group > span {
    font-size: 10px;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}
.ribbon-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.word-ribbon button {
    width: 32px;
    height: 32px;
    border: 0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text);
    display: grid;
    place-items: center;
    padding: 0;
    font-size: 13px;
}
.word-ribbon button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.word-ribbon button:hover, .word-ribbon button.is-on { background: #e8eefc; color: var(--blue); }
.word-ribbon select {
    width: auto;
    min-width: 92px;
    padding: 6px 8px;
    height: 32px;
    border-radius: 8px;
    font-size: 12px;
}
.ribbon-color {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #fff;
    display: grid;
    place-items: center;
    position: relative;
    cursor: pointer;
    font-weight: 800;
    font-size: 13px;
    margin: 0;
}
.ribbon-color i {
    width: 14px;
    height: 10px;
    background: #fff3b0;
    border: 1px solid #e2c96a;
    border-radius: 2px;
}
.ribbon-color input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
}
.word-stage {
    background: #e7edf5;
    padding: 28px 18px 40px;
}
.word-page {
    background: #fff;
    min-height: 640px;
    max-width: 780px;
    margin: 0 auto;
    padding: 52px 58px 72px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, .12);
    outline: none;
    font-size: 18px;
    line-height: 1.75;
    color: #142033;
}
.word-page.is-empty:before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
    display: block;
}
.word-page.is-drop { outline: 2px dashed var(--blue); }
.word-page h2 { font-family: "Playfair Display", serif; font-size: 28px; margin: 0 0 .5em; }
.word-page h3 { font-family: "Playfair Display", serif; font-size: 22px; margin: 0 0 .5em; }
.word-page h4 { font-size: 18px; margin: 0 0 .4em; }
.word-page p { margin: 0 0 1em; }
.word-page ul, .word-page ol { margin: 0 0 1em; padding-left: 1.3em; }
.word-page img { max-width: 100%; height: auto; border-radius: 8px; }
.word-page video { width: 100%; height: auto; border-radius: 8px; background: #111; display: block; }
.word-page.is-uploading { outline: 2px solid var(--blue); }
.word-page figure { margin: 0 0 1.2em; }
.word-page figcaption { color: var(--muted); font-size: 13px; text-align: center; margin-top: 6px; }
.word-page blockquote {
    margin: 0 0 1em;
    padding: 8px 16px;
    border-left: 4px solid var(--blue);
    background: #f8fafc;
    color: #475569;
    font-style: italic;
}
.word-page table { width: 100%; border-collapse: collapse; margin: 0 0 1em; }
.word-page td, .word-page th { border: 1px solid #dbe3ee; padding: 8px; min-width: 80px; }
.word-page a { color: var(--blue); text-decoration: underline; }
.cover-picker {
    min-height: 140px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    background: #f8fafc;
    display: grid;
    place-items: center;
    overflow: hidden;
    margin-bottom: 10px;
}
.cover-picker img,
.cover-picker video { width: 100%; height: 160px; object-fit: cover; display: block; background: #111; }
.cover-picker.is-drop { border-color: var(--blue); background: #eef4ff; }
.cover-hint { color: var(--muted); font-size: 13px; text-align: center; padding: 16px; margin: 0; }

.ad-composer { display: block; }
.ad-composer-grid {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
    gap: 16px;
    align-items: start;
}
.ad-fields { display: grid; gap: 16px; }
.ad-fields .card, .ad-creative { margin: 0; }
.ad-stage { display: grid; gap: 12px; }
.ad-preview-box {
    width: 100%;
    border: 0;
    background: #f4f7fb;
    border-radius: 16px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    display: grid;
    gap: 10px;
    min-height: 320px;
    place-content: start stretch;
    box-shadow: inset 0 0 0 1px #e6ebf2;
    color: inherit;
}
.ad-preview-box.is-drop,
.ad-preview-box:hover { box-shadow: inset 0 0 0 2px var(--blue); background: #eef4ff; }
.ad-preview-box small {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .6px;
    text-transform: uppercase;
    font-weight: 800;
}
.ad-preview-box img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    background: #111;
    display: block;
}
.ad-preview-empty {
    min-height: 220px;
    border: 1.5px dashed #c9d4e4;
    border-radius: 12px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    color: var(--muted);
    padding: 24px;
    background: #fff;
}
.ad-preview-empty svg {
    width: 36px;
    height: 36px;
    stroke: var(--blue);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
}
.ad-preview-empty strong { color: var(--text); font-size: 15px; }
.ad-preview-empty span { font-size: 12px; }
.ad-preview-box > strong {
    font-size: 16px;
    line-height: 1.3;
    display: block;
}
.ad-creative-actions { display: flex; gap: 8px; }
.ad-creative-actions .btn { flex: 1; justify-content: center; }
.ad-url-box { display: grid; gap: 6px; }
.ad-help { margin: -4px 0 0; font-size: 12px; }
.ad-pos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.ad-pos {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    display: grid;
    gap: 2px;
}
.ad-pos input { display: none; }
.ad-pos strong { color: var(--text); font-size: 13px; }
.ad-pos span { color: var(--muted); font-size: 11px; line-height: 1.35; font-weight: 500; }
.ad-pos:has(input:checked) {
    border-color: var(--blue);
    background: #eef4ff;
    box-shadow: 0 0 0 3px #dbeafe;
}
.ad-pub-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    align-items: end;
}
.ad-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    font-weight: 700;
    color: var(--text);
}
.ad-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ad-switch-ui {
    width: 44px;
    height: 26px;
    border-radius: 99px;
    background: #d6dde8;
    position: relative;
    flex: none;
    transition: background .15s ease;
}
.ad-switch-ui:after {
    content: "";
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 3px;
    left: 3px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .2);
    transition: transform .15s ease;
}
.ad-switch input:checked + .ad-switch-ui { background: var(--blue); }
.ad-switch input:checked + .ad-switch-ui:after { transform: translateX(18px); }
.word-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .35);
    display: grid;
    place-items: center;
    z-index: 40;
}
.word-modal[hidden] { display: none; }
.word-modal-card {
    width: min(420px, calc(100% - 32px));
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}
.word-modal-card h3 { margin: 0 0 12px; }
.word-modal-card label { margin-top: 8px; }

@media (max-width: 1100px) {
    .stats, .dash-row, .dash-row.wide, .dash-row.three, .form-grid, .login-wrap, .login-page, .red-row, .caratula-grid, .plantilla-pick, .composer-grid, .ad-composer-grid, .ad-pos-grid, .ad-pub-row { grid-template-columns: 1fr; }
    .word-page { padding: 28px 20px 40px; }
    .admin-shell { grid-template-columns: 1fr; }
    .sidebar { display: none; position: fixed; z-index: 20; }
    .sidebar.open { display: flex; }
    .menu-btn { display: grid; }
    .login-page { grid-template-columns: 1fr; }
    .login-visual { min-height: 420px; }
    .login-feats, .login-trust { grid-template-columns: 1fr 1fr; }
    .login-brand strong { font-size: 48px; }
    .login-hero-copy h2 { font-size: 30px; }
}
