:root {
  color-scheme: light;
  --bg: #eef2f8; --paper: #fff; --soft: #f3f6fc; --text: #142340;
  --muted: #53637d; --line: #dae3ef; --accent: #3151d5; --accent-text: #fff;
  --tint: #e8edff; --danger: #a02554; --hero: #232c78; --mint: #baf2e2;
  --shadow: 0 14px 45px #142a5210;
  font-family: "Segoe UI", system-ui, sans-serif;
}
[data-theme="noche"] {
  color-scheme: dark;
  --bg: #111626; --paper: #192237; --soft: #202a42; --text: #eef2fd;
  --muted: #aebbd2; --line: #33405a; --accent: #a6b6ff; --accent-text: #171f42;
  --tint: #2a345b; --danger: #ffadc7; --hero: #23265f; --mint: #baf2e2;
  --shadow: 0 14px 40px #06091336;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; }
button, input, textarea, select { font: inherit; }
a { color: var(--accent); text-underline-offset: .2em; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #62bcb6; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.055em; line-height: 1.05; }
h2 { font-size: 1.32rem; letter-spacing: -.025em; }
h3 { font-size: 1.12rem; letter-spacing: -.02em; }
p { line-height: 1.55; color: var(--muted); }
small { font-size: .84rem; }
.shell { display: grid; grid-template-columns: 225px minmax(0, 1fr); min-height: 100vh; }
.shell.menu-hidden { grid-template-columns: minmax(0, 1fr); }
.sidebar { background: #101b2f; color: #f7f9ff; display: flex; flex-direction: column; padding: 28px 17px 21px; }
.sidebar[hidden] { display: none; }
.brand-link { text-decoration: none; color: inherit; margin: 0 7px 35px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.13rem; font-weight: 750; white-space: nowrap; }
.brand-logo { width: 42px; height: 42px; flex: none; object-fit: contain; border-radius: 11px; }
.brand strong { color: #a2abff; }
.brand small, .sidebar-bottom small { display: block; color: #a3b4d2; font-weight: 500; margin-top: 2px; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; text-decoration: none; color: #c8d4ea; padding: 7px 11px; border-radius: 11px; font-size: .94rem; font-weight: 600; white-space: nowrap; }
.sidebar nav a:hover { background: #20314e; color: white; }
.sidebar nav a[aria-current] { background: #2a3c64; color: #fff; }
.icon { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; background: var(--tint); border-radius: 9px; }
.icon img { display: block; width: 70%; height: 70%; object-fit: contain; }
.icon-performance::before {
  content: "";
  width: 18px;
  height: 18px;
  color: var(--accent);
  background: linear-gradient(currentColor, currentColor) left bottom / 4px 7px,
    linear-gradient(currentColor, currentColor) center bottom / 4px 12px,
    linear-gradient(currentColor, currentColor) right bottom / 4px 17px;
  background-repeat: no-repeat;
}
.sidebar .icon-performance::before { color: var(--mint); }
.sidebar .icon { background: #344665; }
.sidebar nav a[aria-current] .icon { background: #465982; }
.sidebar-bottom { margin-top: auto; padding: 26px 6px 0; display: flex; gap: 10px; align-items: center; }
.avatar { display: grid; place-items: center; width: 39px; height: 39px; background: #4358a3; border-radius: 50%; font-weight: 750; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 68px; padding: 12px clamp(18px,4vw,55px); border-bottom: 1px solid var(--line); background: var(--paper); }
.top-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.menu-toggle { display: inline-flex; align-items: center; flex: none; gap: 7px; min-height: 36px; }
.menu-bars { display: inline-block; width: 15px; height: 11px; border-block: 2px solid currentColor; position: relative; }
.menu-bars::after { position: absolute; inset: 50% 0 auto; height: 2px; background: currentColor; transform: translateY(-50%); content: ""; }
.account { color: var(--muted); overflow-wrap: anywhere; font-size: .9rem; }
.top-actions, .inline { display: flex; gap: 12px; align-items: center; }
.demo-label { font-size: .8rem; white-space: nowrap; color: var(--muted); }
.theme, .quiet { background: transparent; color: var(--accent); border: 0; border-radius: 8px; padding: 7px 9px; font-size: .875rem; font-weight: 700; white-space: nowrap; }
.theme { background: var(--tint); padding: 8px 13px; }
.quiet:hover, .theme:hover { background: var(--soft); }
.danger { color: var(--danger); }
.content { max-width: 1420px; margin: auto; padding: clamp(18px,4vw,50px); }
.hero, .login-art { position: relative; isolation: isolate; overflow: hidden; border-radius: 23px; background: radial-gradient(ellipse at 82% 106%, #5553b8, transparent 65%), linear-gradient(115deg,#192955,var(--hero)); color: white; box-shadow: var(--shadow); }
.hero { padding: clamp(24px,4vw,55px); min-height: 280px; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: clamp(12px,3vw,34px); align-items: center; }
.team-art { display: block; width: 100%; height: auto; object-fit: contain; }
.hero .team-art { justify-self: end; max-width: 500px; max-height: 265px; }
.hero h1, .login-art h1 { margin: 10px 0 9px; font-size: clamp(2.4rem,5vw,4.6rem); }
.hero h1 { font-size: clamp(2.1rem, 4.1vw, 3.9rem); overflow-wrap: anywhere; }
.hero p, .login-art p { color: #e1e7ff; font-size: 1.03rem; }
.eyebrow { color: var(--mint); font-weight: 780; font-size: .8rem; letter-spacing: .15em; }
.button { display: inline-flex; align-items: center; justify-content: center; width: fit-content; text-decoration: none; border: 0; border-radius: 11px; min-height: 43px; padding: 10px 16px; font-weight: 720; }
.button:hover { filter: brightness(.92); }
.primary { color: var(--accent-text); background: var(--accent); }
.hero-button { color: #142944; background: var(--mint); margin-top: 22px; }
.home-grid, .admin-grid { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(225px, 1fr); gap: 24px; margin-top: 27px; }
.line-head, .toolbar, .list-row, .proposal { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.line-head { margin: 0 0 13px; }
.line-head > span, .meta { color: var(--muted); font-size: .85rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.board-heading { min-height: 32px; }
.board-heading > span { border-radius: 99px; background: var(--tint); color: var(--accent); padding: 5px 10px; font-weight: 700; white-space: nowrap; }
.cork-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 173px), 1fr));
  gap: clamp(14px, 2.3vw, 25px);
  padding: clamp(19px, 3vw, 32px);
  align-items: stretch;
  background: linear-gradient(#54331933,#48271d5e), url('/visuals/board-cork.webp') center / 640px auto;
  background-color: #ac805d;
  border: 7px solid #493329;
  border-radius: 18px;
  box-shadow: inset 0 3px 13px #29140da8, var(--shadow);
}
[data-theme="noche"] .cork-board { background-image: linear-gradient(#3c272653,#2a1d2480), url('/visuals/board-cork.webp'); border-color: #352727; }
.paper-miel { --note-paper: #fff0b9; }
.paper-menta { --note-paper: #cef4dc; }
.paper-lavanda { --note-paper: #ebe0ff; }
.paper-coral { --note-paper: #ffdbce; }
.paper-cielo { --note-paper: #d8edff; }
.board-note { position: relative; min-width: 0; display: grid; }
.note-button, .board-empty {
  position: relative;
  background: linear-gradient(145deg, #ffffff48, #ffffff00 54%, #82482a13), var(--note-paper, #fff2cf);
  color: #282538;
  border: 1px solid #39261628;
  border-radius: 5px 5px 13px 5px;
  box-shadow: 0 5px 12px #301b2452;
}
.note-button { display: flex; flex-direction: column; gap: 10px; padding: 26px 13px 13px; text-align: start; inline-size: 100%; min-height: 205px; transition: transform .18s ease, box-shadow .18s ease; }
.note-button:hover, .note-button:focus-visible { transform: translateY(-3px); box-shadow: 0 8px 15px #301b247a; }
.note-button:focus-visible { outline-color: #17295c; }
.note-fastener { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); object-fit: contain; pointer-events: none; filter: drop-shadow(1px 2px 2px #2d272b69); }
.note-meta, .note-footer { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: .77rem; font-weight: 760; }
.note-meta { color: #544653; }
.note-state { white-space: nowrap; }
.note-title { font-size: 1.08rem; line-height: 1.2; overflow-wrap: anywhere; }
.note-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.45; }
.note-footer { margin-top: auto; color: #38406a; }
.note-pinned { color: #293b43; background: #ffffff78; padding: 3px 7px; border-radius: 99px; }
.note-reactions, .reaction-options { display: flex; flex-wrap: wrap; gap: 6px; }
.note-reactions:empty { display: none; }
.note-reactions > span { padding: 2px 6px; border-radius: 99px; background: #ffffff89; font-size: .76rem; white-space: nowrap; }
.reaction-emoji { font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.reaction-button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--text); background: var(--soft); }
.reaction-button .reaction-emoji { font-size: 1.2rem; }
.reaction-button .reaction-count { font-size: .83rem; font-weight: 700; }
.reaction-button:hover, .reaction-button[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); }
.board-empty { grid-column: 1 / -1; justify-self: center; text-align: center; max-width: 100%; padding: 27px 22px 20px; margin: 9px; }
.board-empty p { color: #393047; }
.board-empty a { display: inline-block; margin-top: 9px; color: #344c9b; font-weight: 750; }
.palette { display: flex; flex-wrap: wrap; gap: 7px; }
.palette label { display: flex; align-items: center; gap: 4px; }
.palette label span { padding: 4px 7px; border-radius: 7px; background: var(--note-paper, var(--soft)); color: var(--text); }
.palette label span:not(.paper-auto) { color: #29253a; }
.palette input { accent-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .note-button { transition: none; } }
.shortcuts { padding: 8px 14px; }
.shortcuts a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; color: var(--text); text-decoration: none; padding: 8px 2px; font-weight: 650; }
.shortcuts a + a { border-top: 1px solid var(--line); }
.shortcuts a:hover { color: var(--accent); }
.feedback { margin-top: 14px; padding: 18px; }
.feedback p, .feedback h3 { margin-bottom: 6px; }
.section-head { margin-bottom: 24px; }
.section-head p { margin-top: 8px; }
.toolbar { margin-bottom: 15px; }
.toolbar label { display: flex; align-items: center; gap: 8px; }
.proposal { padding: 15px 20px; margin-bottom: 10px; text-decoration: none; color: var(--text); }
.proposal:hover { border-color: var(--accent); }
.badge { padding: 5px 10px; border-radius: 20px; font-weight: 700; color: var(--accent); background: var(--tint); font-size: .82rem; text-align: center; }
.back { display: inline-block; margin-bottom: 14px; }
.form { display: grid; gap: 17px; padding: clamp(16px,3vw,26px); margin-bottom: 15px; min-width: 0; }
.form .form { padding: 0; margin: 0; border: 0; box-shadow: none; }
.form label, fieldset legend { font-size: .94rem; font-weight: 650; }
input:not([type="checkbox"]), textarea, select { padding: 9px 11px; color: var(--text); background: var(--soft); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.form input:not([type="checkbox"]), .form textarea, .form select { display: block; width: 100%; margin-top: 6px; }
textarea { min-height: 104px; resize: vertical; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; }
fieldset p { font-size: .9rem; margin-bottom: 8px; }
.check { display: flex; align-items: center; gap: 7px; padding: 4px 0; }
.check input { accent-color: var(--accent); width: 18px; height: 18px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.multiline { white-space: pre-wrap; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 8px 13px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 650; }
.tabs a[aria-current] { color: var(--accent); background: var(--tint); }
.admin-grid { margin-top: 0; align-items: start; grid-template-columns: 1fr 1fr; }
.list-row, .comment { padding: 9px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.list-row p { font-size: .88rem; }
.tool-panel, .empty { padding: 24px; }
.tool-panel h2 { margin: 10px 0 4px; }
.tool-panel p { margin-bottom: 15px; }
.shell-expanded { height: 100dvh; overflow: hidden; }
.shell-expanded .sidebar { overflow-y: auto; }
.shell-expanded .workspace { min-height: 0; display: flex; flex-direction: column; }
.shell-expanded .topbar { flex: none; }
.content-expanded { max-width: none; width: 100%; margin: 0; padding: 0; flex: 1; min-height: 0; }
.embedded-tool { display: flex; flex-direction: column; height: 100%; background: var(--paper); }
.embedded-tool > header { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 5px 14px; border-bottom: 1px solid var(--line); }
.embedded-tool h1 { font-size: .95rem; letter-spacing: normal; }
.embedded-tool .icon { width: 27px; height: 27px; }
.embedded-actions { display: flex; flex-wrap: wrap; margin-inline-start: auto; gap: 3px; }
.embedded-actions a { text-decoration: none; }
.embedded-tool iframe { flex: 1; min-height: 0; display: block; width: 100%; border: 0; background: #fff; }
.integration { padding: clamp(14px, 3vw, 23px); }
.integration > header, .integration-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.integration > header a { margin-inline-start: auto; }
.integration > form { margin: 17px 0 0; box-shadow: none; max-width: 640px; }
.integration-actions { justify-content: end; margin: 10px 0 4px; }
.integration-workspace { padding: 4px 0 10px; }
.integration-row { display: flex; width: 100%; align-items: center; justify-content: space-between; text-align: start; gap: 15px; padding: 13px 8px; border: 0; border-top: 1px solid var(--line); color: var(--text); background: var(--paper); overflow-wrap: anywhere; }
.integration-row small { display: block; color: var(--muted); margin-top: 4px; }
.mail-row:hover { background: var(--soft); }
.login { max-width: 1130px; margin: auto; padding: clamp(18px,5vw,65px); }
.login header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.login .brand small { color: var(--muted); }
.login .brand strong { color: var(--accent); }
.login-card { display: grid; grid-template-columns: 1.2fr 1fr; min-height: 465px; background: var(--paper); border: 1px solid var(--line); border-radius: 23px; box-shadow: var(--shadow); }
.login-art { padding: clamp(24px,4vw,45px); display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.login-art .team-art { align-self: end; max-width: 410px; max-height: 225px; }
.login-form { padding: clamp(22px,4vw,45px); align-self: center; }
.login-form p { margin: 7px 0 16px; }
.demo-account { display: block; width: 100%; padding: 11px 14px; margin: 9px 0; text-align: left; color: var(--text); background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.demo-account:hover { border-color: var(--accent); }
.demo-account small { display: block; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.toast { position: fixed; z-index: 3; bottom: 20px; right: 20px; max-width: calc(100vw - 40px); background: #143c3c; color: #fff; font-weight: 650; border-radius: 12px; padding: 13px 18px; box-shadow: var(--shadow); }
.toast.error { background: #81233a; }
dialog.card { width: min(520px, calc(100% - 36px)); color: var(--text); }
dialog::backdrop { background: #101b2f99; }
dialog.note-dialog { width: min(680px, calc(100% - 30px)); max-height: min(82vh, 760px); padding: 0; }
.note-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: clamp(16px, 4vw, 26px); border-bottom: 1px solid var(--line); }
.note-dialog header > div { min-width: 0; overflow-wrap: anywhere; }
.note-dialog header p { font-size: .86rem; margin-bottom: 6px; }
.note-description { padding: clamp(16px, 4vw, 26px); line-height: 1.65; }
.note-reaction-panel { display: grid; gap: 10px; border-top: 1px solid var(--line); padding: 16px clamp(16px, 4vw, 26px); }
.note-reaction-panel h3 { font-size: .95rem; }
@media (max-width: 950px) {
  .shell { grid-template-columns: 185px minmax(0,1fr); }
  .home-grid, .admin-grid { grid-template-columns: minmax(0,1fr); }
  .sidebar { padding-inline: 10px; }
}
@media (max-width: 650px) {
  .shell, .login-card { display: block; }
  .shell-expanded { display: flex; flex-direction: column; }
  .shell-expanded .workspace { flex: 1; }
  .shell-expanded .sidebar { flex: none; overflow-y: visible; }
  .sidebar { padding: 12px; }
  .brand-link { margin: 0 3px 10px; }
  .sidebar nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 5px; }
  .sidebar nav a { padding: 5px 7px; gap: 5px; min-height: 36px; }
  .sidebar nav .icon { width: 24px; height: 24px; }
  .sidebar-bottom, .demo-label { display: none; }
  .topbar { padding-inline: 12px; gap: 5px; }
  .top-identity, .top-actions { gap: 4px; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pair { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero .team-art, .login-art .team-art { max-width: 350px; max-height: 205px; }
  .login-art { min-height: 240px; }
  .toolbar { flex-wrap: wrap; }
}
