:root {
    --blue-950: #08244a;
    --blue-900: #0b3268;
    --blue-800: #0b478f;
    --blue-700: #0d5db8;
    --blue-600: #1473d2;
    --blue-100: #e9f3ff;
    --blue-50: #f4f9ff;
    --red-700: #b42332;
    --red-600: #d12f42;
    --red-100: #fdecef;
    --green-700: #157347;
    --green-100: #e8f7ef;
    --amber-700: #9a5b00;
    --amber-100: #fff4d8;
    --ink: #152033;
    --muted: #667085;
    --line: #dce4ee;
    --surface: #ffffff;
    --background: #f4f7fb;
    --sidebar-width: 272px;
    --topbar-height: 78px;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(16, 48, 88, 0.08);
    --shadow-lg: 0 24px 60px rgba(8, 36, 74, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    color-scheme: light;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--background);
    font-family: "Manrope", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button {
    color: inherit;
}

:focus-visible {
    outline: 3px solid rgba(20, 115, 210, 0.3);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Acceso */
.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 15%, rgba(20, 115, 210, 0.18), transparent 28rem),
        linear-gradient(135deg, #f8fbff 0%, #edf5ff 52%, #fff4f5 100%);
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.login-card {
    width: min(100%, 460px);
    padding: 42px;
    border: 1px solid rgba(220, 228, 238, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-lg);
}

.login-logo {
    display: inline-flex;
    margin-bottom: 30px;
}

.login-logo img {
    width: 152px;
    max-height: 64px;
    object-fit: contain;
    object-position: left center;
}

.login-heading {
    margin-bottom: 26px;
}

.login-heading > span,
.page-kicker {
    color: var(--blue-700);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-heading h1 {
    margin: 6px 0 7px;
    color: var(--blue-950);
    font-family: "Oswald", sans-serif;
    font-size: clamp(34px, 7vw, 44px);
    line-height: 1.1;
}

.login-heading p,
.page-heading p,
.panel-heading p,
.panel-title p {
    margin: 0;
    color: var(--muted);
}

.back-site {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.back-site:hover {
    color: var(--blue-700);
}

/* Estructura */
.admin-sidebar {
    position: fixed;
    z-index: 50;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    color: #fff;
    background: linear-gradient(180deg, var(--blue-950), #061b38);
    box-shadow: 8px 0 30px rgba(8, 36, 74, 0.12);
}

.admin-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-brand img {
    width: 138px;
    height: 48px;
    object-fit: contain;
    object-position: left center;
    filter: brightness(0) invert(1);
}

.admin-brand span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.admin-sidebar nav {
    display: grid;
    gap: 6px;
    margin-top: 24px;
}

.admin-sidebar nav a,
.sidebar-bottom a,
.sidebar-bottom button {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 0;
    border-radius: 11px;
    color: rgba(255, 255, 255, 0.78);
    background: transparent;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: 160ms ease;
}

.admin-sidebar nav a i,
.sidebar-bottom a i,
.sidebar-bottom button i {
    width: 22px;
    font-size: 19px;
    text-align: center;
}

.admin-sidebar nav a:hover,
.sidebar-bottom a:hover,
.sidebar-bottom button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.admin-sidebar nav a.active {
    color: var(--blue-950);
    background: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.sidebar-bottom {
    display: grid;
    gap: 4px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.admin-topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 38px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.admin-topbar > div:nth-of-type(1) {
    display: flex;
    flex-direction: column;
}

.topbar-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-topbar strong {
    color: var(--blue-950);
    font-size: 17px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--blue-900);
    background: var(--blue-50);
    font-size: 13px;
    font-weight: 800;
}

.admin-user i {
    font-size: 21px;
}

.sidebar-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    cursor: pointer;
    font-size: 24px;
}

.sidebar-overlay {
    position: fixed;
    z-index: 40;
    inset: 0;
    display: none;
    background: rgba(5, 19, 39, 0.55);
    backdrop-filter: blur(2px);
}

.admin-content {
    width: min(100%, 1440px);
    margin: 0 auto;
    padding: 34px 38px 56px;
}

/* Encabezados y paneles */
.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.page-heading h1 {
    margin: 5px 0 6px;
    color: var(--blue-950);
    font-family: "Oswald", sans-serif;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.12;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    color: var(--blue-700);
    font-size: 13px;
    font-weight: 800;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel-heading,
.panel-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.panel-heading {
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
}

.panel-heading h2,
.panel-title h2 {
    margin: 0 0 3px;
    color: var(--blue-950);
    font-size: 19px;
}

.panel-title {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.panel-title > i {
    width: 44px;
    height: 44px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    color: var(--blue-700);
    background: var(--blue-100);
    font-size: 21px;
}

.text-action {
    flex: 0 0 auto;
    color: var(--blue-700);
    font-size: 14px;
    font-weight: 800;
}

.welcome-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding: 34px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(125deg, var(--blue-900), var(--blue-600));
    box-shadow: 0 18px 40px rgba(13, 93, 184, 0.22);
}

.welcome-panel::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -80px;
    bottom: -160px;
    border: 42px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.welcome-panel > * {
    position: relative;
    z-index: 1;
}

.welcome-panel span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.welcome-panel h1 {
    margin: 5px 0 6px;
    font-family: "Oswald", sans-serif;
    font-size: clamp(31px, 4vw, 42px);
}

.welcome-panel p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

/* Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 15px;
    min-height: 126px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform 160ms ease, border-color 160ms ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #a8c9ed;
}

.stat-card > i:first-child {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--blue-700);
    background: var(--blue-100);
    font-size: 23px;
}

.stat-card strong,
.stat-card span {
    display: block;
}

.stat-card strong {
    color: var(--blue-950);
    font-family: "Oswald", sans-serif;
    font-size: 30px;
    line-height: 1.1;
}

.stat-card span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.stat-card > i:last-child {
    color: #9aabc0;
}

.simple-list > a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    min-height: 78px;
    padding: 13px 24px;
    border-bottom: 1px solid var(--line);
}

.simple-list > a:last-child {
    border-bottom: 0;
}

.simple-list > a:hover {
    background: var(--blue-50);
}

.simple-list strong,
.simple-list small {
    display: block;
}

.simple-list small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.list-thumb {
    width: 50px;
    height: 50px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: #8aa0b9;
    background: #eef3f8;
    font-size: 20px;
}

.list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 290px;
    padding: 36px 20px;
    text-align: center;
}

.panel-empty.large {
    min-height: calc(100vh - 210px);
}

.panel-empty > i {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 18px;
    color: var(--blue-700);
    background: var(--blue-100);
    font-size: 30px;
}

.panel-empty h1,
.panel-empty h3 {
    margin: 0 0 7px;
    color: var(--blue-950);
}

.panel-empty p {
    margin: 0 0 20px;
    color: var(--muted);
}

/* Botones y estados */
.admin-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 11px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    transition: 150ms ease;
}

.admin-button:hover {
    transform: translateY(-1px);
}

.admin-button.primary {
    color: #fff;
    background: var(--blue-700);
    box-shadow: 0 6px 16px rgba(13, 93, 184, 0.2);
}

.admin-button.primary:hover {
    background: var(--blue-800);
}

.admin-button.secondary {
    border-color: var(--line);
    color: var(--blue-900);
    background: #fff;
}

.admin-button.secondary:hover {
    border-color: #a8c9ed;
    background: var(--blue-50);
}

.admin-button.light {
    color: var(--blue-900);
    background: #fff;
}

.admin-button.full {
    width: 100%;
}

.icon-button {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--blue-800);
    background: #fff;
    cursor: pointer;
    font-size: 16px;
}

.icon-button:hover {
    border-color: #a8c9ed;
    background: var(--blue-50);
}

.icon-button.danger {
    color: var(--red-700);
}

.icon-button.danger:hover {
    border-color: #efb6bd;
    background: var(--red-100);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status.published {
    color: var(--green-700);
    background: var(--green-100);
}

.status.hidden {
    color: #667085;
    background: #edf0f4;
}

/* Alertas */
.alert {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 650;
    transition: opacity 180ms ease, transform 180ms ease;
}

.alert > i {
    font-size: 19px;
}

.alert button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 7px;
    color: currentColor;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
}

.alert button:hover {
    background: rgba(0, 0, 0, 0.06);
}

.alert-success {
    color: var(--green-700);
    border-color: #b7e3cc;
    background: var(--green-100);
}

.alert-danger,
.alert-error {
    color: var(--red-700);
    border-color: #f2bcc3;
    background: var(--red-100);
}

.alert-info {
    color: var(--blue-800);
    border-color: #b9d8f8;
    background: var(--blue-100);
}

.alert-warning {
    color: var(--amber-700);
    border-color: #f0d58f;
    background: var(--amber-100);
}

.alert.is-closing {
    opacity: 0;
    transform: translateY(-6px);
}

/* Formularios */
.admin-form {
    display: grid;
    gap: 22px;
}

.admin-form.panel {
    display: block;
    padding: 28px;
}

.form-section {
    padding: 28px;
}

.form-stack {
    display: grid;
    gap: 19px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.field {
    min-width: 0;
}

.field.full-width {
    grid-column: 1 / -1;
}

.field > label {
    display: inline-block;
    margin-bottom: 8px;
    color: #27364b;
    font-size: 13px;
    font-weight: 800;
}

.field > label > span {
    color: var(--red-600);
}

.field small,
.switch-field small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.field input:not([type="checkbox"]):not([type="file"]),
.field select,
.field textarea,
.media-controls input,
.media-row input {
    width: 100%;
    border: 1px solid #cbd6e2;
    border-radius: 10px;
    color: var(--ink);
    background: #fff;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input:not([type="checkbox"]):not([type="file"]),
.field select {
    height: 46px;
    padding: 0 13px;
}

.field textarea {
    min-height: 110px;
    padding: 12px 13px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.media-controls input:focus,
.media-row input:focus {
    outline: 0;
    border-color: var(--blue-600);
    box-shadow: 0 0 0 4px rgba(20, 115, 210, 0.11);
}

.field input::placeholder,
.field textarea::placeholder {
    color: #98a4b3;
}

.input-icon {
    position: relative;
}

.input-icon > i {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #8291a3;
    font-size: 17px;
}

.input-icon input:not([type="checkbox"]):not([type="file"]) {
    padding-left: 43px;
}

.input-icon input[type="password"],
.input-icon input[type="text"] {
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: 17px;
}

.password-toggle:hover {
    color: var(--blue-700);
    background: var(--blue-50);
}

.slug-field {
    display: flex;
    align-items: stretch;
}

.slug-field > span {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #cbd6e2;
    border-right: 0;
    border-radius: 10px 0 0 10px;
    color: var(--muted);
    background: #f3f6f9;
    font-size: 13px;
    white-space: nowrap;
}

.slug-field input:not([type="checkbox"]):not([type="file"]) {
    min-width: 0;
    border-radius: 0 10px 10px 0;
}

.switch-field {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 72px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--blue-50);
}

.switch-field strong {
    display: block;
    color: #27364b;
    font-size: 13px;
}

.switch-field small {
    margin-top: 2px;
}

.switch {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
    margin: 0;
    cursor: pointer;
}

.switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #aeb9c7;
    transition: 180ms ease;
}

.switch span::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
    transition: 180ms ease;
}

.switch input:checked + span {
    background: var(--blue-600);
}

.switch input:checked + span::after {
    transform: translateX(20px);
}

.switch input:focus-visible + span {
    outline: 3px solid rgba(20, 115, 210, 0.3);
    outline-offset: 2px;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
    color: var(--red-700);
    font-size: 13px;
    font-weight: 700;
}

.check-label input {
    width: 17px;
    height: 17px;
    accent-color: var(--red-600);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    margin: 28px -28px -28px;
    padding: 18px 28px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
    background: #f8fafc;
}

/* Cargas y multimedia */
.drop-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 24px;
    border: 2px dashed #afc8e3;
    border-radius: 14px;
    color: var(--blue-900);
    background: var(--blue-50);
    text-align: center;
    cursor: pointer;
    transition: 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragover {
    border-color: var(--blue-600);
    background: #eaf4ff;
}

.drop-zone.has-files {
    border-style: solid;
    border-color: var(--blue-600);
}

.drop-zone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.drop-zone > i {
    margin-bottom: 8px;
    color: var(--blue-600);
    font-size: 34px;
}

.drop-zone strong {
    font-size: 15px;
}

.drop-zone span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.drop-zone .file-summary {
    max-width: 100%;
    color: var(--blue-800);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.drop-zone.compact {
    min-height: 118px;
}

.drop-zone.compact > i {
    font-size: 27px;
}

.featured-current {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
}

.featured-current img {
    width: 94px;
    height: 74px;
    object-fit: cover;
    border-radius: 9px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.media-item {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.image-item > img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #eef2f6;
}

.media-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    padding: 10px;
}

.media-controls label,
.media-row label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.media-controls input,
.media-row input {
    width: 62px;
    height: 36px;
    padding: 0 8px;
}

.media-list {
    display: grid;
    gap: 9px;
    margin-bottom: 18px;
}

.media-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 13px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fafbfd;
}

.media-row > i {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--red-700);
    background: var(--red-100);
    font-size: 20px;
}

.media-row strong,
.media-row small {
    display: block;
}

.media-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-row small {
    max-width: 520px;
    margin-top: 2px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sticky-actions {
    position: sticky;
    z-index: 20;
    bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 16px;
    border: 1px solid #c9d8e8;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 38px rgba(8, 36, 74, 0.18);
    backdrop-filter: blur(14px);
}

.sticky-actions > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.sticky-actions > span i {
    margin-right: 5px;
    color: var(--blue-600);
}

.sticky-actions > div {
    display: flex;
    gap: 10px;
}

/* Tablas */
.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius);
}

.admin-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    color: #5e6d80;
    background: #f6f8fb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background: var(--blue-50);
}

.admin-table td strong,
.admin-table td small {
    display: block;
}

.admin-table td small {
    max-width: 350px;
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    white-space: nowrap;
}

.row-actions form {
    display: inline-flex;
}

/* Adaptación */
@media (max-width: 1050px) {
    .admin-sidebar {
        transform: translateX(-105%);
        transition: transform 220ms ease;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-overlay {
        display: block;
    }

    .admin-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: grid;
        place-items: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .admin-topbar {
        height: 68px;
        padding: 0 18px;
    }

    .admin-content {
        padding: 24px 18px 40px;
    }

    .admin-user span,
    .topbar-label {
        display: none;
    }

    .admin-user {
        padding: 7px;
        background: transparent;
    }

    .page-heading,
    .welcome-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .page-heading .admin-button,
    .welcome-panel .admin-button {
        width: 100%;
    }

    .stats-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .field.full-width {
        grid-column: auto;
    }

    .welcome-panel {
        padding: 26px;
    }

    .panel-heading {
        align-items: flex-start;
        padding: 19px;
    }

    .form-section,
    .admin-form.panel {
        padding: 20px;
    }

    .form-actions {
        margin: 24px -20px -20px;
        padding: 16px 20px;
    }

    .simple-list > a {
        grid-template-columns: auto minmax(0, 1fr) auto;
        padding: 13px 16px;
    }

    .simple-list > a > .status {
        grid-column: 2;
        justify-self: start;
    }

    .simple-list > a > i:last-child {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .media-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .media-row label {
        grid-column: 2;
    }

    .media-row .icon-button {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .sticky-actions {
        bottom: 8px;
        align-items: stretch;
        flex-direction: column;
    }

    .sticky-actions > span {
        display: none;
    }

    .sticky-actions > div,
    .sticky-actions .admin-button {
        flex: 1;
    }

    .admin-table-wrap {
        overflow: visible;
    }

    .admin-table {
        min-width: 0;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
    }

    .admin-table tr {
        padding: 15px;
        border-bottom: 1px solid var(--line);
    }

    .admin-table tr:last-child {
        border-bottom: 0;
    }

    .admin-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 7px 0;
        border: 0;
        text-align: right;
    }

    .admin-table td:first-child {
        display: block;
        margin-bottom: 7px;
        text-align: left;
    }

    .admin-table td:nth-child(2)::before {
        content: "Categoría / Productos";
    }

    .admin-table td:nth-child(3)::before {
        content: "Orden";
    }

    .admin-table td:nth-child(4)::before {
        content: "Estado";
    }

    .admin-table td:nth-child(2)::before,
    .admin-table td:nth-child(3)::before,
    .admin-table td:nth-child(4)::before {
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .admin-table .row-actions {
        justify-content: flex-end;
        margin-top: 6px;
        padding-top: 12px;
        border-top: 1px dashed var(--line);
    }
}

@media (max-width: 520px) {
    .login-wrap {
        padding: 16px;
    }

    .login-card {
        padding: 28px 22px;
        border-radius: 18px;
    }

    .admin-sidebar {
        width: min(86vw, 300px);
    }

    .admin-topbar > div:nth-of-type(1) strong {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .panel-title {
        align-items: flex-start;
    }

    .slug-field {
        display: block;
    }

    .slug-field > span {
        min-height: 35px;
        border-right: 1px solid #cbd6e2;
        border-bottom: 0;
        border-radius: 10px 10px 0 0;
    }

    .slug-field input:not([type="checkbox"]):not([type="file"]) {
        border-radius: 0 0 10px 10px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .form-actions .admin-button {
        width: 100%;
    }

    .featured-current {
        align-items: flex-start;
    }

    .featured-current img {
        width: 78px;
        height: 66px;
    }

    .media-grid {
        grid-template-columns: 1fr;
    }

    .sticky-actions > div {
        flex-direction: column-reverse;
    }

    .sticky-actions .admin-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
