/* ════════════════════════════════════════════════════════════════════════
   SocialHub · Sistema de diseño v1
   Un solo archivo: 1) fuentes  2) tokens  3) base  4) componentes  5) layout
   Todo cuelga de variables CSS: para cambiar la marca basta el bloque 2.
   ════════════════════════════════════════════════════════════════════════ */

/* ── 1. Fuentes (autoalojadas: sin peticiones a terceros) ─────────────── */
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+1E00-1E9F, U+20A0-20C0; }

/* ── 2. Tokens ────────────────────────────────────────────────────────── */
:root {
  /* Paleta base: gris frío */
  --gray-0: #ffffff; --gray-25: #fbfbfc; --gray-50: #f6f7f9; --gray-100: #eef0f3; --gray-200: #e3e6eb;
  --gray-300: #cfd4dc; --gray-400: #9aa3b2; --gray-500: #6b7485; --gray-600: #4e5666; --gray-700: #3a4150;
  --gray-800: #252b37; --gray-900: #171b24; --gray-950: #0e1117;
  /* Marca: violeta */
  --brand-50: #f2f0ff; --brand-100: #e6e2ff; --brand-200: #cfc8ff; --brand-300: #ada1ff; --brand-400: #8a75fb;
  --brand-500: #6f52f2; --brand-600: #5b39de; --brand-700: #4a2cbc; --brand-800: #3d2699; --brand-900: #2f1f73;
  /* Estado */
  --green-50: #ecfdf3; --green-200: #b4ebc9; --green-600: #15803d; --green-700: #116432;
  --amber-50: #fff8e6; --amber-200: #fbdc8c; --amber-600: #b45309; --amber-700: #8f3f06;
  --red-50: #fef2f2; --red-200: #f9c6c6; --red-600: #c0262d; --red-700: #9b1c22;
  --blue-50: #eef5ff; --blue-200: #bcd7fb; --blue-600: #1d64c8; --blue-700: #174f9f;
  /* Redes (fijos en ambos temas) */
  --net-instagram: #d62976; --net-facebook: #1877f2; --net-x: #0f1419; --net-tiktok: #008f8f;

  /* Tipografía */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-xs: 0.75rem;    /* 12 · etiquetas, metadatos */
  --text-sm: 0.8125rem;  /* 13 · tablas, controles compactos */
  --text-md: 0.875rem;   /* 14 · cuerpo de la app */
  --text-lg: 1rem;       /* 16 · lectura, inputs en móvil */
  --text-xl: 1.125rem;   /* 18 · título de tarjeta/diálogo */
  --text-2xl: 1.375rem;  /* 22 · título de página */
  --text-3xl: 1.75rem;   /* 28 · cifras, portada */
  --text-4xl: 2.25rem;   /* 36 · hero */
  --leading-tight: 1.2; --leading-snug: 1.35; --leading-normal: 1.5; --leading-relaxed: 1.65;
  --weight-regular: 400; --weight-medium: 500; --weight-semibold: 600; --weight-bold: 700;
  --tracking-tight: -0.02em; --tracking-snug: -0.01em; --tracking-wide: 0.04em;

  /* Espaciado (base 4 px) */
  --space-0: 0; --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem; --space-5: 1.25rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem; --space-16: 4rem;

  /* Forma */
  --radius-xs: 4px; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-full: 999px;
  --control-sm: 1.875rem; --control-md: 2.25rem; --control-lg: 2.75rem;  /* alturas de control: 30 / 36 / 44 */

  /* Movimiento */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 120ms; --dur-base: 180ms; --dur-slow: 280ms;

  /* Capas */
  --z-sticky: 20; --z-dropdown: 40; --z-overlay: 60; --z-dialog: 70; --z-toast: 90;

  /* Layout */
  --sidebar-w: 248px; --sidebar-w-collapsed: 64px; --topbar-h: 56px; --content-max: 1200px; --aside-w: 340px;

  color-scheme: light;
  /* Semánticos · tema claro */
  --bg: var(--gray-50); --surface: var(--gray-0); --surface-2: var(--gray-25); --surface-sunken: var(--gray-100);
  --border: var(--gray-200); --border-strong: var(--gray-300);
  --text: var(--gray-900); --text-2: var(--gray-600); --text-3: var(--gray-500); --text-disabled: var(--gray-400);
  --primary: var(--brand-600); --primary-hover: var(--brand-700); --primary-active: var(--brand-800);
  --primary-soft: var(--brand-50); --primary-soft-hover: var(--brand-100); --primary-text: var(--brand-700); --on-primary: #fff;
  --success: var(--green-600); --success-soft: var(--green-50); --success-border: var(--green-200); --success-text: var(--green-700);
  --warning: var(--amber-600); --warning-soft: var(--amber-50); --warning-border: var(--amber-200); --warning-text: var(--amber-700);
  --danger: var(--red-600); --danger-hover: var(--red-700); --danger-soft: var(--red-50); --danger-border: var(--red-200); --danger-text: var(--red-700);
  --info: var(--blue-600); --info-soft: var(--blue-50); --info-border: var(--blue-200); --info-text: var(--blue-700);
  --ring: color-mix(in srgb, var(--brand-500) 45%, transparent);
  --scrim: rgb(14 17 23 / 0.5);
  --shadow-xs: 0 1px 2px rgb(16 24 40 / 0.05);
  --shadow-sm: 0 1px 3px rgb(16 24 40 / 0.08), 0 1px 2px rgb(16 24 40 / 0.04);
  --shadow-md: 0 6px 16px -4px rgb(16 24 40 / 0.1), 0 2px 6px -2px rgb(16 24 40 / 0.05);
  --shadow-lg: 0 20px 40px -12px rgb(16 24 40 / 0.2), 0 8px 16px -8px rgb(16 24 40 / 0.08);
}

