@import url("fonts.css");

:root {
    --navy: #0c2552;
    --navy-deep: #071a3a;
    --navy-black: #030b1a;
    --blue: #1b77d4;
    --blue-dark: #1b6fc7;
    --blue-light: #77c1ff;
    --sky: #cbe9ff;
    --ink: #051229;
    --text: #364052;
    --muted: #65707e;
    --line: #e3e9f1;
    --line-strong: #d3dce8;
    --paper: #f4f7fb;
    --white: #ffffff;
    --green: #1f9d72;
    --green-bg: #e9f8f1;
    --red: #d64545;
    --red-bg: #fdeeee;
    --amber: #d28b12;
    --amber-bg: #fdf5e6;
    --violet: #7555c9;
    --violet-bg: #f0edfb;
    --font-head: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
    --font-body: "Lato", "Helvetica Neue", Arial, sans-serif;
    --shadow-sm: 0 4px 14px rgba(5, 18, 41, 0.05);
    --shadow-md: 0 14px 38px rgba(5, 18, 41, 0.1);
    --shadow-lg: 0 28px 70px rgba(5, 18, 41, 0.18);
    --sidebar-width: 262px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

ul, ol {
    margin: 0;
    padding: 0;
}

svg {
    flex-shrink: 0;
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.inline-form {
    display: inline-flex;
}

/* ------------------------------------------------------------------ */
/* Estructura                                                         */
/* ------------------------------------------------------------------ */
.admin-shell {
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    padding: 22px 16px 18px;
    overflow-y: auto;
    background:
        radial-gradient(70% 55% at 20% 0%, rgba(35, 134, 235, 0.18), transparent 60%),
        var(--navy-deep);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
}

.admin-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 4px 10px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
}

.admin-brand img {
    width: 112px;
    height: auto;
}

.admin-brand span {
    color: rgba(255, 255, 255, 0.38);
    font-family: var(--font-head);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.admin-nav-label {
    display: block;
    margin: 15px 12px 7px;
    color: rgba(255, 255, 255, 0.3);
    font-family: var(--font-head);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13.5px;
    line-height: 1.3;
}

.admin-nav a svg {
    color: rgba(255, 255, 255, 0.42);
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
}

.admin-nav a:hover svg {
    color: var(--blue-light);
}

.admin-nav a.is-active {
    background: rgba(35, 134, 235, 0.2);
    color: var(--white);
    box-shadow: inset 2px 0 0 var(--blue);
}

.admin-nav a.is-active svg {
    color: var(--blue-light);
}

.admin-sidebar-bottom {
    margin-top: auto;
    padding-top: 20px;
}

.admin-view-site {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11.5px;
}

.admin-view-site:hover {
    border-color: rgba(119, 193, 255, 0.38);
    color: var(--white);
}

.admin-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 4px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--blue), var(--blue-light));
    color: var(--white);
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 700;
}

.admin-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-user-info strong {
    overflow: hidden;
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.admin-user-info small {
    color: rgba(255, 255, 255, 0.38);
    font-size: 10.5px;
}

.admin-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
    padding: 9px 11px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: rgba(255, 255, 255, 0.48);
    font-size: 12px;
    text-align: left;
}

.admin-logout:hover {
    background: rgba(214, 69, 69, 0.14);
    color: #ff9d9d;
}

.admin-main {
    min-width: 0;
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 76px;
    padding: 13px 28px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.admin-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.admin-menu-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    margin: 0 auto;
    background: var(--ink);
    border-radius: 2px;
}

.admin-topbar-title {
    display: flex;
    flex-direction: column;
}

.admin-topbar-title > span {
    color: var(--blue);
    font-family: var(--font-head);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.admin-topbar-title h1 {
    margin-top: 2px;
    font-size: 19px;
    line-height: 1.2;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.admin-topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11.5px;
}

.admin-topbar-link:hover {
    color: var(--blue);
}

.admin-content {
    padding: 26px 28px 48px;
}

.admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(3, 11, 26, 0.5);
    backdrop-filter: blur(2px);
}

/* ------------------------------------------------------------------ */
/* Botones                                                            */
/* ------------------------------------------------------------------ */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: var(--font-head);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-btn-primary {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--white);
    box-shadow: 0 7px 18px rgba(35, 134, 235, 0.2);
}

