/* Publicaciones / sistema visual neobrutalista */
:root, :root:has(body) {
  color-scheme: light;
  --ink: #181817; --paper: #f5f0e4; --yellow: #f6d94f; --pink: #f5aac0; --blue: #a9c7ed; --mint: #b6dfbb;
  --bg-primary: var(--paper); --bg-secondary: #eee6d5; --bg-tertiary: #e5dcc8; --bg-card: #fffdf6; --bg-elevated: #fffdf6; --bg-inset: #f1eadb;
  --text-primary: var(--ink); --text-secondary: #363633; --text-muted: #55554e; --text-inverse: #181817;
  --border-default: var(--ink); --border-strong: var(--ink); --accent: #181817; --link: #181817;
  --color-primary: var(--yellow); --color-primary-hover: #ffe776; --color-primary-light: #f9e99b; --color-secondary: #181817;
  --color-success: #205d30; --color-success-light: #c5e8c6; --color-warning: #6e4800; --color-warning-light: #f9e99b;
  --color-danger: #8b1c24; --color-danger-strong: #6e1018; --color-danger-light: #f8c5c8; --color-info: #174577; --color-info-light: #c7def7;
  --u-calm-fg: #173c22; --u-calm-bg: #c5e8c6; --u-soon-fg: #533700; --u-soon-bg: #f9e99b; --u-urgent-fg: #6e1018; --u-urgent-bg: #f8c5c8; --u-expired-fg: #6e1018; --u-expired-bg: #f8d8d7;
  --radius-sm: 0; --radius-md: 0; --radius-lg: 0; --radius-xl: 0; --radius-2xl: 0; --radius-full: 0;
  --card-shadow: 5px 5px 0 var(--ink); --card-shadow-hover: 7px 7px 0 var(--ink); --pop-shadow: 8px 8px 0 var(--ink); --ring: 0 0 0 3px #f6d94f;
}
body { background-color: var(--paper); background-image: linear-gradient(#1818170c 1px, transparent 1px), linear-gradient(90deg, #1818170c 1px, transparent 1px); background-size: 32px 32px; color: var(--ink); }
:focus-visible { outline: 3px solid #335fff !important; outline-offset: 3px; }
.main-nav { background: var(--paper); border-bottom: 3px solid var(--ink); backdrop-filter: none; }
.nav-container { max-width: 1320px; min-height: 78px; }
.nav-link { display: flex; align-items: center; gap: 12px; font-size: 1.2rem; font-weight: 900; letter-spacing: -.05em; line-height: 1; text-decoration: none; }
.nav-link small { display: block; font: 700 .62rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; background: var(--yellow); border: 2px solid var(--ink); font-size: 1.8rem; }
.user-menu-toggle, .user-menu-panel { border: 2px solid var(--ink); background: #fffdf6; border-radius: 0; box-shadow: 3px 3px 0 var(--ink); }
.account-avatar { border: 2px solid var(--ink); background: var(--pink); border-radius: 0; }
.account-menu-item:hover { background: var(--yellow); }
.main-content { padding-top: 32px; padding-bottom: 80px; }
.container { max-width: 1320px; }
.board-header { position: relative; min-height: 0; padding: clamp(24px, 3vw, 40px); background: var(--yellow); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); margin: 0 8px 44px 0; overflow: hidden; }
.eyebrow { color: var(--ink); font-family: var(--font-mono); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.board-title { font-size: clamp(2.7rem, 5vw, 4.5rem); line-height: 1; font-weight: 900; letter-spacing: -.065em; max-width: 850px; margin: 12px 0; }
.board-title em { font-style: normal; color: var(--ink); -webkit-text-fill-color: currentColor; background: none; }
.board-description { max-width: 380px; font-weight: 600; line-height: 1.45; margin: 0 0 14px; }
.board-summary { display: inline-flex; background: var(--paper); border: 2px solid var(--ink); padding: 8px 12px; color: var(--ink); font-weight: 700; }
.board-summary .live-dot { background: #23834b; box-shadow: none; }
.board-stamp { position: absolute; right: 7%; bottom: 14%; display: grid; place-items: center; width: 96px; height: 96px; border: 3px solid var(--ink); background: var(--pink); transform: rotate(8deg); text-align: center; font: 900 .85rem/1.2 var(--font-mono); }
.filters-section { display: grid; grid-template-columns: 1fr minmax(180px, .8fr) minmax(220px, 1fr); align-items: end; gap: 18px; background: var(--blue); border: 3px solid var(--ink); padding: 20px; margin-bottom: 44px; box-shadow: 5px 5px 0 var(--ink); }
.filter-heading { display: flex; flex-direction: column; gap: 5px; }
.filter-heading span, .filter-institution > span, .filter-search label { display: block; font: 800 .68rem/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px; }
.filter-heading strong { font-size: 1.25rem; letter-spacing: -.04em; }
.filter-search { max-width: none; width: 100%; }
.filter-search-icon { top: auto; bottom: 15.5px; left: 14px; transform: none; color: var(--ink); }
.filter-select, .filter-search-input, .form-group input, .form-group textarea, .form-group select { color: var(--ink); background-color: #fffdf6; border: 2px solid var(--ink); border-radius: 0; min-height: 48px; }
.filter-search-input { padding-left: 40px; }
.filter-select:focus, .filter-search-input:focus, .form-group input:focus, .form-group textarea:focus { border-color: var(--ink); box-shadow: var(--ring); }
.list-heading { display: flex; justify-content: space-between; gap: 12px; padding: 0 0 12px; margin-bottom: 20px; border-bottom: 3px solid var(--ink); font: 800 .72rem/1.3 var(--font-mono); letter-spacing: .06em; }
.avisos-container { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.aviso-card { background: #fffdf6; border: 3px solid var(--ink); border-radius: 0; padding: 22px; box-shadow: 5px 5px 0 var(--ink); }
.aviso-card::before { display: none; }
.aviso-card:hover { transform: translate(-2px,-2px); border-color: var(--ink); box-shadow: 7px 7px 0 var(--ink); }
.aviso-top { flex-wrap: wrap; }
.inst-chip, .countdown { color: var(--ink); border: 2px solid var(--ink); border-radius: 0; background: var(--blue); padding: 5px 8px; font-weight: 800; }
.aviso-title { font-size: 1.55rem; font-weight: 900; line-height: 1.12; letter-spacing: -.04em; overflow-wrap: anywhere; }
.aviso-card .descripcion { color: var(--text-secondary); }
.aviso-meta { border-top: 2px solid var(--ink); }
.meta-item, .meta-item svg { color: var(--ink); }
.btn { border: 2px solid var(--ink); border-radius: 0; box-shadow: 3px 3px 0 var(--ink); font-weight: 800; color: var(--ink); }
.btn:hover:not(:disabled) { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); border-color: var(--ink); }
.btn:active:not(:disabled) { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary, .btn-primary:hover:not(:disabled) { color: var(--ink); background: var(--yellow); border-color: var(--ink); }
.btn-outline { background: #fffdf6; border-color: var(--ink); }
.btn-danger, .btn-danger:hover:not(:disabled) { color: var(--ink); background: #f49c9e; border-color: var(--ink); }
.btn-text { box-shadow: none; }
.no-content { border: 3px solid var(--ink); background: #fffdf6; border-radius: 0; box-shadow: 5px 5px 0 var(--ink); padding: 40px 24px; }
.no-content-icon { background: var(--yellow); border: 2px solid var(--ink); border-radius: 0; }
.page-header { padding: 30px; border: 3px solid var(--ink); background: var(--yellow); box-shadow: 6px 6px 0 var(--ink); }
.page-header h1 { font-size: clamp(3rem, 6vw, 5rem); line-height: 1; font-weight: 900; letter-spacing: -.06em; margin: 14px 0; }
.page-header p { font-weight: 600; margin: 0; }
.admin-period { color: #ac394c; }
.admin-stats { gap: 20px; }
.stat-card { border: 3px solid var(--ink); border-radius: 0; background: var(--mint); box-shadow: 5px 5px 0 var(--ink); }
.stat-card:nth-child(2) { background: var(--pink); }
.stat-card:nth-child(3) { background: var(--blue); }
.stat-card::before { display: none; }
.stat-icon, .stat-card:nth-child(n) .stat-icon { background: #fffdf6; color: var(--ink); border: 2px solid var(--ink); border-radius: 0; }
.stat-content h3 { font-size: 2.5rem; font-weight: 900; }
.stat-content p { color: var(--ink); font-weight: 800; }
.admin-actions { padding: 24px; background: #fffdf6; border: 3px solid var(--ink); gap: 14px; }
.csv-help-card, .aviso-form, .admin-table-container, .modal-content, .result-stat { border: 3px solid var(--ink); border-radius: 0; background: #fffdf6; box-shadow: 5px 5px 0 var(--ink); }
.csv-help-card { background: var(--blue); }
.admin-table-container { overflow-x: auto; }
.admin-table { min-width: 700px; }
.admin-table th { color: var(--ink); background: var(--yellow); border-bottom: 2px solid var(--ink); font-weight: 900; }
.admin-table td { border-bottom: 1px solid var(--ink); color: var(--ink); }
.admin-table .institution-badge { background: var(--blue); color: var(--ink); border: 1px solid var(--ink); border-radius: 0; }
.selection-bar { background: var(--blue); border-bottom: 2px solid var(--ink); }
.selection-count { color: var(--ink); }
.section-header h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 900; letter-spacing: -.04em; }
.modal { background: #181817b5; }
.modal-content { max-height: calc(100dvh - 32px); overflow: auto; }
.modal-header { border-bottom: 2px solid var(--ink); }
.csv-preview-table-container { overflow: auto; border: 2px solid var(--ink); }
.toast { background: #fffdf6; color: var(--ink); border: 2px solid var(--ink); border-left-width: 8px; border-radius: 0; box-shadow: 4px 4px 0 var(--ink); }
.loading-screen { background: var(--yellow); color: var(--ink); }
@media (max-width: 800px) {
  .filters-section { grid-template-columns: 1fr 1fr; }
  .filter-heading { grid-column: 1 / -1; }
  .board-stamp { width: 95px; height: 95px; font-size: .65rem; right: 6%; bottom: 8%; }
  .board-description { max-width: 65%; }
}
@media (max-width: 520px) {
  .container { padding-inline: 16px; }
  .nav-container { min-height: 68px; }
  .board-header { min-height: 0; padding: 26px 20px; margin-bottom: 28px; }
  .board-title { font-size: clamp(2.5rem, 10vw, 3.5rem); }
  .board-stamp { display: none; }
  .board-description { max-width: none; }
  .filters-section { grid-template-columns: 1fr; margin-bottom: 30px; }
  .filter-heading { grid-column: auto; }
  .list-heading { font-size: .62rem; }
  .admin-actions { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; } }
body::before, .nav-link::before { display: none; }
.loading-spinner { border: 4px solid var(--ink); border-top-color: transparent; border-radius: 50%; }