/* Tema oscuro: explícito con data-theme="dark" o por preferencia del sistema si no se ha elegido */
:root[data-theme="dark"] { color-scheme: dark;
  --bg: #0c0e13; --surface: #14171e; --surface-2: #191d26; --surface-sunken: #0f1218;
  --border: #262b37; --border-strong: #363d4d;
  --text: #eef0f4; --text-2: #a9b1c0; --text-3: #8089a0; --text-disabled: #596175;
  --primary: var(--brand-500); --primary-hover: var(--brand-400); --primary-active: var(--brand-300);
  --primary-soft: #211b45; --primary-soft-hover: #2b2359; --primary-text: var(--brand-300); --on-primary: #fff;
  --success: #34c06e; --success-soft: #0f2a1b; --success-border: #1d4a30; --success-text: #6fdc9b;
  --warning: #e8a53a; --warning-soft: #2e2208; --warning-border: #55400f; --warning-text: #f3c56f;
  --danger: #ef5b61; --danger-hover: #f47a7f; --danger-soft: #2f1416; --danger-border: #5a2428; --danger-text: #f79498;
  --info: #5a9cf0; --info-soft: #11223b; --info-border: #1f3d68; --info-text: #8fbdf7;
  --net-x: #e7e9ea; --ring: color-mix(in srgb, var(--brand-400) 55%, transparent); --scrim: rgb(0 0 0 / 0.65);
  --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.4); --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.5);
  --shadow-md: 0 8px 20px -6px rgb(0 0 0 / 0.6); --shadow-lg: 0 24px 48px -12px rgb(0 0 0 / 0.7);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { color-scheme: dark;
  --bg: #0c0e13; --surface: #14171e; --surface-2: #191d26; --surface-sunken: #0f1218; --border: #262b37; --border-strong: #363d4d;
  --text: #eef0f4; --text-2: #a9b1c0; --text-3: #8089a0; --text-disabled: #596175;
  --primary: var(--brand-500); --primary-hover: var(--brand-400); --primary-active: var(--brand-300);
  --primary-soft: #211b45; --primary-soft-hover: #2b2359; --primary-text: var(--brand-300);
  --success: #34c06e; --success-soft: #0f2a1b; --success-border: #1d4a30; --success-text: #6fdc9b;
  --warning: #e8a53a; --warning-soft: #2e2208; --warning-border: #55400f; --warning-text: #f3c56f;
  --danger: #ef5b61; --danger-hover: #f47a7f; --danger-soft: #2f1416; --danger-border: #5a2428; --danger-text: #f79498;
  --info: #5a9cf0; --info-soft: #11223b; --info-border: #1f3d68; --info-text: #8fbdf7;
  --net-x: #e7e9ea; --ring: color-mix(in srgb, var(--brand-400) 55%, transparent); --scrim: rgb(0 0 0 / 0.65);
  --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.4); --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.5);
  --shadow-md: 0 8px 20px -6px rgb(0 0 0 / 0.6); --shadow-lg: 0 24px 48px -12px rgb(0 0 0 / 0.7); } }

