@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   Gruvstudio — Enterprise Security & Access Design System (ui-ux-pro-max)
   ========================================================================== */

:root {
  /* Surface & Ground Palette */
  --ground: #f8fafc;
  --surface: #ffffff;
  --surface-raised: #f1f5f9;
  --surface-hover: #f8fafc;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-focus: #059669;

  /* Typography Colors */
  --text: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --inverse: #ffffff;

  /* Primary Accent (Sleek Slate/Navy) */
  --primary: #0f172a;
  --primary-hover: #1e293b;
  --primary-active: #334155;
  --primary-ink: #ffffff;

  /* Trust / Security Accent (Vibrant Emerald) */
  --accent: #059669;
  --accent-hover: #047857;
  --accent-active: #065f46;
  --accent-soft: rgba(5, 150, 105, 0.08);
  --accent-soft-border: rgba(5, 150, 105, 0.2);
  --accent-glow: rgba(5, 150, 105, 0.25);

  /* Functional Status Colors */
  --positive: #059669;
  --negative: #dc2626;
  --warning: #d97706;

  --pill-positive-bg: #ecfdf5;
  --pill-positive-border: #a7f3d0;
  --pill-positive-ink: #065f46;

  --pill-negative-bg: #fef2f2;
  --pill-negative-border: #fecaca;
  --pill-negative-ink: #991b1b;

  --pill-warning-bg: #fffbeb;
  --pill-warning-border: #fde68a;
  --pill-warning-ink: #92400e;

  --pill-neutral-bg: #f1f5f9;
  --pill-neutral-border: #e2e8f0;
  --pill-neutral-ink: #475569;

  /* Elevation Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 16px -2px rgba(15, 23, 42, 0.05);
  --shadow-card-hover: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --shadow-vault: 0 20px 30px -10px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.05);

  /* Radii */
  --radius-sheet: 20px;
  --radius-card: 14px;
  --radius-control: 8px;
  --radius-pill: 9999px;

  /* Typography */
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --fs-hero: 28px;
  --fs-title: 22px;
  --fs-section: 16px;
  --fs-body: 14px;
  --fs-small: 12px;
}

/* ==========================================================================
   Base Reset & Global Setup
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--ground);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
}

/* Monospace & Tabular figures */
code, kbd, samp, pre, .mono, .tabular {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Focus Visibility (Accessibility WCAG 2.2 AA) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  background-color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  transition: all 0.2s ease;
}

.header-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  transition: opacity 0.15s ease;
}

.brand-logo:hover {
  opacity: 0.9;
}

.brand-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background-color: var(--surface-raised);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: var(--surface-raised);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.header-nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 7px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-nav-link:hover {
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.6);
}

.header-nav-link.active {
  color: var(--text);
  background-color: var(--surface);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.user-session-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.user-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 10px 4px 6px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.user-email-text {
  color: var(--text);
  font-weight: 500;
  font-size: 12px;
}

/* ==========================================================================
   Main & Sheet Containers
   ========================================================================== */

.app-main {
  flex: 1;
  padding: 32px 24px 48px;
}

.app-main-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 130px);
  padding: 40px 20px;
  background: radial-gradient(circle at 50% 18%, rgba(5, 150, 105, 0.08) 0%, rgba(248, 250, 252, 0) 70%), var(--ground);
}

.app-sheet {
  max-width: 1240px;
  margin: 0 auto;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sheet);
  padding: 36px;
  min-height: calc(100vh - 180px);
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   Dedicated Auth Page Experience (ui-ux-pro-max)
   ========================================================================== */

.auth-container {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.auth-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 40px 36px;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.03);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #059669 0%, #10b981 100%);
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-badge-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px auto;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.auth-badge-icon svg {
  width: 28px;
  height: 28px;
  color: #10b981;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 8px 0;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.auth-input-group {
  margin-bottom: 20px;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
  transition: color 0.15s ease;
}

.auth-input-wrapper:focus-within .auth-input-icon {
  color: var(--accent);
}

