/* ===== Estilo del NICHO (StorageShare) =====
   Limpio y luminoso: fondo gris azulado, tarjetas blancas redondeadas, azul de marca (cambiable en Ajustes) y
   barra inferior flotante. En oscuro, superficies azul noche. Todo con variables del núcleo (--brand, --surface…). */
:root { --bg: #f4f6fb; --line: #e3e8f2; --radius: 20px;
  --shadow: 0 1px 2px rgba(15,30,80,.04), 0 8px 24px rgba(15,30,80,.07); --deep: var(--brand); }
:root[data-theme="dark"] { --bg: #0c111d; --surface: #151c2c; --line: #263048; --deep: color-mix(in srgb, var(--brand-2) 82%, #000); }

.card { border: 0; }
.row-item { border: 0; box-shadow: var(--shadow); border-radius: 16px; }
.list { display: grid; gap: 8px; }
.topbar { border-bottom: 0; }
.btn { border-radius: 14px; }
.h2 { font-size: 1.05rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; overflow-wrap: anywhere; }
.pre { white-space: pre-line; }
.dlgerr { color: var(--danger); font-weight: 600; font-size: .9rem; margin: 8px 0 0; min-height: 1.2em; }
.dlgerr:empty { display: none; }
select.langsel { width: auto; min-width: 9.5rem; }

/* Cabecera grande de las pestañas */
.apphead { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 720px; margin: 0 auto;
  padding: calc(18px + var(--safe-t)) 16px 6px; }
.apphead > div { min-width: 0; }
.apphead h1 { margin: 0; font-size: 1.65rem; line-height: 1.15; overflow-wrap: anywhere; }
.apphead small { display: block; font-size: .9rem; margin-top: 2px; }
.apphead .iconbtn { background: var(--surface); box-shadow: var(--shadow); border-radius: 50%; width: 44px; height: 44px; flex: none; }

/* Tarjeta destacada */
.hcard { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 24px; margin-bottom: 14px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.hcard > div { flex: 1; min-width: 0; display: grid; gap: 6px; justify-items: start; }
.hcard b { font-size: 1.2rem; line-height: 1.2; overflow-wrap: anywhere; }
.hcard.hero { background: linear-gradient(135deg, var(--deep), color-mix(in srgb, var(--deep) 60%, #0ea5e9)); color: #fff; }
.hcard.hero span { color: rgba(255,255,255,.9); }
.hcard.hero .pill { background: rgba(255,255,255,.2); color: #fff; }
.hcard .bigic { width: 52px; height: 52px; opacity: .92; flex: none; }
.btn.onhero { background: #fff; color: #0f1f4d; border-color: #fff; margin-top: 4px; }
.btn.onhero .ic { color: inherit; }
.pill { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 11px; border-radius: 99px; font-size: .8rem; font-weight: 700; background: var(--brand-soft); color: var(--brand); }

.secthead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 0 10px; }
.secthead .h2 { margin: 0; }
.banner.notice { font-weight: 600; }
.banner.install { width: 100%; border: 0; text-align: left; cursor: pointer; font: inherit; margin-top: 16px; }

/* Rejilla de accesos */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: grid; gap: 2px; align-content: start; padding: 14px; min-height: 104px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); }
.tile .ic { width: 34px; height: 34px; padding: 7px; margin-bottom: 6px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); }
.tile b { font-size: .98rem; line-height: 1.2; }
.tile small { color: var(--mute); font-size: .8rem; overflow-wrap: anywhere; }
.tile:active, .row-item:active, .menuitem:active { transform: scale(.985); }

/* Menú «Más» */
.menu { display: grid; gap: 8px; }
.menuitem { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); border: 0; width: 100%; text-align: left; font: inherit; cursor: pointer; }
.menuitem > .ic:first-child { width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.menuitem > span { flex: 1; min-width: 0; display: grid; }
.menuitem small { color: var(--mute); font-size: .82rem; }
.menuitem .chev { color: var(--mute); }

/* Cuenta */
.profile { display: flex; align-items: center; gap: 14px; }
.profile > div { display: grid; min-width: 0; }
.profile b { overflow-wrap: anywhere; }
.dl dd { overflow-wrap: anywhere; min-width: 0; }
.initials { font-weight: 800; letter-spacing: .02em; color: var(--brand); }
.quicklinks { margin: 10px 0 14px; }
.segtabs { border: 0; box-shadow: var(--shadow); border-radius: 16px; margin: 4px 0 8px; }
.row-item.order { display: flex; align-items: center; gap: 12px; width: 100%; font: inherit; color: var(--ink); text-align: left; }
button.row-item { cursor: pointer; }
.rowmain { flex: 1; min-width: 0; display: grid; background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.rowmain small { color: var(--mute); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rowend { display: grid; justify-items: end; gap: 4px; text-align: right; flex: none; max-width: 45%; }
.rowend b { font-size: .95rem; white-space: nowrap; }
.rowend b small { color: var(--mute); font-weight: 500; }
.stchip { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.stchip.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.stchip.warn { background: var(--warn-soft); color: var(--warn); }
.stchip.bad { background: var(--danger-soft); color: var(--danger); }
.logout { margin-top: 18px; justify-content: center; }
.pwbox { display: flex; align-items: center; gap: 6px; }
.pwbox input { flex: 1; min-width: 0; }

/* Datos con botón de copiar */
.cred { display: grid; grid-template-columns: minmax(70px, 26%) 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cred:last-child { border-bottom: 0; }
.cred > b { overflow-wrap: break-word; word-break: normal; min-width: 0; }
.cred > b.mono { overflow-wrap: anywhere; }
.cred .cp { width: 38px; height: 38px; }
@media (max-width: 360px) { .cred { grid-template-columns: 1fr auto; } .cred > span:first-child { grid-column: 1 / -1; } }

.lockcard { display: flex; align-items: center; gap: 12px; }
.lockcard > .ic { width: 34px; height: 34px; padding: 7px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.lockcard > div { flex: 1; min-width: 0; }

/* Barra inferior flotante (5 pestañas) */
.tabbar { left: 10px; right: 10px; bottom: calc(8px + var(--safe-b)); border-radius: 22px; border: 0; box-shadow: 0 6px 24px rgba(15,30,80,.14); background: var(--surface); }
:root[data-theme="dark"] .tabbar { box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.tabbar a span { font-size: .7rem; }
body { padding-bottom: calc(var(--tabbar) + 22px + var(--safe-b)); }
/* Código de verificación por email */
.codein { font: 700 1.6rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .35em; text-align: center; }
/* Punto rojo de «soporte ha respondido» en los botones de soporte */
.tile.dot, .menuitem.dot { position: relative; }
.tile.dot::after, .menuitem.dot::after { content: ""; position: absolute; top: 12px; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: #d93025; box-shadow: 0 0 0 2px var(--surface); }
.newbadge { justify-self: start; margin-top: 4px; padding: 1px 8px; border-radius: 99px; background: #d93025; color: #fff; font-size: .72rem; font-weight: 700; }