/* ── 3. Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: var(--text-md); line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11"; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-xs); }
::selection { background: var(--brand-200); color: var(--gray-950); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }

/* Tipografía: estilos con nombre (úsalos en vez de tamaños sueltos) */
.t-display { font-size: var(--text-4xl); font-weight: 650; line-height: 1.1; letter-spacing: -0.03em; }
.t-h1 { font-size: var(--text-2xl); font-weight: var(--weight-semibold); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
.t-h2 { font-size: var(--text-xl); font-weight: var(--weight-semibold); line-height: var(--leading-snug); letter-spacing: var(--tracking-snug); }
.t-h3 { font-size: var(--text-md); font-weight: var(--weight-semibold); line-height: var(--leading-snug); }
.t-body { font-size: var(--text-md); line-height: var(--leading-normal); }
.t-body-lg { font-size: var(--text-lg); line-height: var(--leading-relaxed); }
.t-small { font-size: var(--text-sm); line-height: var(--leading-normal); }
.t-caption { font-size: var(--text-xs); line-height: var(--leading-snug); color: var(--text-3); }
.t-overline { font-size: 0.6875rem; font-weight: var(--weight-semibold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-3); }
.t-metric { font-size: var(--text-3xl); font-weight: var(--weight-semibold); line-height: 1.1; letter-spacing: var(--tracking-tight); font-variant-numeric: tabular-nums; }
.t-mono { font-family: var(--font-mono); font-size: 0.92em; }
.muted { color: var(--text-2); } .subtle { color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; } .clamp-2 { -webkit-line-clamp: 2; } .clamp-3 { -webkit-line-clamp: 3; }
.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; }
.link { color: var(--primary-text); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.link:hover { text-decoration-color: currentColor; }
code, kbd { font-family: var(--font-mono); font-size: 0.9em; }
:not(pre) > code { background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 0.05em 0.35em; }
kbd { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 0.3rem; font-size: 0.6875rem; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--radius-xs); }
.icon { width: 1rem; height: 1rem; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 1.25rem; height: 1.25rem; } .icon-sm { width: 0.875rem; height: 0.875rem; }

/* Utilidades de composición */
.stack { display: flex; flex-direction: column; gap: var(--gap, var(--space-4)); }
.row { display: flex; align-items: center; gap: var(--gap, var(--space-2)); }
.row-wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1 1 0; min-width: 0; }
.grid { display: grid; gap: var(--gap, var(--space-4)); }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ── 4. Componentes ───────────────────────────────────────────────────── */

/* Botones */
.btn { --btn-h: var(--control-md); display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; height: var(--btn-h); padding: 0 0.85rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--text);
  font-size: var(--text-sm); font-weight: var(--weight-medium); line-height: 1; white-space: nowrap; cursor: pointer; user-select: none; box-shadow: var(--shadow-xs);
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast); }
.btn:hover { background: var(--surface-sunken); }
.btn:active { transform: translateY(0.5px); box-shadow: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); border-color: var(--primary); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-soft { background: var(--primary-soft); border-color: transparent; color: var(--primary-text); box-shadow: none; }
.btn-soft:hover { background: var(--primary-soft-hover); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-sunken); color: var(--text); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }
.btn-danger-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--danger-text); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { --btn-h: var(--control-sm); padding: 0 0.6rem; font-size: var(--text-xs); border-radius: var(--radius-sm); }
.btn-lg { --btn-h: var(--control-lg); padding: 0 1.15rem; font-size: var(--text-md); }
.btn-icon { width: var(--btn-h); padding: 0; }
.btn-block { width: 100%; }
.btn[data-loading] { color: transparent !important; position: relative; pointer-events: none; }
.btn[data-loading]::after { content: ""; position: absolute; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--text-3); border-top-color: transparent; animation: spin 0.7s linear infinite; }
.btn-primary[data-loading]::after, .btn-danger[data-loading]::after { border-color: #fff; border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; } .btn-group > .btn { border-radius: 0; margin-left: -1px; }
.btn-group > .btn:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); margin-left: 0; } .btn-group > .btn:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