.admin-btn-primary:hover {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
    transform: translateY(-1px);
}

.admin-btn-secondary {
    background: var(--white);
    border-color: var(--line-strong);
    color: var(--ink);
}

.admin-btn-secondary:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.admin-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--muted);
}

.admin-btn-ghost:hover {
    background: #eef4fb;
    color: var(--ink);
}

.admin-btn-block {
    width: 100%;
}

.admin-btn-lg {
    padding: 13px 20px;
    font-size: 12.5px;
}

.admin-btn-small {
    padding: 7px 11px;
    font-size: 10.5px;
}

.admin-link {
    color: var(--blue);
    font-size: 11.5px;
    font-weight: 600;
}

.admin-link:hover {
    color: var(--navy);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--white);
    color: var(--muted);
}

.icon-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: #f6fbff;
}

.icon-btn-danger:hover {
    border-color: var(--red);
    background: var(--red-bg);
    color: var(--red);
}

.icon-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.icon-btn:disabled:hover {
    border-color: var(--line);
    background: var(--white);
    color: var(--muted);
}

/* ------------------------------------------------------------------ */
/* Tarjetas y tablas                                                  */
/* ------------------------------------------------------------------ */
.admin-card {
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: var(--shadow-sm);
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
}

.admin-card-header-wrap {
    flex-wrap: wrap;
}

.admin-card-header-flush {
    padding: 0 0 16px;
    border-bottom: 0;
}

.admin-card-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.admin-card-header p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11.5px;
}

.admin-card-header > div {
    min-width: 0;
}

.admin-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

.admin-table-wide {
    min-width: 860px;
}

.admin-card-table .admin-table {
    table-layout: fixed;
    min-width: 0;
    width: 100%;
}

.admin-card-table .admin-table th:nth-child(2),
.admin-card-table .admin-table td:nth-child(2) {
    width: 100px;
}

.admin-card-table .admin-table th:nth-child(3),
.admin-card-table .admin-table td:nth-child(3) {
    width: 100px;
}

.admin-card-table .admin-table th:nth-child(4),
.admin-card-table .admin-table td:nth-child(4) {
    width: 66px;
}

.admin-card-table .admin-table th:last-child,
.admin-card-table .admin-table td:last-child {
    width: 92px;
}

.admin-card-table .table-post {
    min-width: 0;
}

.admin-card-table .table-post-title,
.admin-card-table .table-post-meta {
    max-width: 100%;
}

.admin-table th {
    padding: 11px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-family: var(--font-head);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
    font-size: 12.5px;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background: #fbfdff;
}

.th-right,
.table-actions-right {
    text-align: right;
}

.table-muted {
    color: var(--muted);
    font-size: 11.5px;
    white-space: nowrap;
}

.table-post {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 250px;
}

.table-post > div {
    min-width: 0;
}

.table-post img,
.table-post-placeholder {
    width: 46px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 6px;
    object-fit: cover;
    background: #eaf1f9;
}

.table-post-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 800;
}

.table-post-title {
    display: block;
    max-width: 370px;
    overflow: hidden;
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.table-post-title:hover {
    color: var(--blue);
}

.table-post-meta {
    display: block;
    max-width: 370px;
    margin-top: 2px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.table-actions-right {
    justify-content: flex-end;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 50px;
    font-family: var(--font-head);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.status-badge::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.status-published {
    background: var(--green-bg);
    color: var(--green);
}

.status-draft {
    background: var(--amber-bg);
    color: var(--amber);
}

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 23px;
    padding: 0 7px;
    border-radius: 50px;
    background: #eef6ff;
    color: var(--blue);
    font-size: 10.5px;
    font-weight: 700;
}

.status-new {
    background: var(--amber-bg);
    color: var(--amber);
}

.status-contacted {
    background: var(--green-bg);
    color: var(--green);
}

/* ------------------------------------------------------------------ */
/* Solicitudes                                                        */
/* ------------------------------------------------------------------ */
.lead-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--line);
}

.lead-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 50px;
    color: var(--text);
    font-size: 10.5px;
    font-weight: 600;
}

.lead-tab span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 5px;
    border-radius: 50px;
    background: #f0f4f9;
    color: var(--muted);
    font-size: 9px;
}

