/* =========================================================
   DRIVE ZERNYX · TEMA
   Monocromático, sobrio y profesional.
   Capa final: unifica el aspecto de todas las páginas.
   ========================================================= */

::selection {
  background: #e8e8ec;
  color: #0a0a0c;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
}

:focus-visible {
  outline: 1px solid var(--text-muted);
  outline-offset: 2px;
}

/* Sin resplandores ni sombras de color */
*,
*::before,
*::after {
  text-shadow: none !important;
}

[class] {
  box-shadow: none;
}

/* Iconos finos y discretos */
svg.lucide {
  stroke-width: 1.5;
}

.login-scanline,
.button__scanline {
  display: none !important;
}

/* =========================================================
   VARIABLES LOCALES DE PÁGINAS → tokens globales
   ========================================================= */

.drive-page {
  --drive-bg: transparent;
  --drive-surface: var(--surface);
  --drive-surface-strong: var(--surface-strong);
  --drive-surface-soft: var(--surface-soft);
  --drive-surface-hover: var(--surface-hover);
  --drive-border: var(--line);
  --drive-border-strong: var(--line-strong);
  --drive-border-soft: var(--line-soft);
  --drive-text: var(--text);
  --drive-text-soft: var(--text-muted);
  --drive-text-muted: var(--text-soft);
  --drive-cyan: var(--accent);
  --drive-cyan-soft: var(--accent-soft);
  --drive-cyan-border: var(--accent-border);
  --drive-green: var(--success);
  --drive-green-soft: var(--success-soft);
  --drive-yellow: var(--warning);
  --drive-yellow-soft: var(--warning-soft);
  --drive-red: var(--danger);
  --drive-red-soft: var(--danger-soft);

  background: transparent;
}

/* =========================================================
   BOTONES PRIMARIOS: blanco hueso con texto oscuro
   ========================================================= */

.button--primary,
.tag-btn--primary,
.profile__btn--primary,
.login-submit {
  color: #0a0a0c;
  background: #e8e8ec;
  border: 1px solid #e8e8ec;
}

.button--primary:hover:not(:disabled),
.tag-btn--primary:hover,
.profile__btn--primary:hover,
.login-submit:hover:not(:disabled) {
  background: #ffffff;
}

.button--primary svg,
.button--primary span {
  color: inherit;
}

/* =========================================================
   TIPOGRAFÍA Y ETIQUETAS
   ========================================================= */