/* Formularios */
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text); }
.label .req { color: var(--danger); margin-left: 2px; } .label .opt { color: var(--text-3); font-weight: var(--weight-regular); margin-left: 0.3rem; }
.help { font-size: var(--text-xs); color: var(--text-3); }
.error-text { font-size: var(--text-xs); color: var(--danger-text); display: flex; gap: 0.3rem; align-items: center; }
.input, .select, .textarea { width: 100%; height: var(--control-md); padding: 0 0.7rem; background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md); font-size: var(--text-md); box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.input::placeholder, .textarea::placeholder { color: var(--text-disabled); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--gray-400); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface-sunken); color: var(--text-disabled); cursor: not-allowed; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger); }
.input[aria-invalid="true"]:focus, .textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 30%, transparent); }
.textarea { height: auto; min-height: 5.5rem; padding: 0.55rem 0.7rem; line-height: var(--leading-normal); resize: vertical; }
.select { appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7485' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.55rem center; }
.input-sm { height: var(--control-sm); font-size: var(--text-sm); } .input-lg { height: var(--control-lg); font-size: var(--text-lg); }
@media (max-width: 640px) { .input, .select, .textarea { font-size: 1rem; } } /* evita el zoom de iOS al enfocar */
.input-group { position: relative; display: flex; align-items: center; }
.input-group > .icon { position: absolute; left: 0.65rem; color: var(--text-3); pointer-events: none; }
.input-group > .icon ~ .input { padding-left: 2.1rem; }
.input-group > .suffix { position: absolute; right: 0.5rem; display: flex; gap: 0.2rem; color: var(--text-3); font-size: var(--text-xs); }
.check { display: inline-flex; align-items: flex-start; gap: 0.55rem; cursor: pointer; font-size: var(--text-md); }
.check input { appearance: none; flex: none; width: 1.125rem; height: 1.125rem; margin: 0.12rem 0 0; background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius-xs); cursor: pointer; display: grid; place-items: center; transition: background var(--dur-fast), border-color var(--dur-fast); }
.check input[type="radio"] { border-radius: 50%; }
.check input:hover { border-color: var(--primary); }
.check input:checked { background: var(--primary); border-color: var(--primary); }
.check input[type="checkbox"]:checked::after { content: ""; width: 0.6rem; height: 0.35rem; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.check input[type="radio"]:checked::after { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #fff; }
.check input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.check input:disabled { opacity: 0.5; cursor: not-allowed; }
.check small { display: block; color: var(--text-3); font-size: var(--text-xs); }
.switch { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.switch input { appearance: none; flex: none; width: 2.25rem; height: 1.25rem; margin: 0; border-radius: var(--radius-full); background: var(--border-strong); position: relative; cursor: pointer; transition: background var(--dur-base); }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--dur-base) var(--ease-out); }
.switch input:checked { background: var(--primary); } .switch input:checked::after { transform: translateX(1rem); }
.switch input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.dropzone { display: grid; place-items: center; gap: 0.4rem; padding: var(--space-8) var(--space-4); text-align: center; color: var(--text-2);
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-2); cursor: pointer; transition: border-color var(--dur-fast), background var(--dur-fast); }
.dropzone:hover, .dropzone[data-over] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); }
.counter { font-size: var(--text-xs); color: var(--text-3); font-variant-numeric: tabular-nums; } .counter[data-over] { color: var(--danger-text); font-weight: var(--weight-semibold); }

/* Insignias, chips, avatares */
.badge { display: inline-flex; align-items: center; gap: 0.3rem; height: 1.375rem; padding: 0 0.5rem; border-radius: var(--radius-full); border: 1px solid var(--border);
  background: var(--surface-sunken); color: var(--text-2); font-size: var(--text-xs); font-weight: var(--weight-medium); white-space: nowrap; }
