/* ═══════════ Panel de administración ═══════════ */
.topbar { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.86); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1280px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 17px; letter-spacing: -.02em; text-decoration: none !important; }
.brand img { width: 34px; height: 34px; border-radius: 10px; object-fit: contain; }
.nav { display: flex; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 14px; text-decoration: none; transition: all .15s; }
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a[aria-current="page"] { background: var(--primary-50); color: var(--primary-600); }
.nav .i { width: 18px; height: 18px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; }
.user-btn:hover { border-color: var(--line-strong); }
.user-btn .avatar { --size: 30px; }
.nav-toggle { display: none; }

.page { max-width: 1280px; margin: 0 auto; padding: 28px 24px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 28px; font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 4px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 30px 0 14px; }
.section-head h2 { font-size: 18px; font-weight: 750; }

/* Hero del panel: saludo + próxima reunión */
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; }
.hero-next { position: relative; overflow: hidden; padding: 24px; border-radius: var(--radius-xl); color: #fff; background: radial-gradient(120% 140% at 100% 0%, #1fc6b3 0%, transparent 45%), linear-gradient(135deg, #2346d8 0%, #3461f5 55%, #4c7bff 100%); box-shadow: 0 16px 40px rgba(52, 97, 245, .28); }
.hero-next::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero-next .eyebrow { font-size: 13px; font-weight: 700; opacity: .85; text-transform: uppercase; letter-spacing: .08em; }
.hero-next .when { margin-top: 14px; font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.hero-next .title { margin-top: 8px; font-size: 20px; font-weight: 700; }
.hero-next .meta { margin-top: 4px; opacity: .85; font-size: 14px; }
.hero-next .actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-next .btn-white { --b-bg: #fff; --b-fg: var(--primary-600); --b-line: #fff; }
.hero-next .btn-white:hover { background: #eef3ff; }
.hero-next .btn-glass { --b-bg: rgba(255,255,255,.14); --b-fg: #fff; --b-line: rgba(255,255,255,.28); }
.hero-next .btn-glass:hover { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.4); }
.hero-empty { display: grid; align-content: center; gap: 8px; }
.greeting { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; padding: 24px; }
.greeting h1 { font-size: 30px; font-weight: 800; }
.greeting p { color: var(--muted); margin-top: 6px; }
.create-cta { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px dashed var(--primary-100); border-radius: 18px; background: linear-gradient(180deg, #f7f9ff, #fff); cursor: pointer; text-align: left; transition: all .2s var(--ease); width: 100%; }
.create-cta:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow); }
.create-cta .plus { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--primary); color: #fff; box-shadow: 0 8px 18px rgba(52,97,245,.35); }
.create-cta strong { display: block; font-size: 16px; }
.create-cta span { color: var(--muted); font-size: 13.5px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.stat { padding: 18px; display: flex; align-items: center; gap: 14px; }
.stat-ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); flex: 0 0 auto; }
.stat small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.stat strong { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* Agenda de hoy */
.today { display: grid; gap: 10px; }
.slot { display: grid; grid-template-columns: 74px 4px 1fr auto; align-items: center; gap: 16px; padding: 14px 16px; transition: box-shadow .15s, transform .15s; }
.slot:hover { box-shadow: var(--shadow); }
.slot-time { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.slot-time small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.slot-bar { align-self: stretch; border-radius: 4px; background: var(--c); }
.slot-title { font-weight: 700; font-size: 15.5px; }
.slot-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 3px; color: var(--muted); font-size: 13px; }
.slot-actions { display: flex; gap: 6px; }
.slot.is-past { opacity: .65; }

/* Tabla de reuniones (se convierte en tarjetas en móvil) */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar .input-icon { flex: 1 1 220px; max-width: 340px; }
.toolbar .select { width: auto; min-width: 150px; min-height: 40px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 11px 16px; text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #fafbff; }
.table .t-when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .t-when strong { display: block; font-size: 15px; }
.table .t-when span { color: var(--muted); font-size: 12.5px; }
.table .t-title { font-weight: 700; }
.table .t-title small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; margin-top: 2px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .t-num { text-align: center; font-variant-numeric: tabular-nums; }
.table .t-actions { text-align: right; white-space: nowrap; }
.row-actions { display: inline-flex; gap: 6px; align-items: center; }
.day-sep td { background: var(--surface-2); padding: 8px 16px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }

@media (max-width: 860px) {
  .table thead { display: none; }
  .table, .table tbody { display: block; }
  .table tr { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table td { padding: 0; border: 0; }
  .table .t-when { grid-column: 1; }
  .table .t-status { grid-column: 2; grid-row: 1; justify-self: end; }
  .table .t-title, .table .t-type { grid-column: 1 / -1; }
  .table .t-num { display: none; }
  .table .t-actions { grid-column: 1 / -1; text-align: left; }
  .row-actions { flex-wrap: wrap; }
  .day-sep { display: block !important; padding: 0 !important; }
  .day-sep td { display: block; }
}

/* Calendario mensual */
.cal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cal-head h2 { font-size: 20px; font-weight: 800; min-width: 190px; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-left: auto; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 10px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); }
.cal-day { min-height: 118px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.is-other { background: var(--surface-2); }
.cal-day.is-other .cal-num { color: var(--line-strong); }
.cal-num { font-size: 13px; font-weight: 700; color: var(--text-2); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.is-today .cal-num { background: var(--primary); color: #fff; }
.cal-ev { display: flex; align-items: center; gap: 6px; width: 100%; padding: 4px 7px; border: 0; border-radius: 7px; background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 80%, #000); font-size: 12px; font-weight: 600; text-align: left; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: background .12s; }
.cal-ev:hover { background: color-mix(in srgb, var(--c) 22%, #fff); }
.cal-ev b { font-variant-numeric: tabular-nums; }
.cal-ev.is-cancelled { text-decoration: line-through; opacity: .6; }
.cal-ev.is-ended { opacity: .7; }
.cal-more { font-size: 12px; color: var(--muted); font-weight: 600; background: none; border: 0; text-align: left; padding: 2px 6px; cursor: pointer; }
@media (max-width: 760px) {
  .cal-day { min-height: 62px; padding: 4px; }
  .cal-ev { font-size: 0; padding: 0; height: 6px; border-radius: 3px; background: var(--c); }
  .cal-ev b { display: none; }
  .cal-dow { padding: 8px 2px; text-align: center; font-size: 11px; }
  .cal-num { margin: 0 auto; }
  .cal-day { cursor: pointer; }
}
.cal-daylist { padding: 14px 16px; border-top: 1px solid var(--line); display: none; }
@media (max-width: 760px) { .cal-daylist { display: block; } }

/* Historial */
.history-list { display: grid; gap: 10px; }
.hist-item { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; color: inherit; text-decoration: none !important; transition: box-shadow .15s, transform .15s; }
.hist-item:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.hist-date { width: 58px; text-align: center; border-radius: 14px; padding: 8px 0; background: var(--surface-3); }
.hist-date strong { display: block; font-size: 22px; font-weight: 800; line-height: 1; }
.hist-date span { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.hist-figs { display: flex; gap: 22px; color: var(--text-2); font-size: 13.5px; }
.hist-figs b { display: block; font-size: 17px; color: var(--text); }
.hist-figs { align-items: center; }
.hist-del { color: var(--muted); }
.hist-del:hover { color: var(--danger-600); background: var(--danger-50); }
@media (max-width: 700px) { .hist-item { grid-template-columns: auto 1fr; } .hist-figs { grid-column: 1 / -1; } }
.att { display: grid; gap: 10px; }
.att-row { display: grid; grid-template-columns: auto 1fr repeat(3, minmax(90px, auto)); gap: 16px; align-items: center; padding: 14px 18px; }
.att-row .fig small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.att-row .fig b { font-variant-numeric: tabular-nums; }
.att-bar { height: 6px; border-radius: 3px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.att-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
@media (max-width: 700px) { .att-row { grid-template-columns: auto 1fr; } .att-row .fig { grid-column: span 1; } }

/* Configuración */
.settings-grid { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.settings-nav { position: sticky; top: 88px; display: grid; gap: 4px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; text-decoration: none; }
.settings-nav a:hover { background: var(--surface-3); color: var(--text); }
.settings-sec { padding: 24px; display: grid; gap: 18px; scroll-margin-top: 88px; }
.settings-sec h2 { font-size: 17px; font-weight: 750; }
.settings-sec > p { color: var(--muted); margin-top: -12px; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.logo-preview { width: 64px; height: 64px; border-radius: 16px; border: 1px solid var(--line); display: grid; place-items: center; background: var(--surface-2); overflow: hidden; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.soon { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.soon > div { padding: 16px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted); font-size: 13.5px; }
.soon strong { display: flex; align-items: center; gap: 8px; color: var(--text); margin-bottom: 4px; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; } .settings-nav { display: none; } .soon { grid-template-columns: 1fr; } }

/* Formulario de reunión */
.mform { display: grid; gap: 16px; }
.mform .row-3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.mform .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mform details summary { cursor: pointer; font-weight: 650; color: var(--primary-600); font-size: 14px; list-style: none; display: flex; align-items: center; gap: 6px; }
.mform details summary::-webkit-details-marker { display: none; }
.mform details[open] summary .i { transform: rotate(180deg); }
.mform details > div { display: grid; gap: 12px; margin-top: 12px; }
@media (max-width: 600px) { .mform .row-3, .mform .row-2, .form-grid { grid-template-columns: 1fr; } }
.created { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; text-align: center; justify-items: center; }
.created > * { max-width: 100%; min-width: 0; }
.created h3 { overflow-wrap: anywhere; }
.created .big-check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--success-50); color: var(--success); animation: pop .3s var(--ease); }
.created .big-check .i { width: 32px; height: 32px; stroke-width: 2.5; }
.created .link-box { width: 100%; text-align: left; }
.created-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }

/* Login */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: radial-gradient(90% 80% at 90% 10%, rgba(31, 198, 179, .55) 0%, transparent 55%), linear-gradient(150deg, #10224f 0%, #1d3fb8 60%, #3461f5 100%); }
.auth-side h2 { font-size: 34px; font-weight: 800; letter-spacing: -.03em; max-width: 420px; }
.auth-side p { margin-top: 12px; opacity: .8; max-width: 400px; font-size: 16px; }
.auth-side ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-side li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.auth-side li .i { color: #5eead4; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; background: var(--surface); }
.auth-card { width: min(380px, 100%); display: grid; gap: 18px; }
.auth-card h1 { font-size: 26px; font-weight: 800; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

@media (max-width: 1080px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .nav { position: fixed; inset: 64px 0 auto 0; flex-direction: column; padding: 10px 16px 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; font-size: 15px; }
  .nav-toggle { display: inline-flex; }
  .user-btn .name { display: none; }
}
@media (max-width: 600px) {
  .topbar-inner { padding: 0 14px; gap: 10px; }
  .page { padding: 20px 14px 48px; }
  .page-head h1, .greeting h1 { font-size: 24px; }
  .hero-next .when { font-size: 36px; }
  .stats { gap: 10px; }
  .stat { padding: 14px; gap: 10px; }
  .stat-ico { width: 38px; height: 38px; }
  .stat strong { font-size: 22px; }
  .slot { grid-template-columns: 58px 4px 1fr; gap: 12px; }
  .slot-actions { grid-column: 1 / -1; }
  .slot-time { font-size: 17px; }
}