.lead-tab:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.lead-tab.is-active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.lead-tab.is-active span {
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
}

.lead-tab-link {
    margin-left: auto;
    border-color: transparent;
    color: var(--blue);
}

.lead-table {
    min-width: 980px;
}

.lead-person,
.lead-contact,
.lead-company {
    display: flex;
    gap: 9px;
    min-width: 0;
}

.lead-person {
    align-items: center;
}

.lead-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #eaf4ff, #d7ebff);
    color: var(--blue);
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 700;
}

.lead-person > div,
.lead-contact,
.lead-company {
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.lead-person strong,
.lead-company strong {
    max-width: 210px;
    overflow: hidden;
    color: var(--ink);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lead-person a {
    max-width: 210px;
    overflow: hidden;
    color: var(--blue);
    font-size: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lead-person a:hover {
    color: var(--navy);
    text-decoration: underline;
}

.lead-contact span {
    color: var(--text);
    font-size: 10.5px;
}

.lead-contact a {
    color: var(--muted);
    font-size: 10px;
}

.lead-contact a:hover {
    color: var(--blue);
}

.lead-company strong {
    font-weight: 500;
}

.lead-company span {
    max-width: 180px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mini-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 27px;
    height: 21px;
    padding: 0 7px;
    border-radius: 50px;
    background: #f0f4f9;
    color: var(--muted);
    font-family: var(--font-head);
    font-size: 9px;
    font-weight: 700;
}

.mini-badge-green {
    background: var(--green-bg);
    color: var(--green);
}

/* ------------------------------------------------------------------ */
/* Dashboard                                                          */
/* ------------------------------------------------------------------ */
.admin-welcome {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 24px;
}

.admin-kicker {
    color: var(--blue);
    font-family: var(--font-head);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.admin-welcome h2 {
    margin-top: 5px;
    font-size: 26px;
}

.admin-welcome p {
    max-width: 650px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.stat-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 19px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    border-radius: 11px;
}

.stat-icon-blue {
    background: #eaf4ff;
    color: var(--blue);
}

.stat-icon-green {
    background: var(--green-bg);
    color: var(--green);
}

.stat-icon-amber {
    background: var(--amber-bg);
    color: var(--amber);
}

.stat-icon-violet {
    background: var(--violet-bg);
    color: var(--violet);
}

.stat-card > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-label {
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.stat-value {
    margin-top: 2px;
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 27px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.stat-card small {
    margin-top: 3px;
    color: #9aa4b0;
    font-size: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    margin-top: 18px;
    align-items: start;
}

.dashboard-grid > *,
.dashboard-side > *,
.stats-grid > *,
.settings-grid > *,
.editor-layout > *,
.editor-sidebar > * {
    min-width: 0;
}

.dashboard-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    padding: 8px;
}

.quick-actions a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
}

.quick-actions a:hover {
    background: #f6faff;
}

.quick-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 9px;
    background: #eef6ff;
    color: var(--blue);
}

.quick-actions a > span:last-child {
    display: flex;
    flex-direction: column;
}

.quick-actions strong {
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
}

.quick-actions small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 10.5px;
}

.quick-actions-compact {
    gap: 2px;
}

.quick-actions-compact a {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    padding: 9px 10px;
}

.quick-actions-compact a strong {
    font-size: 11.5px;
}

.quick-actions-compact a span {
    color: var(--muted);
    font-size: 10.5px;
}

.mini-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 16px;
}

.mini-media-grid a {
    aspect-ratio: 1;
    border-radius: 7px;
    overflow: hidden;
    background: #eef3f9;
}

.mini-media-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mini-media-grid a:hover img {
    transform: scale(1.08);
}

.admin-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 52px 24px;
    text-align: center;
}

.admin-empty h4 {
    font-size: 16px;
}

.admin-empty p {
    max-width: 360px;
    margin: 6px 0 16px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.admin-empty-small {
    padding: 26px 20px;
}

.admin-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 13px;
    border-radius: 50%;
    background: #eef6ff;
    color: var(--blue);
}

.admin-empty .admin-link {
    margin-top: 0;
}