.badge::before { content: ""; width: 0.375rem; height: 0.375rem; border-radius: 50%; background: currentColor; } .badge-plain::before { display: none; }
.badge-success { background: var(--success-soft); border-color: var(--success-border); color: var(--success-text); }
.badge-warning { background: var(--warning-soft); border-color: var(--warning-border); color: var(--warning-text); }
.badge-danger { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger-text); }
.badge-info { background: var(--info-soft); border-color: var(--info-border); color: var(--info-text); }
.badge-brand { background: var(--primary-soft); border-color: transparent; color: var(--primary-text); }
.badge-scheduled { border-style: dashed; }
.net { display: inline-grid; place-items: center; flex: none; width: 1.25rem; height: 1.25rem; border-radius: var(--radius-sm); color: #fff; font-size: 0.625rem; font-weight: var(--weight-bold); }
.net-instagram { background: linear-gradient(45deg, #f9a13a, #e1306c 45%, #833ab4); } .net-facebook { background: var(--net-facebook); }
.net-x { background: var(--net-x); color: var(--surface); } .net-tiktok { background: #111; box-shadow: inset 2px 0 0 #25f4ee, inset -2px 0 0 #fe2c55; }
.net-lg { width: 1.75rem; height: 1.75rem; border-radius: var(--radius-md); font-size: 0.75rem; }
.account { display: inline-flex; align-items: center; gap: 0.45rem; min-width: 0; font-size: var(--text-sm); font-weight: var(--weight-medium); }
.account small { color: var(--text-3); font-weight: var(--weight-regular); }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; height: 1.75rem; padding: 0 0.6rem; border: 1px solid var(--border-strong); border-radius: var(--radius-full); background: var(--surface); font-size: var(--text-sm); cursor: pointer; transition: all var(--dur-fast); }
.chip:hover { background: var(--surface-sunken); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-text); }
.avatar { display: inline-grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); font-size: var(--text-xs); font-weight: var(--weight-semibold); overflow: hidden; position: relative; }
.avatar-sm { width: 1.5rem; height: 1.5rem; font-size: 0.625rem; } .avatar-lg { width: 2.75rem; height: 2.75rem; font-size: var(--text-md); }
.avatar-net { overflow: visible; } .avatar-net .net { position: absolute; right: -6px; bottom: -6px; width: 0.875rem; height: 0.875rem; border: 2px solid var(--surface); box-sizing: content-box; border-radius: 6px; font-size: 0.4375rem; }
.avatar-lg.avatar-net .net { width: 1.125rem; height: 1.125rem; font-size: 0.5625rem; right: -5px; bottom: -5px; }
.avatar-stack { display: inline-flex; } .avatar-stack > * { margin-left: -0.45rem; box-shadow: 0 0 0 2px var(--surface); } .avatar-stack > :first-child { margin-left: 0; }

/* Superficies */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card-pad { padding: var(--space-5); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); }
.card-body { padding: var(--space-5); } .card-footer { padding: var(--space-3) var(--space-5); border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-interactive { transition: border-color var(--dur-fast), box-shadow var(--dur-base), transform var(--dur-base); cursor: pointer; }
.card-interactive:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.stat { display: flex; flex-direction: column; gap: 0.3rem; padding: var(--space-4) var(--space-5); }
.stat-label { font-size: var(--text-sm); color: var(--text-2); display: flex; align-items: center; gap: 0.4rem; }
.trend { font-size: var(--text-xs); font-weight: var(--weight-medium); } .trend-up { color: var(--success-text); } .trend-down { color: var(--danger-text); }
.alert { display: flex; gap: 0.7rem; padding: 0.75rem 0.9rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); font-size: var(--text-sm); }
.alert .icon { margin-top: 0.1rem; } .alert strong { display: block; font-weight: var(--weight-semibold); }
.alert-info { background: var(--info-soft); border-color: var(--info-border); color: var(--info-text); }
.alert-success { background: var(--success-soft); border-color: var(--success-border); color: var(--success-text); }
.alert-warning { background: var(--warning-soft); border-color: var(--warning-border); color: var(--warning-text); }
.alert-danger { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger-text); }
.empty { display: grid; justify-items: center; gap: 0.5rem; padding: var(--space-12) var(--space-6); text-align: center; color: var(--text-2); }
.empty-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: var(--radius-lg); background: var(--surface-sunken); color: var(--text-3); margin-bottom: 0.25rem; }
.empty h3 { color: var(--text); font-size: var(--text-lg); font-weight: var(--weight-semibold); } .empty p { max-width: 42ch; }
.skeleton { border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--surface-sunken) 25%, var(--border) 37%, var(--surface-sunken) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
.progress { height: 0.5rem; border-radius: var(--radius-full); background: var(--surface-sunken); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width var(--dur-slow) var(--ease-out); }
.spinner { width: 1.125rem; height: 1.125rem; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--primary); animation: spin 0.7s linear infinite; }

/* Tablas y listas */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); text-align: left; }
.table th { position: sticky; top: 0; padding: 0.6rem 1rem; background: var(--surface-2); color: var(--text-3); font-size: var(--text-xs); font-weight: var(--weight-medium); white-space: nowrap; border-bottom: 1px solid var(--border); }
.table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; } .table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; } .table-compact td { padding: 0.4rem 1rem; }
.list { display: flex; flex-direction: column; } .list > * + * { border-top: 1px solid var(--border); }
.list-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
a.list-item:hover, button.list-item:hover { background: var(--surface-2); } .list-item[aria-current="true"] { background: var(--primary-soft); box-shadow: inset 2px 0 0 var(--primary); }