h1,
h2,
h3,
h4 {
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* Las "eyebrow" mono pasan a gris discreto */
[class*="eyebrow"],
[class*="__code"],
.drive-modal__eyebrow,
.users-modal__eyebrow {
  color: var(--text-soft) !important;
}

/* =========================================================
   DIÁLOGOS Y MENÚS (opacos)
   ========================================================= */

.drive-modal__dialog,
.users-modal__dialog,
[class*="context-menu"],
.toast,
.calendar,
.gsearch,
.app-topbar__menu,
.tag-modal__dialog {
  background: #101013;
}

.drive-modal__backdrop,
.users-modal__backdrop,
.tag-modal__backdrop {
  background: rgba(4, 4, 6, 0.78);
}

.drive-modal__corner,
.users-modal__corner {
  display: none;
}

/* =========================================================
   SIDEBAR · compacta y elegante
   ========================================================= */

.app-sidebar {
  background-color: var(--sidebar-bg);
  background-image: none;
  border-right: 1px solid var(--line);
}

.app-sidebar__image-overlay,
.app-sidebar__grid,
.app-sidebar__system,
.app-sidebar__version,
.app-sidebar__logo-status,
.app-sidebar__link-index,
.app-sidebar__link-arrow {
  display: none !important;
}

.app-sidebar__brand {
  gap: 10px;

  min-height: 64px;
  padding: 0 14px;

  border-bottom: 1px solid var(--line);
}

.app-sidebar__logo {
  display: grid;
  place-items: center;

  width: 30px;
  height: 30px;

  border: 1px solid var(--line-strong);
  background: transparent;
}

.app-sidebar__monogram {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.app-sidebar__brand-copy strong {
  font-size: 14px;
  font-weight: 600;
}

.app-sidebar__brand-copy span {
  color: var(--text-soft);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: none;
}

.app-sidebar__nav {
  gap: 1px;
  padding: 10px 8px;
}

.app-sidebar__section-label {
  margin: 14px 0 4px;
  padding: 0 10px;

  color: var(--text-soft);
  font-family: var(--font-family);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-sidebar__section-label:first-child {
  margin-top: 4px;
}

.app-sidebar__link {
  gap: 10px;

  min-height: 34px;
  padding: 0 10px;

  color: var(--sidebar-text-muted);
  font-size: 13px;
  font-weight: 500;

  border: 0;
  background: transparent;

  transition: background var(--transition-fast), color var(--transition-fast);
}

.app-sidebar__link svg {
  width: 16px;
  height: 16px;
}

.app-sidebar__link:hover {
  color: var(--text);
  background: var(--sidebar-surface-hover);
}

.app-sidebar__link.is-active {
  color: #ffffff;
  background: var(--sidebar-surface-active);
  box-shadow: inset 2px 0 0 #e8e8ec;
}

.app-sidebar__separator {
  margin: 6px 0;
}

.app-sidebar__footer {
  padding: 8px;

  border-top: 1px solid var(--line);
}

.app-sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 8px;

  color: inherit;
  text-decoration: none;

  border: 0;
  background: transparent;
}

.app-sidebar__user:hover {
  background: var(--sidebar-surface-hover);
}

.app-sidebar__avatar {
  position: relative;

  display: grid;
  place-items: center;
  flex: none;

  width: 30px;
  height: 30px;

  font-size: 11px;
  font-weight: 600;

  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-strong);
  background-position: center;
  background-size: cover;
}

.app-sidebar__avatar > span {
  display: none;
}

.app-sidebar__user-copy strong {
  font-size: 12px;
  font-weight: 600;
}

.app-sidebar__user-copy span {
  color: var(--text-soft);
  font-size: 11px;
}

.app-sidebar__user-status {
  margin-left: auto;

  color: var(--text-soft);
}

.app-sidebar__user-status svg {
  width: 14px;
  height: 14px;
}

/* Avatares con foto */
[data-user-avatar].has-photo {
  color: transparent;
  font-size: 0;
}

/* =========================================================
   TOPBAR
   ========================================================= */

.app-topbar {
  min-height: var(--topbar-height);
  padding: 0 20px;

  background-color: var(--sidebar-bg);
  background-image: none;
  border-bottom: 1px solid var(--line);
}

.app-topbar__background,
.app-topbar__ambient,
.app-topbar__eyebrow {
  display: none !important;
}

.app-topbar__heading h1 {
  font-size: 17px;
  font-weight: 600;
}

.app-topbar__heading p {
  margin: 2px 0 0;

  color: var(--text-soft);
  font-size: 12px;
}

.app-topbar__right {
  gap: 10px;
}

.app-topbar__search {
  min-height: 36px;
  height: 36px;

  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.app-topbar__search:focus-within {
  border-color: var(--text-soft);
}

.app-topbar__search input {
  font-size: 13px;
}

.app-topbar__upload {
  height: 36px;
  padding: 0 14px;

  font-size: 12px;
}

.app-topbar__clock {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  height: 36px;
  padding: 0 12px;

  color: var(--text-muted);
  cursor: pointer;

  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.app-topbar__clock:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.app-topbar__clock svg {
  width: 15px;
  height: 15px;
}

.app-topbar__clock-text {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;

  font-size: 12px;
  white-space: nowrap;
}

.app-topbar__clock-text strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

.app-topbar__account {
  position: relative;
}

.app-topbar__avatar {
  display: grid;
  place-items: center;

  width: 36px;
  height: 36px;

  color: var(--text);
  font-size: 12px;
  font-weight: 600;

  cursor: pointer;

  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-strong);
  background-position: center;
  background-size: cover;
}

.app-topbar__avatar:hover {
  border-color: var(--text-muted);
}

.app-topbar__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;

  display: grid;
  min-width: 230px;

  border: 1px solid var(--line-strong);
}

.app-topbar__menu[hidden] {
  display: none;
}

.app-topbar__menu-user {
  display: grid;
  gap: 2px;

  padding: 12px 14px;

  border-bottom: 1px solid var(--line);
}

.app-topbar__menu-user strong {
  font-size: 13px;
}

.app-topbar__menu-user span {
  color: var(--text-soft);
  font-size: 11px;
}

.app-topbar__menu a,
.app-topbar__menu button {
  display: flex;
  align-items: center;
  gap: 10px;

  width: 100%;
  padding: 10px 14px;

  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;

  cursor: pointer;
}

.app-topbar__menu a:hover,
.app-topbar__menu button:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.app-topbar__menu svg {
  width: 15px;
  height: 15px;
}

/* =========================================================
   CALENDARIO
   ========================================================= */

.calendar {
  position: fixed;
  z-index: 480;

  width: 280px;
  padding: 14px;

  border: 1px solid var(--line-strong);
}

.calendar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 10px;
}

.calendar__head strong {
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
}

.calendar__head button {
  width: 26px;
  height: 26px;

  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;

  cursor: pointer;
}

.calendar__head button:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.calendar__week,
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;

  text-align: center;
}