/* ------------------------------------------------------------------ */
/* Filtros                                                            */
/* ------------------------------------------------------------------ */
.admin-filters {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.admin-search {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-search svg {
    position: absolute;
    left: 11px;
    color: var(--muted);
    pointer-events: none;
}

.admin-search input {
    width: 210px;
    height: 36px;
    padding: 0 12px 0 33px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    font-size: 11.5px;
}

.admin-filters select {
    height: 36px;
    padding: 0 28px 0 11px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--white);
    color: var(--text);
    font-size: 11.5px;
}

.admin-search input:focus,
.admin-filters select:focus {
    outline: 2px solid #cfe7ff;
    border-color: var(--blue);
}

/* ------------------------------------------------------------------ */
/* Formularios                                                        */
/* ------------------------------------------------------------------ */
.admin-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.admin-field:last-child {
    margin-bottom: 0;
}

.admin-field label {
    color: var(--ink);
    font-size: 11.5px;
    font-weight: 600;
}

.admin-field input[type="text"],
.admin-field input[type="email"],
.admin-field input[type="password"],
.admin-field input[type="search"],
.admin-field select,
.admin-field textarea,
.input-prefix input {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    font-size: 12.5px;
    line-height: 1.4;
}

.admin-field textarea {
    resize: vertical;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus,
.input-prefix input:focus {
    outline: 2px solid #cfe7ff;
    border-color: var(--blue);
}

.admin-field input:disabled {
    background: #f3f6fa;
    color: var(--muted);
    cursor: not-allowed;
}

.admin-field small,
.field-help {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.field-help {
    margin-top: 9px;
}

.label-optional {
    color: var(--muted);
    font-weight: 400;
}

.admin-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.admin-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 16px 0;
    color: var(--text);
    font-size: 11.5px;
    line-height: 1.5;
    cursor: pointer;
}

.admin-checkbox input {
    width: 15px;
    height: 15px;
    margin: 1px 0 0;
    accent-color: var(--blue);
    flex-shrink: 0;
}

.form-errors {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #f6caca;
    border-radius: 9px;
    background: var(--red-bg);
    color: #a92f2f;
    font-size: 12px;
}

.form-errors ul {
    margin-top: 6px;
    padding-left: 18px;
}

.form-errors li {
    margin-bottom: 2px;
}

.form-separator {
    height: 1px;
    margin: 22px 0;
    background: var(--line);
}

.input-prefix {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
}

.input-prefix:focus-within {
    outline: 2px solid #cfe7ff;
    border-color: var(--blue);
}

.input-prefix span {
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    background: #f3f6fa;
    border-right: 1px solid var(--line);
    color: var(--muted);
    font-size: 10.5px;
    white-space: nowrap;
}

.input-prefix input {
    border: 0;
    border-radius: 0;
    min-height: 38px;
}

.input-prefix input:focus {
    outline: none;
}

/* ------------------------------------------------------------------ */
/* Editor                                                             */
/* ------------------------------------------------------------------ */
.post-form {
    width: 100%;
}

.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 20px;
    align-items: start;
}

.editor-main {
    min-width: 0;
}

.editor-title-field {
    margin-bottom: 14px;
}

.editor-title-field input {
    width: 100%;
    padding: 17px 19px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-head);
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.03em;
    box-shadow: var(--shadow-sm);
}

.editor-title-field input::placeholder {
    color: #b0bac6;
}

.editor-title-field input:focus {
    outline: 2px solid #cfe7ff;
    border-color: var(--blue);
}

.editor-shell {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: visible;
}