/* Navegación */
.tabs { display: flex; gap: var(--space-5); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; padding: 0.6rem 0; background: none; border: 0; color: var(--text-2); font-size: var(--text-sm); font-weight: var(--weight-medium); white-space: nowrap; cursor: pointer; }
.tab:hover { color: var(--text); } .tab[aria-selected="true"], .tab[aria-current="page"] { color: var(--text); }
.tab[aria-selected="true"]::after, .tab[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--primary); border-radius: 2px 2px 0 0; }
.tab .count { margin-left: 0.35rem; padding: 0 0.4rem; border-radius: var(--radius-full); background: var(--surface-sunken); color: var(--text-3); font-size: 0.6875rem; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-sunken); border-radius: var(--radius-md); }
.segmented button { height: 1.75rem; padding: 0 0.7rem; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-2); font-size: var(--text-sm); font-weight: var(--weight-medium); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.breadcrumb { display: flex; align-items: center; gap: 0.4rem; font-size: var(--text-sm); color: var(--text-3); min-width: 0; }
.breadcrumb a:hover { color: var(--text); } .breadcrumb [aria-current] { color: var(--text); font-weight: var(--weight-medium); }
.pagination { display: flex; align-items: center; gap: 0.25rem; }
.stepper { display: flex; gap: var(--space-2); counter-reset: s; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 0.5rem; padding-top: 0.6rem; border-top: 2px solid var(--border); font-size: var(--text-sm); color: var(--text-3); counter-increment: s; }
.stepper li::before { content: counter(s); display: grid; place-items: center; width: 1.375rem; height: 1.375rem; border-radius: 50%; background: var(--surface-sunken); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.stepper li[data-state="done"] { border-color: var(--success); color: var(--text); } .stepper li[data-state="done"]::before { content: "✓"; background: var(--success); color: #fff; }
.stepper li[aria-current="step"] { border-color: var(--primary); color: var(--text); font-weight: var(--weight-medium); } .stepper li[aria-current="step"]::before { background: var(--primary); color: #fff; }

/* Menús flotantes */
.menu-wrap { position: relative; display: inline-block; }
.menu { position: absolute; z-index: var(--z-dropdown); top: calc(100% + 6px); right: 0; min-width: 13rem; padding: 0.3rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-4px) scale(0.98); transform-origin: top right; pointer-events: none; transition: opacity var(--dur-fast), transform var(--dur-base) var(--ease-out); }
.menu[data-open] { opacity: 1; transform: none; pointer-events: auto; } .menu-left { right: auto; left: 0; transform-origin: top left; }
.menu-item { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.45rem 0.6rem; border: 0; border-radius: var(--radius-sm); background: none; font-size: var(--text-sm); text-align: left; cursor: pointer; color: var(--text); }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-sunken); outline: none; } .menu-item .icon { color: var(--text-3); }
.menu-item-danger { color: var(--danger-text); } .menu-item-danger .icon { color: inherit; } .menu-item-danger:hover { background: var(--danger-soft); }
.menu-item kbd { margin-left: auto; } .menu-sep { height: 1px; margin: 0.3rem 0; background: var(--border); }
.menu-label { padding: 0.35rem 0.6rem 0.2rem; font-size: 0.6875rem; font-weight: var(--weight-semibold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-3); }
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; z-index: var(--z-dropdown); bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 0.3rem 0.5rem; border-radius: var(--radius-sm); background: var(--gray-900); color: #fff; font-size: var(--text-xs); font-weight: var(--weight-regular); white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-md); }

/* Diálogos, paneles laterales y avisos */
dialog.dialog { width: min(calc(100vw - 2rem), var(--dialog-w, 520px)); max-height: min(calc(100dvh - 2rem), 720px); padding: 0; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
dialog.dialog[open] { display: flex; flex-direction: column; animation: dialog-in var(--dur-slow) var(--ease-out); }
dialog::backdrop { background: var(--scrim); backdrop-filter: blur(2px); animation: fade-in var(--dur-base); }
.dialog-sm { --dialog-w: 400px; } .dialog-lg { --dialog-w: 760px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) var(--space-5) var(--space-3); }
.dialog-title { font-size: var(--text-xl); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-snug); line-height: var(--leading-snug); }
.dialog-desc { margin-top: 0.25rem; color: var(--text-2); font-size: var(--text-md); }
.dialog-body { padding: var(--space-2) var(--space-5) var(--space-5); overflow-y: auto; }
.dialog-footer { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-3) var(--space-5); border-top: 1px solid var(--border); background: var(--surface-2); }
.dialog-icon { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: var(--radius-full); background: var(--danger-soft); color: var(--danger); }
dialog.drawer { margin: 0 0 0 auto; width: min(100vw, var(--drawer-w, 460px)); height: 100dvh; max-height: none; border-radius: 0; border-width: 0 0 0 1px; }
dialog.drawer[open] { animation: drawer-in var(--dur-slow) var(--ease-out); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } } @keyframes drawer-in { from { transform: translateX(100%); } } @keyframes fade-in { from { opacity: 0; } }
@media (max-width: 640px) { /* en móvil el diálogo es una hoja inferior */
  dialog.dialog:not(.drawer) { margin: auto 0 0; width: 100vw; max-width: none; border-radius: var(--radius-xl) var(--radius-xl) 0 0; border-width: 1px 0 0; max-height: 90dvh; }
  dialog.dialog:not(.drawer)[open] { animation: sheet-in var(--dur-slow) var(--ease-out); }
  .dialog-footer { flex-direction: column-reverse; } .dialog-footer .btn { width: 100%; height: var(--control-lg); } }