.calendar__week span {
  padding: 6px 0;

  color: var(--text-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.calendar__day {
  display: grid;
  place-items: center;

  height: 32px;

  color: var(--text);
  font-size: 12px;
}

.calendar__day.is-weekend {
  color: var(--text-muted);
}

.calendar__day.is-today {
  color: #0a0a0c;
  font-weight: 700;

  background: #e8e8ec;
}

.calendar__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: 10px;
  padding-top: 10px;

  color: var(--text-soft);
  font-size: 11px;
  text-transform: capitalize;

  border-top: 1px solid var(--line);
}

.calendar__foot button {
  padding: 4px 10px;

  color: var(--text);
  font-size: 11px;
  text-transform: none;

  cursor: pointer;

  border: 1px solid var(--line-strong);
}

.calendar__foot button:hover {
  background: var(--surface-hover);
}

@media (max-width: 900px) {
  .app-topbar__clock-text span {
    display: none;
  }

  .app-topbar {
    padding: 0 12px;
  }
}

@media (max-width: 560px) {
  .app-topbar__clock {
    display: none;
  }
}

/* =========================================================
   ICONOS Y BADGES NEUTROS (el color solo comunica estado)
   ========================================================= */

.drive-command__icon,
.drive-item__icon,
.drive-summary-card__icon,
.file-type-row__icon,
.file-type-summary-card__icon,
.recent-summary-card__icon,
.trash-row__icon,
.trash-summary-card__icon,
.users-summary__icon,
.tags-file__icon,
.gsearch__icon,
.login-brand__icon {
  color: var(--text-muted);

  border-color: var(--line-strong);
  background: var(--surface-strong);
}

.drive-visibility-badge {
  color: var(--text-muted);

  border-color: var(--line-strong);
  background: transparent;
}

.drive-item__actions .drive-item__delete {
  color: var(--text-muted) !important;

  border-color: var(--line) !important;
}

.drive-item__actions .drive-item__delete:hover:not(:disabled) {
  color: var(--danger) !important;

  border-color: var(--danger-border) !important;
  background: var(--danger-soft) !important;
}

/* =========================================================
   SIDEBAR · marca sin recortes
   ========================================================= */

.app-sidebar__brand-copy {
  flex: 1;
}

.app-sidebar__brand-copy strong {
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar__brand-copy span {
  display: none;
}

.app-sidebar__collapse {
  width: 28px;
  height: 28px;
}

/* Superficies un poco más translúcidas para que se vea el fondo */
:root {
  --surface: rgba(17, 17, 20, 0.78);
  --surface-soft: rgba(22, 22, 26, 0.80);
}

/* =========================================================
   MENOS RUIDO VISUAL: se quita la jerga decorativa
   (códigos, índices numéricos y badges de "sistema")
   ========================================================= */

[class*="__eyebrow"]:not(.tag-modal__eyebrow),
[class*="-card__index"],
[class*="summary__index"],
[class*="-card__line"],
[class*="summary__line"],
.drive-command__status,
.drive-panel__footer-code,
.file-type-page__system-status,
.trash-page__system-status,
.trash-page__panel-status,
.users-panel__connection,
.users-page__status,
[class*="header__code"],
[class*="search-code"] {
  display: none !important;
}

/* Corchetes y marcas decorativas */
[class*="__corner"],
[class*="__scanline"],
[class*="__ambient"] {
  display: none !important;
}

/* =========================================================
   SIDEBAR · cabecera
   ========================================================= */

.app-sidebar__brand {
  display: flex;
  align-items: center;
}

.app-sidebar__collapse {
  margin-left: auto;
}

/* Calendario */
.calendar__foot {
  text-transform: none;
}

.calendar__foot span::first-letter {
  text-transform: uppercase;
}

[class*="eyebrow"]:not([class^="tag-"]),
[class*="empty-code"],
[class*="_empty__code"],
[class*="footer-code"],
[class*="field-code"],
.drive-empty__code,
.users-empty__code,
[class*="summary-card__copy"] small,
[class*="summary__copy"] small {
  display: none !important;
}


/* Botón de animación del fondo */
.app-topbar__bg-toggle {
  position: relative;

  display: grid;
  place-items: center;

  width: 36px;
  height: 36px;

  color: var(--text-muted);
  cursor: pointer;

  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.app-topbar__bg-toggle:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.app-topbar__bg-toggle svg {
  width: 15px;
  height: 15px;
}

.app-topbar__bg-toggle.is-off {
  color: var(--text-soft);
}

.app-topbar__bg-toggle.is-off::after {
  content: "";

  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;

  height: 1px;

  background: currentColor;
  transform: rotate(-45deg);
}

@media (max-width: 560px) {
  .app-topbar__bg-toggle {
    display: none;
  }
}