.editor-toolbar {
    position: sticky;
    top: 76px;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 9px 10px;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    border-radius: 12px 12px 0 0;
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.tool-sep {
    width: 1px;
    height: 20px;
    margin: 0 5px;
    background: var(--line);
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-family: var(--font-head);
    font-size: 11.5px;
    font-weight: 600;
}

.tool-btn:hover {
    background: var(--white);
    border-color: var(--line);
    color: var(--blue);
}

.tool-btn.is-active {
    background: #e8f3ff;
    border-color: #cfe7ff;
    color: var(--blue);
}

.tool-status {
    margin-left: auto;
    padding-right: 4px;
    color: var(--green);
    font-size: 10px;
}

.tool-status.is-error {
    color: var(--red);
}

.editor-area {
    min-height: 520px;
    padding: 26px 28px 34px;
    color: var(--text);
    font-size: 15.5px;
    line-height: 1.75;
    outline: none;
}

.editor-area:focus {
    box-shadow: inset 0 0 0 2px #e1f0ff;
}

.editor-area:empty::before {
    content: attr(data-placeholder);
    color: #aab4c0;
    pointer-events: none;
}

.editor-area.is-dragover {
    background: #f3f9ff;
    box-shadow: inset 0 0 0 2px var(--blue-light);
}

.editor-area.is-uploading {
    opacity: 0.68;
}

.editor-area p {
    margin: 0 0 15px;
}

.editor-area h2 {
    margin: 25px 0 9px;
    font-size: 25px;
}

.editor-area h3 {
    margin: 20px 0 8px;
    font-size: 20px;
}

.editor-area h4 {
    margin: 18px 0 7px;
    font-size: 17px;
}

.editor-area ul,
.editor-area ol {
    margin: 0 0 15px;
    padding-left: 24px;
}

.editor-area li {
    margin-bottom: 6px;
}

.editor-area blockquote {
    margin: 20px 0;
    padding: 4px 0 4px 18px;
    border-left: 3px solid var(--blue);
    color: var(--navy);
    font-family: var(--font-head);
    font-size: 17px;
    line-height: 1.55;
}

.editor-area blockquote p {
    margin: 0;
}

.editor-area a {
    color: var(--blue);
    text-decoration: underline;
}

.editor-area figure {
    margin: 20px 0;
}

.editor-area figure img {
    width: 100%;
    border-radius: 9px;
}

.editor-area figcaption {
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.editor-area img {
    height: auto;
    border-radius: 9px;
}

.editor-area hr {
    margin: 24px 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.editor-area table {
    width: 100%;
    margin: 18px 0;
    border-collapse: collapse;
    font-size: 13px;
}

.editor-area th,
.editor-area td {
    padding: 8px 10px;
    border: 1px solid var(--line);
    text-align: left;
}

.visually-hidden-textarea {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    opacity: 0;
}

.editor-footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 14px;
    border-top: 1px solid var(--line);
    background: #fafcff;
    border-radius: 0 0 12px 12px;
    color: var(--muted);
    font-size: 10px;
}

.editor-tip {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 12px;
    padding: 11px 14px;
    border: 1px solid #d9ebff;
    border-radius: 8px;
    background: #f2f9ff;
    color: #587089;
    font-size: 10.5px;
    line-height: 1.55;
}

.editor-tip svg {
    margin-top: 1px;
    color: var(--blue);
}

.editor-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.side-card {
    padding: 18px;
}

.side-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.side-card-head h3 {
    font-size: 13.5px;
    font-weight: 600;
}

.side-card-actions {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 16px;
}

.cover-preview {
    position: relative;
    aspect-ratio: 16 / 10;
    border: 1px dashed #c6d3e2;
    border-radius: 9px;
    overflow: hidden;
    background: #f5f8fc;
}

.cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    height: 100%;
    color: #a6b1bf;
    font-size: 10.5px;
}

.cover-empty svg {
    color: #b3c5d8;
}

.cover-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.cover-actions .admin-btn {
    flex: 1;
}

.link-danger {
    margin-top: 9px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--red);
    font-size: 10.5px;
}

.link-danger:hover {
    text-decoration: underline;
}

.meta-list {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.meta-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eef2f7;
    font-size: 10.5px;
}

.meta-list > div:last-child {
    border-bottom: 0;
}

.meta-list dt {
    color: var(--muted);
}

.meta-list dd {
    margin: 0;
    color: var(--text);
    text-align: right;
}

.side-links {
    display: flex;
    gap: 6px;
    margin-top: 13px;
}

.side-links .admin-btn {
    flex: 1;
}

/* ------------------------------------------------------------------ */
/* Biblioteca                                                         */
/* ------------------------------------------------------------------ */
.upload-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    margin-bottom: 18px;
}

.upload-card-copy {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.upload-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 11px;
    background: #eaf4ff;
    color: var(--blue);
}

.upload-card-copy h3 {
    font-size: 14px;
}

.upload-card-copy p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.upload-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.upload-file-label {
    display: inline-flex;
    align-items: center;
    max-width: 260px;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--white);
    color: var(--muted);
    font-size: 10.5px;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.upload-file-label:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.upload-file-label input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
}