@keyframes sheet-in { from { transform: translateY(100%); } }
.toasts { position: fixed; z-index: var(--z-toast); right: var(--space-4); bottom: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); width: min(calc(100vw - 2rem), 22rem); }
.toast { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.75rem 0.9rem; background: var(--gray-900); color: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); font-size: var(--text-sm); animation: toast-in var(--dur-slow) var(--ease-out); }
:root[data-theme="dark"] .toast { background: var(--surface-2); border: 1px solid var(--border-strong); }
.toast .icon { margin-top: 0.1rem; } .toast-success .icon { color: #5ee093; } .toast-danger .icon { color: #ff8a8f; }
.toast button { margin-left: auto; background: none; border: 0; color: var(--brand-300); font-weight: var(--weight-medium); cursor: pointer; white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* ── 5. Layout de aplicación ──────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; transition: grid-template-columns var(--dur-slow) var(--ease-out); }
.app[data-collapsed] { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); overflow: hidden; }
.sidebar-header { display: flex; align-items: center; gap: 0.6rem; height: var(--topbar-h); padding: 0 var(--space-4); flex: none; }
.brand-mark { display: grid; place-items: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: var(--radius-md); background: var(--primary); color: #fff; }
.brand-name { font-weight: var(--weight-semibold); letter-spacing: var(--tracking-snug); font-size: var(--text-lg); }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: var(--space-2) var(--space-3); }
.nav-section { margin-top: var(--space-5); padding: 0 var(--space-2) var(--space-1); font-size: 0.6875rem; font-weight: var(--weight-semibold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.nav-item { display: flex; align-items: center; gap: 0.65rem; height: 2.125rem; padding: 0 var(--space-2); border-radius: var(--radius-md); color: var(--text-2); font-size: var(--text-sm); font-weight: var(--weight-medium); white-space: nowrap; transition: background var(--dur-fast), color var(--dur-fast); }
.nav-item:hover { background: var(--surface-sunken); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--primary-soft); color: var(--primary-text); }
.nav-item .icon { width: 1.125rem; height: 1.125rem; } .nav-item .nav-badge { margin-left: auto; min-width: 1.25rem; height: 1.25rem; padding: 0 0.35rem; display: grid; place-items: center; border-radius: var(--radius-full); background: var(--danger); color: #fff; font-size: 0.6875rem; font-weight: var(--weight-semibold); }
.sidebar-footer { flex: none; padding: var(--space-3); border-top: 1px solid var(--border); }
.app[data-collapsed] .brand-name, .app[data-collapsed] .nav-item > span:not(.nav-badge), .app[data-collapsed] .nav-section, .app[data-collapsed] .sidebar-footer .grow { display: none; }
.app[data-collapsed] .nav-item { justify-content: center; padding: 0; } .app[data-collapsed] .nav-item .nav-badge { position: absolute; margin: -1rem 0 0 1.2rem; min-width: 0.5rem; width: 0.5rem; height: 0.5rem; padding: 0; font-size: 0; }
.app[data-collapsed] .sidebar-header { justify-content: center; padding: 0; }
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: var(--z-sticky); display: flex; align-items: center; gap: var(--space-3); height: var(--topbar-h); padding: 0 var(--space-6); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.content { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: var(--space-6); }
.content-narrow { max-width: 760px; } .content-wide { max-width: none; }
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3) var(--space-4); margin-bottom: var(--space-6); }
.page-header p { margin-top: 0.3rem; color: var(--text-2); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-4); }
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) var(--aside-w); gap: var(--space-6); align-items: start; }
.with-aside > * { min-width: 0; }
.with-aside > aside { position: sticky; top: calc(var(--topbar-h) + var(--space-6)); }
.split { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); height: calc(100dvh - var(--topbar-h)); }
.split-list { border-right: 1px solid var(--border); background: var(--surface); overflow-y: auto; } .split-detail { overflow-y: auto; }
.bottom-nav { display: none; }
.scrim { display: none; }
@media (max-width: 1023px) { .with-aside { grid-template-columns: minmax(0, 1fr); } .with-aside > aside { position: static; } }
@media (max-width: 767px) {
  .app, .app[data-collapsed] { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: var(--z-overlay); inset: 0 auto 0 0; width: min(86vw, 300px); transform: translateX(-100%); transition: transform var(--dur-slow) var(--ease-out); box-shadow: var(--shadow-lg); }
  .app[data-nav-open] .sidebar { transform: none; }
  .app[data-nav-open] .scrim { display: block; position: fixed; inset: 0; z-index: calc(var(--z-overlay) - 1); background: var(--scrim); }
  .topbar { padding: 0 var(--space-4); } .content { padding: var(--space-4); padding-bottom: 5.5rem; }
  .split { grid-template-columns: 1fr; height: auto; } .split-list { border-right: 0; } .split[data-detail-open] .split-list, .split:not([data-detail-open]) .split-detail { display: none; }
  .bottom-nav { position: fixed; z-index: var(--z-sticky); inset: auto 0 0 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 0.3rem 0.3rem calc(0.3rem + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
  .bottom-nav a { display: grid; justify-items: center; gap: 0.15rem; padding: 0.35rem 0; border-radius: var(--radius-md); color: var(--text-3); font-size: 0.6875rem; font-weight: var(--weight-medium); }
  .bottom-nav a[aria-current="page"] { color: var(--primary-text); } .bottom-nav .icon { width: 1.25rem; height: 1.25rem; }
  .hide-mobile { display: none !important; } }
@media (min-width: 768px) { .only-mobile { display: none !important; } }

/* ── 6. Patrones del dominio ──────────────────────────────────────────── */
.post { display: flex; gap: var(--space-4); padding: var(--space-4); }
.post-thumb { flex: none; width: 4.5rem; height: 4.5rem; border-radius: var(--radius-md); background: var(--surface-sunken); object-fit: cover; display: grid; place-items: center; color: var(--text-3); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.75rem; font-size: var(--text-xs); color: var(--text-3); }
.metrics { display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: var(--text-xs); color: var(--text-3); } .metrics b { color: var(--text); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; margin-right: 0.2rem; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.cal-head { padding: 0.5rem; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--text-3); text-align: center; }
.cal-day { min-height: 6.75rem; padding: 0.35rem; border-top: 1px solid var(--border); border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; cursor: pointer; transition: background var(--dur-fast); }
.cal-day:nth-child(7n + 1) { border-left: 0; } .cal-day:hover { background: var(--surface-2); } .cal-day[data-out] { background: var(--surface-2); color: var(--text-disabled); }
.cal-day[aria-selected="true"] { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary); }
.cal-num { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; font-size: var(--text-xs); font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; }
.cal-day[data-today] .cal-num { background: var(--primary); color: #fff; font-weight: var(--weight-semibold); }
.cal-event { display: flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.35rem; border-radius: var(--radius-xs); border-left: 3px solid var(--ev, var(--border-strong)); background: var(--surface-sunken); font-size: 0.6875rem; line-height: 1.3; }
.cal-event time { color: var(--text-3); font-variant-numeric: tabular-nums; } .cal-event span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event[data-state="scheduled"] { background: var(--info-soft); color: var(--info-text); outline: 1px dashed var(--info-border); outline-offset: -1px; }
.cal-event[data-state="failed"] { background: var(--danger-soft); color: var(--danger-text); }
.cal-more { font-size: 0.6875rem; color: var(--text-3); padding-left: 0.35rem; }
@media (max-width: 767px) { .cal-day { min-height: 3.25rem; } .cal-event { width: 0.4rem; height: 0.4rem; padding: 0; border: 0; border-radius: 50%; background: var(--ev, var(--text-3)); } .cal-event > * { display: none; } .cal-day { flex-direction: row; flex-wrap: wrap; align-content: flex-start; } .cal-num { width: 100%; justify-items: start; } .cal-more { display: none; } }
.comment { display: flex; gap: var(--space-3); } .comment-body { flex: 1; min-width: 0; }
.comment-bubble { padding: 0.6rem 0.8rem; border-radius: var(--radius-lg); background: var(--surface-sunken); } .comment[data-own] .comment-bubble { background: var(--primary-soft); }
.comment-replies { margin-top: var(--space-3); padding-left: var(--space-4); border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: var(--space-3); }
.phone { width: 260px; flex: none; border: 1px solid var(--border-strong); border-radius: 28px; padding: 8px; background: var(--surface); box-shadow: var(--shadow-md); }
.phone-screen { border-radius: 20px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.phone-media { aspect-ratio: 4 / 5; background: linear-gradient(135deg, var(--brand-200), var(--brand-500)); display: grid; place-items: center; color: #fff; }
