/* BIS! Canal Cultural — panel de administración */
:root {
  --bis-pink: #FF007A;
  --bis-pink-dark: #d90068;
  --bis-cream: #F5EBDD;
  --bis-black: #0E0E0E;
  --side-w: 250px;
  --bs-body-font-family: 'Montserrat', system-ui, sans-serif;
  --bs-link-color: #d90068;
  --bs-link-hover-color: #a8004f;
  --bs-link-color-rgb: 217, 0, 104;
  --bs-link-hover-color-rgb: 168, 0, 79;
}
body.admin { background: #f5f2ed; font-size: 14px; color: #1d1d1d; }
.text-pink { color: var(--bis-pink) !important; }
.min-w-0 { min-width: 0; }
a { text-decoration: none; }

.btn-bis {
  --bs-btn-color: #fff; --bs-btn-bg: var(--bis-pink); --bs-btn-border-color: var(--bis-pink);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--bis-pink-dark); --bs-btn-hover-border-color: var(--bis-pink-dark);
  --bs-btn-active-bg: var(--bis-pink-dark); --bs-btn-active-color: #fff; --bs-btn-disabled-bg: var(--bis-pink); --bs-btn-disabled-border-color: var(--bis-pink);
  font-weight: 700; letter-spacing: .03em;
}
.form-control:focus, .form-select:focus { border-color: var(--bis-pink); box-shadow: 0 0 0 .2rem rgba(255,0,122,.15); }
.form-check-input:checked { background-color: var(--bis-pink); border-color: var(--bis-pink); }
.form-check-input:focus { border-color: var(--bis-pink); box-shadow: 0 0 0 .2rem rgba(255,0,122,.15); }
.form-label { font-weight: 600; font-size: .8rem; color: #444; margin-bottom: .35rem; }

/* Layout */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-side { background: var(--bis-black) !important; color: #ddd; width: var(--side-w); flex-shrink: 0; display: flex; flex-direction: column; }
@media (min-width: 992px) {
  .admin-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
@media (max-width: 991.98px) {
  .admin-side.offcanvas-lg { --bs-offcanvas-width: 270px; background: var(--bis-black); }
}
.admin-brand { padding: 1.3rem 1.3rem 1rem; display: flex; align-items: center; justify-content: space-between; }
.admin-brand img { height: 56px; }
.admin-nav { padding: .5rem .8rem; flex-grow: 1; }
.admin-nav a { display: flex; align-items: center; gap: .8rem; color: #cfc6ba; padding: .62rem .9rem; border-radius: 10px; font-weight: 600; font-size: .86rem; margin-bottom: 2px; transition: background .15s, color .15s; }
.admin-nav a .bi { font-size: 1.05rem; width: 20px; text-align: center; }
.admin-nav a:hover { background: #1c1c1c; color: #fff; }
.admin-nav a.active { background: var(--bis-pink); color: #fff; }
.admin-nav a .badge { background: var(--bis-pink); font-size: .7rem; }
.admin-nav a.active .badge { background: #fff; color: var(--bis-pink); }
.admin-nav-sep { height: 1px; background: #262626; margin: .8rem .5rem; }
.admin-user { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.3rem; border-top: 1px solid #222; }
.admin-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--bis-pink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.admin-avatar.sm { width: 32px; height: 32px; font-size: .8rem; }
.admin-user-name { color: #fff; font-weight: 700; font-size: .85rem; }
.admin-user-role { color: #8b8378; font-size: .72rem; }

.admin-main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 2rem; background: #fff; border-bottom: 1px solid #e8e2d9; position: sticky; top: 0; z-index: 100; }
.admin-title { font-family: 'Oswald', sans-serif; font-weight: 700; text-transform: uppercase; font-size: 1.5rem; margin: 0; letter-spacing: .01em; }
.admin-content { padding: 1.8rem 2rem 3rem; }
@media (max-width: 767.98px) { .admin-top, .admin-content { padding-left: 1rem; padding-right: 1rem; } }

/* Paneles */
.panel { background: #fff; border: 1px solid #e8e2d9; border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.03); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.3rem; border-bottom: 1px solid #efe9e0; }
.panel-head h2, .panel-subtitle { font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: 1.05rem; margin: 0; letter-spacing: .02em; }
.panel-subtitle { margin-bottom: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.panel-subtitle .bi { color: var(--bis-pink); }
.panel .table { --bs-table-hover-bg: #faf7f2; }
.panel .table > :not(caption) > * > * { padding: .8rem 1rem; border-color: #f0ebe3; }
.panel .table thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #8a8178; font-weight: 700; background: #fcfaf7; }

.stat-card { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid #e8e2d9; border-radius: 14px; padding: 1.2rem 1.3rem; color: inherit; height: 100%; }
a.stat-card:hover { border-color: var(--bis-pink); color: inherit; }
.stat-card > .bi { width: 48px; height: 48px; border-radius: 12px; background: rgba(255,0,122,.1); color: var(--bis-pink); display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0; }
.stat-num { display: block; font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.8rem; line-height: 1; }
.stat-label { font-size: .76rem; color: #7a7168; }
.top-list { list-style: none; counter-reset: t; padding: .4rem 1.3rem 1rem; margin: 0; }
.top-list li { counter-increment: t; display: flex; gap: .8rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px solid #f0ebe3; }
.top-list li:last-child { border: 0; }
.top-list li::before { content: counter(t); font-family: 'Oswald', sans-serif; font-weight: 700; color: var(--bis-pink); font-size: 1.2rem; min-width: 18px; }
.top-list a { color: #1d1d1d; font-weight: 600; flex-grow: 1; }
.top-list span { font-size: .78rem; color: #8a8178; }

/* Estados */
.badge-st { font-weight: 600; font-size: .7rem; padding: .4em .7em; border-radius: 999px; }
.st-publicado { background: #e3f6ea; color: #157a3d; }
.st-borrador { background: #eeebe6; color: #666; }
.st-pendiente { background: #fff1d6; color: #9a6400; }
.st-programado { background: #e6efff; color: #2457b8; }
.role-admin { background: var(--bis-black); }
.role-editor { background: var(--bis-pink); }
.role-autor { background: #8a8178; }

/* Listado de noticias */
.filters { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.3rem; border-bottom: 1px solid #efe9e0; }
.status-tabs .nav-link { color: #555; font-weight: 600; font-size: .82rem; padding: .4rem .85rem; border-radius: 999px; }
.status-tabs .nav-link.active { background: var(--bis-black); color: #fff; }
.status-tabs .count { font-size: .7rem; opacity: .65; margin-left: .2rem; }
.thumb { width: 72px; height: 48px; border-radius: 6px; overflow: hidden; background: #eee; display: flex; align-items: center; justify-content: center; color: #bbb; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-pag .pagination { --bs-pagination-active-bg: var(--bis-pink); --bs-pagination-active-border-color: var(--bis-pink); --bs-pagination-color: #333; margin: 0; }
.btn-group form .btn { border-radius: 0; }

/* Editor */
.title-input { font-family: 'Oswald', sans-serif; font-size: 1.9rem; font-weight: 600; border: 0; border-bottom: 2px solid #eee; border-radius: 0; padding: .3rem 0; }
.title-input:focus { box-shadow: none; border-color: var(--bis-pink); }
.slug-row { display: flex; align-items: center; gap: .4rem; margin-top: .6rem; flex-wrap: wrap; }
.slug-row code { color: #8a8178; }
.slug-input { width: auto; flex: 1; min-width: 160px; font-family: monospace; font-size: .8rem; }
.publish-box { border-top: 4px solid var(--bis-pink); }
@media (min-width: 1200px) { .publish-box { position: sticky; top: 90px; } }
.image-drop { position: relative; border: 2px dashed #ddd; border-radius: 12px; min-height: 170px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #faf8f5; transition: border-color .15s; }
.image-drop.drag, .image-drop:hover { border-color: var(--bis-pink); }
.image-drop img { width: 100%; height: auto; display: block; }
.image-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.image-drop-empty { text-align: center; color: #8a8178; display: flex; flex-direction: column; gap: .4rem; padding: 1rem; }
.image-drop-empty .bi { font-size: 2rem; color: var(--bis-pink); }
.media-current { display: flex; flex-direction: column; gap: .5rem; }
.media-current video { max-width: 420px; width: 100%; border-radius: 8px; background: #000; }
.media-current audio { width: 100%; max-width: 480px; }
.tox-tinymce { border-radius: 10px !important; border-color: #ddd !important; }

/* Publicidad / agenda */
.ad-thumb { max-width: 120px; max-height: 60px; border-radius: 4px; border: 1px solid #eee; }
.ad-preview { max-width: 100%; max-height: 140px; border-radius: 6px; border: 1px solid #eee; }
.date-chip { display: inline-block; background: var(--bis-pink); color: #fff; text-align: center; font-size: .6rem; font-weight: 700; letter-spacing: .1em; padding: .25rem .5rem; line-height: 1.1; border-radius: 4px; margin-right: .3rem; vertical-align: middle; }
.date-chip span { display: block; font-family: 'Oswald', sans-serif; font-size: 1.15rem; letter-spacing: 0; }
.logo-preview { width: 140px; height: 70px; background: var(--bis-black); border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: .4rem; flex-shrink: 0; }
.logo-preview img { max-width: 100%; max-height: 100%; }
.save-bar { position: sticky; bottom: 0; background: rgba(245,242,237,.95); backdrop-filter: blur(6px); padding: 1rem 0; border-top: 1px solid #e8e2d9; margin-top: 1rem; }

/* Login */
.login-page { min-height: 100vh; background: var(--bis-black); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; position: relative; overflow: hidden; color: var(--bis-cream); }
.login-tear { position: absolute; background: var(--bis-pink); }
.login-tear-1 { top: 0; right: 0; width: 34vw; height: 50vh; clip-path: polygon(22% 0, 100% 0, 100% 100%, 86% 88%, 92% 76%, 70% 64%, 78% 52%, 52% 40%, 60% 28%, 34% 16%, 40% 8%); }
.login-tear-2 { bottom: 0; left: 0; width: 26vw; height: 36vh; clip-path: polygon(0 100%, 0 20%, 14% 34%, 10% 12%, 32% 28%, 36% 4%, 54% 26%, 66% 0, 72% 34%, 100% 52%, 82% 64%, 100% 100%); }
.login-box { position: relative; z-index: 1; width: 100%; max-width: 400px; background: #151515; border: 1px solid #2a2a2a; border-radius: 18px; padding: 2.4rem 2.2rem; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.login-logo { display: block; width: 190px; margin: 0 auto 1rem; }
.login-box h1 { font-family: 'Oswald', sans-serif; text-transform: uppercase; text-align: center; font-size: 1.15rem; letter-spacing: .14em; color: #bdb3a6; margin-bottom: 1.6rem; }
.login-box .form-label { color: #bdb3a6; }
.login-box .form-control { background: #0E0E0E; border-color: #333; color: var(--bis-cream); }
.login-back { display: block; text-align: center; margin-top: 1.3rem; color: #8a8178; font-size: .82rem; }
.login-back:hover { color: var(--bis-pink); }
