/* Shared visual foundations, loaded after each page's own layout. */
:root {
  --gremio-blue: #245bea;
  --gremio-ink: #17233b;
  --gremio-muted: #58677e;
  --gremio-line: #dce4ef;
  --gremio-radius: 14px;
}
body { font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif; }
button, input, textarea, select { font-family: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #245bea; outline-offset: 3px; }
button:disabled { cursor: not-allowed; }
img { max-width: 100%; }
textarea { max-width: 100%; }
[hidden] { display: none !important; }
.gremio-app-header {
  box-sizing: border-box; position: sticky !important; top: 0; left: 0; z-index: 1000;
  width: 100%; min-height: 68px; height: 68px !important; padding: 0 max(20px, calc((100% - 1200px) / 2)) !important;
  display: flex !important; align-items: center; justify-content: space-between; gap: 24px;
  background: #fff; color: var(--gremio-ink); border-bottom: 1px solid var(--gremio-line);
  box-shadow: 0 2px 12px #17233b06;
}
.gremio-app-header > .logo { margin: 0 !important; color: var(--gremio-blue); font-size: 25px; font-weight: 800; letter-spacing: -.8px; line-height: 1; text-decoration: none; }
.gremio-app-header .gremio-app-links { display: flex; align-items: center; gap: 24px; margin-left: auto; padding: 0; background: none; box-shadow: none; }
.gremio-app-header .gremio-app-links a { width: auto; margin: 0; padding: 12px 0; font-size: 14px; color: var(--gremio-muted); font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent; border-radius: 0; }
.gremio-app-header .gremio-app-links a:hover, .gremio-app-header .gremio-app-links a[aria-current] { color: var(--gremio-blue); border-bottom-color: var(--gremio-blue); background: none; }
.gremio-app-header .profile-menu { position: relative; margin: 0; }
.gremio-app-header .profile-button { width: auto !important; min-height: 42px; padding: 10px 17px; border: 1px solid var(--gremio-line); border-radius: 10px; background: #fff; color: var(--gremio-ink); font-size: 14px; font-weight: 600; box-shadow: none; transform: none; cursor: pointer; }
.gremio-app-header .profile-button:hover { background: #f2f6ff; border-color: #b6cafb; }
.gremio-app-header .profile-dropdown { box-sizing: border-box; display: none; position: absolute; top: calc(100% + 10px); right: 0; left: auto; min-width: 220px; max-height: calc(100dvh - 90px); overflow-y: auto; padding: 6px; margin: 0; list-style: none; background: #fff; border: 1px solid var(--gremio-line); border-radius: 14px; box-shadow: 0 12px 35px #17233b20; }
.gremio-app-header .profile-dropdown.show { display: block; }
.gremio-app-header .profile-dropdown li { margin: 0; padding: 0; }
.gremio-app-header .profile-dropdown a { display: block; padding: 12px; color: var(--gremio-ink); border-radius: 8px; font-size: 14px; line-height: 1.4; text-decoration: none; }
.gremio-app-header .profile-dropdown a:hover { background: #f2f6ff; color: var(--gremio-blue); }
.gremio-app-header .profile-dropdown [aria-current] { color: var(--gremio-blue); background: #f2f6ff; }
.gremio-app-page { background: #f6f8fc; padding-top: 0 !important; }
.gremio-app-page :is(button[type="submit"], .save-button, .config-button, .auth-button) { min-height: 44px; }
.gremio-app-page :is(input[type="text"], input[type="email"], input[type="password"], input[type="search"], textarea, select) { font-size: 16px; }
.gremio-app-page .categories-container { position: static; width: min(1200px, calc(100% - 32px)); margin: 16px auto 0; }
.gremio-app-page .category-menu-btn { position: static !important; display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: auto; height: 42px; padding: 8px 14px; border: 1px solid var(--gremio-line); border-radius: 10px; box-shadow: none; color: var(--gremio-ink); background: #fff; }
.gremio-app-page .category-menu-btn::after { content: 'Categorías'; font-size: 14px; font-weight: 500; }
body:has(.auth-container) { background: #f6f8fc; }
.auth-header { box-sizing: border-box; display: flex; align-items: center; min-height: 68px; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--gremio-line); box-shadow: 0 2px 12px #17233b06; }
.auth-header .header-content { width: min(1200px, 100%); margin: 0 auto; padding: 0; }
.auth-header .logo { margin: 0; font-size: 25px; color: var(--gremio-blue); line-height: 1; }
.gremio-app-page > .container, .gremio-app-page > .wrap { margin-top: 32px; }
.gremio-app-page > .container { width: calc(100% - 32px); margin-left: auto; margin-right: auto; }
.gremio-app-page .profile-page { padding-top: 32px; }
.gremio-app-page h1, .gremio-app-page h2 { line-height: 1.25; }
.gremio-app-page :is(.auth-card, .card, .profile-container) { border-radius: var(--gremio-radius); }
.gremio-app-page :is(.input-field, .form-input) { min-height: 44px; font-size: 16px; }
.gremio-app-page .header-section { box-sizing: border-box; display: block; width: min(1200px, calc(100% - 32px)); max-width: 1200px; margin: 20px auto; padding: 24px; text-align: left; }
.gremio-app-page .header-section .header { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; color: var(--gremio-ink); box-shadow: none; font-size: clamp(26px, 3vw, 34px); text-align: left; }
.gremio-app-page .header-section .header-subtitle { max-width: none; margin: 10px 0 0; padding: 0; color: var(--gremio-muted); font-size: 16px; line-height: 1.5; text-align: left; }
.gremio-app-page .header-section .buttons { display: flex; width: 100%; justify-content: flex-start; margin: 16px 0 0; padding: 0; }
.gremio-app-page .guest-auth-banner { margin-top: 20px; padding: 16px; font-size: 14px; line-height: 1.5; background: #f0f5ff; }
.gremio-page-hint { margin: 0 0 20px; color: var(--gremio-muted); font-size: 15px; line-height: 1.6; }
.gremio-app-page .comment-replies:empty { margin: 0; padding: 0; }
.gremio-dialog { box-sizing: border-box; position: fixed; inset: 0; width: min(460px, calc(100% - 32px)); max-width: 460px; max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 1px solid #dce4ef; border-radius: 18px; color: #17233b; background: #fff; box-shadow: 0 24px 90px #0f172a40; text-align: left; overflow-y: auto; }
.gremio-dialog::backdrop { background: #101b32a8; backdrop-filter: blur(3px); }
.gremio-dialog__panel { padding: 28px; }
.gremio-dialog__icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 18px; border-radius: 12px; color: #245bea; background: #edf3ff; font-size: 23px; font-weight: 700; }
.gremio-dialog .gremio-dialog__title { margin: 0 0 10px; padding: 0; color: #17233b; font-size: 22px; font-weight: 700; line-height: 1.3; }
.gremio-dialog .gremio-dialog__message { margin: 0; padding: 0; color: #58677e; font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.gremio-dialog__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.gremio-dialog .gremio-dialog__button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 110px; min-height: 44px; margin: 0; padding: 11px 18px; border: 1px solid transparent; border-radius: 10px; background: #245bea; color: #fff; font-size: 15px; font-weight: 600; line-height: 1.3; cursor: pointer; box-shadow: none; transform: none; }
.gremio-dialog .gremio-dialog__button:hover { background: #1747c5; }
.gremio-dialog .gremio-dialog__button--secondary { background: #fff; border-color: #dce4ef; color: #17233b; }
.gremio-dialog .gremio-dialog__button--secondary:hover { background: #f1f5fb; }
.gremio-dialog .gremio-dialog__button--danger { background: #c8323f; }
.gremio-dialog .gremio-dialog__label { display: block; margin: 20px 0 8px; font-size: 14px; font-weight: 600; }
.gremio-dialog .gremio-dialog__input { box-sizing: border-box; width: 100%; margin: 0; padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #17233b; font-size: 16px; line-height: 1.5; resize: vertical; }
.gremio-notifications { position: fixed; bottom: 24px; right: 24px; z-index: 20000; display: grid; gap: 10px; width: min(390px, calc(100% - 32px)); }
.gremio-toast { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid #dce4ef; border-left: 4px solid #245bea; border-radius: 12px; color: #17233b; background: #fff; box-shadow: 0 8px 30px #17233b20; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.gremio-toast .gremio-toast__close { flex: 0 0 36px; width: 36px; height: 36px; min-height: 36px; margin: 0 0 0 auto; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #58677e; font-size: 24px; box-shadow: none; }
.gremio-skip-link { position: fixed; top: -100px; left: 16px; z-index: 50000; padding: 12px 18px; background: #fff; color: #245bea; border-radius: 8px; }
.gremio-skip-link:focus { top: 12px; }
@media (max-width: 600px) {
  .gremio-app-header { height: 64px !important; min-height: 64px; padding: 0 16px !important; gap: 12px; }
  .gremio-app-header .gremio-app-links { display: none; }
  .gremio-app-header .profile-menu { margin-left: auto; }
  .gremio-app-page > .container, .gremio-app-page > .wrap { margin-top: 20px; }
  .gremio-app-page .header-section { padding: 20px; margin: 20px auto; }
  .gremio-dialog__panel { padding: 24px 20px; }
  .gremio-dialog__actions { flex-wrap: nowrap; }
  .gremio-dialog .gremio-dialog__button { flex: 1; min-width: 0; }
  .gremio-notifications { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