.media-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.media-card:hover {
    border-color: #bcd9f5;
    box-shadow: var(--shadow-sm);
}

.media-thumb {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eef3f9;
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-thumb:hover img {
    transform: scale(1.05);
}

.media-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 11px 6px;
}

.media-card-body strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.media-card-body span {
    color: var(--muted);
    font-size: 9.5px;
}

.media-date {
    color: #aab2bd !important;
}

.media-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    padding: 6px 8px 8px;
}

.media-card-actions .admin-btn {
    padding: 5px 7px;
    font-size: 9px;
}

.media-card-actions .icon-btn {
    width: 27px;
    height: 27px;
}

.admin-pagination {
    justify-content: center;
    padding: 0 18px 20px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--white);
    color: var(--text);
    font-size: 11px;
    font-weight: 600;
}

.page-link:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.page-link.is-active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.page-link.is-disabled {
    opacity: 0.4;
    cursor: default;
}

/* ------------------------------------------------------------------ */
/* Categorías, suscriptores, perfil                                   */
/* ------------------------------------------------------------------ */
.settings-grid {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.settings-grid-profile {
    grid-template-columns: minmax(0, 1fr) 320px;
}

.settings-aside {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-form {
    width: 100%;
}

.category-cell {
    display: flex;
    align-items: center;
    gap: 11px;
}

.category-dot {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 0 4px #eaf4ff;
}

.category-cell strong {
    display: block;
    color: var(--ink);
    font-size: 12px;
}

.category-cell small {
    display: block;
    max-width: 320px;
    margin-top: 1px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.subscriber-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.subscriber-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #eaf4ff;
    color: var(--blue);
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 700;
}

.subscriber-cell strong {
    color: var(--ink);
    font-size: 12px;
    font-weight: 500;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--blue), var(--blue-light));
    color: var(--white);
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
}

.profile-head div {
    display: flex;
    flex-direction: column;
}

.profile-head strong {
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 600;
}

.profile-head span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10.5px;
}

.security-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.security-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.5;
}

.security-dot {
    width: 6px;
    height: 6px;
    margin-top: 4px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--green);
}

/* ------------------------------------------------------------------ */
/* Modales                                                            */
/* ------------------------------------------------------------------ */
.admin-modal {
    width: min(900px, calc(100vw - 32px));
    max-height: min(82vh, 760px);
    padding: 0;
    border: 0;
    border-radius: 15px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    color: var(--text);
}

.admin-modal::backdrop {
    background: rgba(3, 11, 26, 0.55);
    backdrop-filter: blur(3px);
}

.admin-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.admin-modal-head h2 {
    font-size: 16px;
}

.admin-modal-head p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10.5px;
}

.admin-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--white);
    color: var(--muted);
    font-size: 19px;
    line-height: 1;
}

.admin-modal-close:hover {
    border-color: var(--red);
    color: var(--red);
}

.admin-modal-body {
    max-height: calc(82vh - 150px);
    padding: 16px;
    overflow-y: auto;
}

.admin-modal-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    border-top: 1px solid var(--line);
    background: #fafcff;
    color: var(--muted);
    font-size: 10.5px;
}

.media-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.media-picker-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    text-align: left;
    overflow: hidden;
}

.media-picker-item:hover {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px #e7f2ff;
}

.media-picker-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 5px;
}

