/* ============================================
   PANEL — Shell (login + sidebar + layout)
   ============================================ */

/* ============================================
   LOGIN
   ============================================ */

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-5);
  background:
    radial-gradient(ellipse at top left, rgba(0, 203, 204, 0.08), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(23, 22, 105, 0.05), transparent 50%),
    var(--paper);
}

.login__container {
  max-width: 420px;
  width: 100%;
  text-align: center;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  box-shadow: var(--shadow-lg);
}

.login__brand {
  margin-bottom: var(--space-7);
}

.login__logo {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-5);
}

.login__logo img {
  max-height: 64px;
  max-width: 200px;
  object-fit: contain;
}

.login__title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--space-2);
  line-height: 1.1;
}

.login__subtitle {
  font-size: 0.9rem;
  color: var(--muted);
}

.login__action {
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.login__hint {
  font-size: 0.85rem;
  color: var(--error);
  background: var(--error-bg);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--error);
  text-align: left;
}

.login__legal {
  font-size: 0.75rem;
  color: var(--muted-soft);
  font-style: italic;
}

/* ============================================
   SHELL
   ============================================ */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

@media (max-width: 768px) {
  .shell {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
  background: var(--brand-primary);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

@media (max-width: 768px) {
  .sidebar {
    position: relative;
    height: auto;
  }
}

.sidebar__brand {
  padding: var(--space-5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__logo {
  height: 36px;
  display: flex;
  align-items: center;
}

.sidebar__logo img {
  height: 36px;
  max-width: 160px;
  object-fit: contain;
}

.sidebar__nav {
  flex: 1;
  padding: var(--space-4) var(--space-3);
  overflow-y: auto;
}

.sidebar__section {
  margin-bottom: var(--space-5);
}

.sidebar__section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  padding: 0 var(--space-3);
  margin-bottom: var(--space-2);
  display: block;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  color: rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--t-fast);
  position: relative;
  margin-bottom: 2px;
}

.sidebar__link:hover:not(.sidebar__link--disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
}

.sidebar__link.is-active {
  background: rgba(0, 203, 204, 0.18);
  color: var(--paper);
  box-shadow: inset 3px 0 0 var(--brand-accent);
}

.sidebar__link.is-active svg {
  color: var(--brand-accent);
}

.sidebar__link--disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sidebar__link span {
  flex: 1;
}

.sidebar__badge {
  background: var(--brand-accent);
  color: var(--brand-primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}

.sidebar__soon {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.6);
}

.sidebar__footer {
  padding: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.sidebar__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-accent);
  color: var(--brand-primary);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.sidebar__user-info {
  min-width: 0;
  flex: 1;
}

.sidebar__user-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__user-email {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__logout {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: var(--font-body);
}

.sidebar__logout:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--paper);
}

/* ============================================
   CONTENT AREA
   ============================================ */

.content {
  background: var(--paper-soft);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================
   PAGE HEADER (común a las vistas)
   ============================================ */

.page-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: var(--space-5) var(--space-6);
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.page-header__title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.page-header__eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-accent-dark);
  font-weight: 600;
}

.page-header__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}

.page-header__actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

.page-body {
  padding: var(--space-6);
}

@media (max-width: 768px) {
  .page-header { padding: var(--space-4); }
  .page-body { padding: var(--space-4); }
  .page-header__title { font-size: 1.4rem; }
}

/* ============================================
   EMPTY STATE / ERRORS
   ============================================ */

.empty-state {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  color: var(--muted);
}

.empty-state__icon {
  margin: 0 auto var(--space-4);
  color: var(--muted-soft);
}

.empty-state__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-2);
}

.empty-state__text {
  font-size: 0.9rem;
  max-width: 400px;
  margin: 0 auto;
}
