.auth-page {
  min-height:100vh;
  display:grid;
  grid-template-rows:1fr auto;
  padding:44px 20px 24px;
}
.auth-center {
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
.auth-panel { width:min(100%,360px); }
.auth-panel-wide { width:min(100%,440px); }
.auth-brand { margin-bottom:24px; text-align:center; }
.auth-logo { display:block; width:146px; max-width:65%; height:auto; margin:0 auto 12px; }
.auth-brand .pt-page-subtitle { margin-top:5px; }
.auth-card { width:100%; }
.auth-stack { display:grid; gap:16px; }
.auth-input-wrap { position:relative; }
.auth-field-icon {
  position:absolute;
  top:50%;
  left:13px;
  width:17px;
  height:17px;
  transform:translateY(-50%);
  color:var(--text-muted);
  pointer-events:none;
}
.auth-input-has-icon { padding-left:40px; }
.auth-input-has-action { padding-right:44px; }
/* Ojito dentro del campo: plano, sin caja (nada de borde-dentro-de-borde). */
.auth-input-action,
.auth-input-action:hover,
.auth-input-action:active { position:absolute; top:50%; right:4px; transform:translateY(-50%); border:none; background:transparent; box-shadow:none; }
.auth-input-action:hover { color:var(--brand-ink); }
.auth-input-action svg { width:17px; height:17px; }
.auth-footer { padding-top:18px; text-align:center; font-size:.68rem; line-height:1.55; }
.auth-footer strong { color:var(--brand-ink); font-weight:600; }

.auth-admin-page { min-height:100vh; padding:28px 32px; }
.auth-admin-shell { width:min(1180px,100%); margin:0 auto; }
.auth-admin-header-main { min-width:0; display:flex; align-items:center; gap:14px; }
.auth-admin-logo { width:108px; height:auto; flex:none; }
.auth-admin-actions { display:flex; align-items:center; gap:8px; }
.auth-admin-actions form { display:flex; }
.auth-admin-shell > .pt-alert { margin-bottom:20px; }
.auth-grid {
  display:grid;
  grid-template-columns:minmax(280px,360px) minmax(0,1fr);
  gap:20px;
  align-items:start;
}
.auth-grid > .pt-form-card { min-width:0; }
.auth-grid > .pt-alert { grid-column:1 / -1; }
.auth-form-grid { display:grid; gap:13px; }
.auth-users-table-wrap { min-width:0; }
.auth-users-table-wrap table { min-width:640px; }
.auth-users-table-wrap td strong { color:var(--brand-ink); }
.auth-row-actions { display:flex; flex-wrap:wrap; gap:6px; }
.auth-row-actions form { display:flex; }
.auth-inline-form { display:flex; align-items:center; gap:6px; margin-top:8px; }
.auth-inline-form .pt-input { min-height:36px; width:180px; padding:7px 9px; }
.auth-details summary { color:var(--brand-ink); cursor:pointer; font-size:.76rem; font-weight:600; }
.auth-details[open] summary { margin-bottom:8px; }

@media (max-width:860px) {
  .auth-page { padding:30px 18px 20px; }
  .auth-brand { margin-bottom:18px; }
  .auth-card .pt-input { min-height:44px; height:44px; }
  .auth-input-has-action { padding-right:48px; }
  .auth-input-action,
  .auth-input-action:hover,
  .auth-input-action:active { right:0; width:44px; height:44px; }
  .auth-admin-page { padding:16px 14px; }
  .auth-admin-page .pt-input { min-height:44px; height:44px; }
  .auth-admin-page .pt-btn-primary,
  .auth-admin-page .pt-btn-secondary,
  .auth-admin-page .pt-btn-sm { height:44px; }
  .auth-admin-header-main { align-items:flex-start; }
  .auth-admin-logo { width:92px; }
  .auth-admin-actions { width:100%; }
  .auth-admin-actions > * { flex:1; }
  .auth-admin-actions .pt-btn-secondary { width:100%; }
  .auth-grid { grid-template-columns:1fr; }
  .auth-inline-form { align-items:stretch; flex-direction:column; }
  .auth-inline-form .pt-input { width:100%; }
  .auth-details summary { display:inline-flex; align-items:center; min-height:44px; }
}

@media (max-width:480px) {
  .auth-page { padding:24px 18px 18px; }
  .auth-brand { margin-bottom:16px; }
  .auth-logo { width:136px; }
  .auth-card .pt-input { font-size:16px; }
  .auth-admin-page .pt-input { font-size:16px; }
  .auth-admin-header-main { width:100%; }
  .auth-admin-logo { display:none; }
  .auth-users-table-wrap { overflow:visible; padding:0; background:transparent; }
  .auth-users-table-wrap table { min-width:0; }
  .auth-users-table-wrap thead { display:none; }
  .auth-users-table-wrap tbody,
  .auth-users-table-wrap tr,
  .auth-users-table-wrap td { display:block; width:100%; }
  .auth-users-table-wrap tr { padding:10px 0; border-bottom:1px solid var(--bg-line); }
  .auth-users-table-wrap tr:last-child { border-bottom:0; }
  .auth-users-table-wrap td {
    display:grid;
    grid-template-columns:92px minmax(0,1fr);
    gap:10px;
    padding:7px 0;
    border:0;
  }
  .auth-users-table-wrap td::before {
    content:attr(data-label);
    color:var(--text-faint);
    font-size:.62rem;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
  }
  .auth-users-table-wrap tbody tr:hover { background:transparent; }
  .auth-users-table-wrap td[data-label="Acciones"] { grid-template-columns:1fr; }
  .auth-users-table-wrap td[data-label="Acciones"] .auth-row-actions {
    align-items:stretch;
    flex-direction:column;
  }
  .auth-users-table-wrap td[data-label="Acciones"] .auth-row-actions > form .pt-btn-sm,
  .auth-users-table-wrap td[data-label="Acciones"] .auth-details,
  .auth-users-table-wrap td[data-label="Acciones"] .auth-details summary { width:100%; }
}