.media-picker-item span {
    overflow: hidden;
    padding: 0 2px 3px;
    color: var(--muted);
    font-size: 9.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.media-picker-loading,
.media-picker-empty {
    grid-column: 1 / -1;
    padding: 34px 12px;
    color: var(--muted);
    font-size: 11.5px;
    text-align: center;
}

.media-picker-empty .admin-link {
    display: inline-block;
    margin-top: 8px;
}

/* ------------------------------------------------------------------ */
/* Avisos                                                             */
/* ------------------------------------------------------------------ */
.admin-flash-stack {
    position: fixed;
    top: 88px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(360px, calc(100vw - 32px));
}

.admin-flash {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    color: var(--text);
    font-size: 11.5px;
    line-height: 1.5;
    animation: admin-flash-in 0.25s ease both;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.admin-flash-success {
    border-left-color: var(--green);
}

.admin-flash-error {
    border-left-color: var(--red);
}

.admin-flash-info {
    border-left-color: var(--blue);
}

.admin-flash.is-hiding {
    opacity: 0;
    transform: translateX(16px);
}

.admin-flash-close {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
}

@keyframes admin-flash-in {
    from { opacity: 0; transform: translateY(-7px); }
    to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ */
/* Login                                                              */
/* ------------------------------------------------------------------ */
.login-body {
    background: var(--paper);
}

.login-shell {
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    min-height: 100vh;
}

.login-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 46px 52px;
    overflow: hidden;
    background:
        radial-gradient(75% 80% at 10% 100%, rgba(35, 134, 235, 0.32), transparent 60%),
        radial-gradient(65% 80% at 100% 0%, rgba(119, 193, 255, 0.12), transparent 55%),
        var(--navy-black);
    color: var(--white);
}

.login-aside-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(90deg, #000, transparent 80%);
    -webkit-mask-image: linear-gradient(90deg, #000, transparent 80%);
    pointer-events: none;
}

.login-aside-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-self: flex-start;
}

.login-aside-brand img {
    width: 132px;
    height: auto;
}

.login-aside-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin: auto 0;
    padding: 70px 0;
}

.login-eyebrow {
    display: inline-flex;
    color: var(--blue-light);
    font-family: var(--font-head);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.login-aside-content h2 {
    margin-top: 18px;
    color: var(--white);
    font-size: clamp(34px, 3.6vw, 48px);
    line-height: 1.14;
}

.login-aside-content > p {
    margin-top: 19px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14.5px;
    line-height: 1.7;
}

.login-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
}

.login-features li {
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 13px;
}

.login-features li span {
    display: inline-flex;
    position: relative;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(35, 134, 235, 0.2);
    border: 1px solid rgba(119, 193, 255, 0.35);
}

.login-features li span::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 4px;
    width: 5px;
    height: 7px;
    border-right: 1.5px solid var(--blue-light);
    border-bottom: 1.5px solid var(--blue-light);
    transform: rotate(40deg);
}

.login-aside-footer {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.3);
    font-size: 10.5px;
}

.login-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    background:
        radial-gradient(70% 80% at 100% 0%, rgba(35, 134, 235, 0.06), transparent 60%),
        #f4f7fb;
}

.login-card {
    width: min(420px, 100%);
    padding: 40px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
}

.login-mobile-brand {
    display: none;
    align-self: flex-start;
    margin-bottom: 24px;
    padding: 8px 13px;
    border-radius: 9px;
    background: var(--navy-deep);
}

.login-mobile-brand img {
    width: 110px;
    height: auto;
}

.login-card h1 {
    margin-top: 9px;
    font-size: 29px;
}