.auth-input {
  width: 100%;
  padding: 11px 44px 11px 42px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-toggle-pwd {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.auth-toggle-pwd:hover {
  color: var(--text);
  background-color: var(--surface-raised);
}

.btn-auth-submit {
  width: 100%;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  margin-top: 10px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-auth-submit:hover {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
  transform: translateY(-1px);
}

.btn-auth-submit:active {
  transform: translateY(0);
}

.btn-auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.auth-trust-box {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.auth-trust-box svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

.auth-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.validation-summary-errors {
  background-color: var(--pill-negative-bg);
  border: 1px solid var(--pill-negative-border);
  border-radius: var(--radius-control);
  padding: 12px 16px;
  color: var(--negative);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}

.validation-summary-errors ul {
  margin: 0;
  padding-left: 18px;
}

.validation-summary-errors li {
  margin: 2px 0;
}

.app-sheet-narrow {
  max-width: 440px;
  padding: 36px 32px;
  margin-top: 40px;
  min-height: auto;
}

/* ==========================================================================
   Page Headers & Breadcrumbs
   ========================================================================== */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.page-title {
  font-size: var(--fs-title);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
  color: var(--text);
}

.page-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.page-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumb-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}

.breadcrumb-nav a:hover {
  color: var(--accent);
}

.breadcrumb-nav svg {
  width: 16px;
  height: 16px;
}

/* Sub-navigation Tabs (e.g. Admin) */
.subnav-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  padding-bottom: 2px;
}

.subnav-tab {
  padding: 9px 16px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  border-radius: var(--radius-control) var(--radius-control) 0 0;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.subnav-tab:hover {
  color: var(--text);
  background-color: var(--surface-raised);
}

.subnav-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background-color: var(--accent-soft);
  font-weight: 600;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-ui {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-control);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.4;
  white-space: nowrap;
  user-select: none;
}

.btn-ui svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-ui:active {
  transform: scale(0.98);
}

.btn-ui-primary {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: var(--primary-ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-ui-primary:hover {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  color: var(--primary-ink);
  box-shadow: 0 3px 6px rgba(15, 23, 42, 0.15);
}

.btn-ui-secondary {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.btn-ui-secondary:hover {
  background-color: var(--surface-raised);
  color: var(--text);
  border-color: #cbd5e1;
}

.btn-ui-accent {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(5, 150, 105, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-ui-accent:hover {
  background: linear-gradient(180deg, #059669 0%, #047857 100%);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}

.btn-ui-danger {
  background-color: var(--surface);
  color: var(--negative);
  border-color: #fecaca;
}

.btn-ui-danger:hover {
  background-color: var(--pill-negative-bg);
  border-color: #fca5a5;
}

.btn-ui-sm {
  padding: 5px 11px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-ui-sm svg {
  width: 14px;
  height: 14px;
}

.btn-ui-lg {
  padding: 11px 22px;
  font-size: 14px;
  border-radius: 10px;
}

.btn-ui-lg svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Status Pills & Micro-Indicators
   ========================================================================== */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.status-pill-ativo {
  background-color: var(--pill-positive-bg);
  border-color: var(--pill-positive-border);
  color: var(--pill-positive-ink);
}

.status-pill-ativo .status-dot {
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

.status-pill-bloqueado {
  background-color: var(--pill-negative-bg);
  border-color: var(--pill-negative-border);
  color: var(--pill-negative-ink);
}

.status-pill-bloqueado .status-dot {
  background-color: #ef4444;
}

.status-pill-orfao, .status-pill-ignorado {
  background-color: var(--pill-warning-bg);
  border-color: var(--pill-warning-border);
  color: var(--pill-warning-ink);
}

.status-pill-orfao .status-dot, .status-pill-ignorado .status-dot {
  background-color: #f59e0b;
}

.status-pill-neutral {
  background-color: var(--pill-neutral-bg);
  border-color: var(--pill-neutral-border);
  color: var(--pill-neutral-ink);
}

.status-pill-neutral .status-dot {
  background-color: #94a3b8;
}

/* ==========================================================================
   Tool Cards Grid (Dashboard)
   ========================================================================== */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.tool-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-card-hover);
}

.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #059669 0%, #10b981 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-header {
  margin-bottom: 20px;
}

.tool-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tool-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--surface-raised) 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.tool-icon-wrapper svg {
  width: 22px;
  height: 22px;
}

.tool-card-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--text);
  letter-spacing: -0.01em;
}

.tool-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.tool-card-title a:hover {
  color: var(--accent);
}

.tool-card-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.tool-card-actions .btn-ui {
  flex: 1;
}

/* ==========================================================================
   Vault Password Box (The Core Hero Feature)
   ========================================================================== */

.password-box {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  margin-top: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.password-box::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
}

.password-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.password-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.password-label svg {
  width: 15px;
  height: 15px;
}

.password-display-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.password-token {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--primary);
  user-select: all;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy:hover {
  background-color: var(--surface);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-xs);
}

.btn-copy.copied {
  background-color: var(--pill-positive-bg);
  border-color: var(--pill-positive-border);
  color: var(--pill-positive-ink);
}

.password-expiry-notice {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.password-expiry-notice svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

/* ==========================================================================
   Data Tables (Admin)
   ========================================================================== */

.data-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  background-color: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.data-table th {
  background-color: var(--surface-raised);
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: background-color 0.12s ease;
}

.data-table tbody tr:hover {
  background-color: #f8fafc;
}

/* ==========================================================================
   Forms, Inputs & Validation
   ========================================================================== */

.form-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.input-with-icon .form-input {
  padding-left: 38px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 13px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input-mono {
  font-family: var(--font-mono);
}

.form-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.form-help {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}

.form-error {
  color: var(--negative);
  font-size: 12px;
  margin-top: 5px;
  font-weight: 500;
}

/* ==========================================================================
   Secret Banner & Notices
   ========================================================================== */

.secret-banner {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.secret-banner-title {
  color: #92400e;
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.secret-banner-code {
  display: block;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  background-color: #ffffff;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  border: 1px solid #fcd34d;
  color: #78350f;
  word-break: break-all;
  margin-top: 10px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: 56px 24px;
  background-color: var(--surface-raised);
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px auto;
  color: var(--muted);
}

.empty-state-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state-desc {
  font-size: 13px;
  color: var(--muted);
  max-width: 460px;
  margin: 0 auto 24px auto;
  line-height: 1.6;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.app-footer {
  padding: 20px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background-color: var(--surface);
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