.login-subtitle {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.login-form {
    margin-top: 24px;
}

.login-form .admin-field input {
    min-height: 46px;
    font-size: 13px;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle.is-visible {
    background: #f1f6fc;
    color: var(--blue);
}

.login-form .admin-btn-lg {
    margin-top: 5px;
    min-height: 46px;
    font-size: 12.5px;
}

.login-links {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
    font-size: 10.5px;
}

.login-links a {
    color: var(--muted);
}

.login-links a:hover {
    color: var(--blue);
}

.login-note {
    margin-top: 16px;
    padding: 10px 11px;
    border-radius: 7px;
    background: #f6f9fd;
    color: #8b96a3;
    font-size: 9.5px;
    line-height: 1.55;
}

.login-flash-stack {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 18px;
}

.login-flash {
    padding: 10px 12px;
    border-radius: 7px;
    background: #eef6ff;
    color: #236fbd;
    font-size: 11px;
    line-height: 1.5;
}

.login-flash-error {
    background: var(--red-bg);
    color: #a92f2f;
}

.login-flash-success {
    background: var(--green-bg);
    color: #167454;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                         */
/* ------------------------------------------------------------------ */
@media (max-width: 1199px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: minmax(0, 1fr) 290px;
    }

    .admin-card-table .admin-table {
        min-width: 0;
    }

    .admin-card-table .admin-table th:nth-child(3),
    .admin-card-table .admin-table td:nth-child(3),
    .admin-card-table .admin-table th:nth-child(4),
    .admin-card-table .admin-table td:nth-child(4) {
        display: none;
    }

    .admin-card-table .table-post {
        min-width: 0;
    }

    .admin-card-table .table-post-title,
    .admin-card-table .table-post-meta {
        max-width: 260px;
    }

    .editor-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .media-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .settings-grid {
        grid-template-columns: 300px minmax(0, 1fr);
    }

    .settings-grid-profile {
        grid-template-columns: minmax(0, 1fr) 290px;
    }

    .login-aside {
        padding: 40px;
    }
}

@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        box-shadow: 12px 0 40px rgba(3, 11, 26, 0.24);
    }

    body.admin-nav-open .admin-sidebar {
        transform: translateX(0);
    }

    body.admin-nav-open .admin-sidebar-overlay {
        display: block;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-menu-toggle {
        display: flex;
    }

    .admin-topbar {
        padding: 12px 18px;
    }

    .admin-content {
        padding: 20px 18px 40px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-side {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .editor-layout {
        grid-template-columns: 1fr;
    }

    .editor-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .editor-sidebar .side-card:first-child {
        grid-column: 1 / -1;
    }

    .editor-toolbar {
        top: 76px;
    }

    .settings-grid,
    .settings-grid-profile {
        grid-template-columns: 1fr;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-aside {
        display: none;
    }

    .login-main {
        min-height: 100vh;
    }

    .login-mobile-brand {
        display: inline-flex;
    }

    .media-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .media-picker-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .admin-topbar {
        min-height: 68px;
    }

    .lead-tabs {
        padding: 12px 16px;
    }

    .lead-tab-link {
        margin-left: 0;
    }

    .admin-topbar-title h1 {
        font-size: 17px;
    }

    .admin-topbar-link {
        display: none;
    }

    .admin-content {
        padding: 16px 14px 36px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
        gap: 10px;
    }

    .stat-icon {
        width: 37px;
        height: 37px;
    }

    .stat-value {
        font-size: 23px;
    }

    .admin-welcome {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .admin-welcome h2 {
        font-size: 22px;
    }

    .admin-card-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .admin-filters {
        width: 100%;
    }

    .admin-search {
        flex: 1;
        min-width: 160px;
    }

    .admin-search input {
        width: 100%;
    }

    .editor-toolbar {
        position: static;
    }

    .editor-area {
        min-height: 400px;
        padding: 20px;
    }

    .editor-title-field input {
        padding: 14px;
        font-size: 22px;
    }

    .editor-sidebar {
        grid-template-columns: 1fr;
    }

    .editor-sidebar .side-card:first-child {
        grid-column: auto;
    }

    .editor-footer {
        flex-direction: column;
        gap: 4px;
    }

    .dashboard-side {
        grid-template-columns: 1fr;
    }

    .upload-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 12px;
    }

    .media-picker-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-filters select {
        flex: 1;
    }

    .admin-flash-stack {
        top: 78px;
        right: 14px;
    }

    .login-main {
        padding: 26px 16px;
    }

    .login-card {
        padding: 30px 24px;
    }

    .admin-field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .settings-aside {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-table td,
    .admin-table th {
        padding-inline: 11px;
    }

    .table-post {
        min-width: 220px;
    }

    .admin-card-table .admin-table {
        table-layout: fixed;
        min-width: 0;
        width: 100%;
    }

    .admin-card-table .admin-table th:nth-child(2),
    .admin-card-table .admin-table td:nth-child(2) {
        width: 96px;
    }

    .admin-card-table .admin-table th:last-child,
    .admin-card-table .admin-table td:last-child {
        width: 90px;
    }

    .admin-card-table .table-post {
        min-width: 0;
        gap: 0;
    }

    .admin-card-table .table-post img,
    .admin-card-table .table-post-placeholder {
        display: none;
    }

    .admin-card-table .table-post-title,
    .admin-card-table .table-post-meta {
        max-width: 100%;
    }

    .admin-topbar-actions .admin-btn span {
        display: none;
    }

    .admin-topbar-actions .admin-btn {
        padding: 9px 11px;
    }

    .login-card {
        padding: 26px 20px;
    }

    .login-card h1 {
        font-size: 25px;
    }

    .login-links {
        flex-direction: column;
        gap: 6px;
    }

    .admin-modal-foot {
        flex-direction: column;
        align-items: flex-start;
    }

    .media-grid {
        grid-template-columns: 1fr;
    }
}
