html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

:root {
  --app-bg: #f4f6fb;
  --sidebar-bg: #0f172a;
  --sidebar-text: #cbd5f5;
  --sidebar-muted: #94a3b8;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --brand-color: #2563eb;
}

body.app-body,
body.auth-body {
  margin: 0;
  background: var(--app-bg);
  min-height: 100vh;
}

.auth-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background: radial-gradient(circle at top, #e2e8f0, #f8fafc 55%, #eef2ff 100%);
}

.auth-page {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.auth-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  color: #64748b;
  margin-bottom: 1.5rem;
}

.auth-footer {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--brand-color);
  text-decoration: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-section {
  margin-top: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
}

.sidebar-link {
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  display: block;
}

.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
}

.sidebar-badge {
  background: rgba(249, 178, 51, 0.2);
  color: #f9b233;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  margin-left: 0.4rem;
}

.sidebar-dropdown-toggle {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  text-align: left;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-dropdown-toggle:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
}

.sidebar-caret {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.sidebar-dropdown-toggle[aria-expanded="false"] .sidebar-caret {
  transform: rotate(-90deg);
}

.sidebar-sublink {
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 0.3rem 0.7rem 0.3rem 1.4rem;
  border-radius: 10px;
  display: block;
  font-size: 0.85rem;
}

.sidebar-sublink:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
}


.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-title {
  font-weight: 600;
  color: #0f172a;
}

.app-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-content {
  padding: 1.5rem;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.dashboard-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.dashboard-widget {
  background: #ffffff;
  border-radius: 14px;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

.widget-title {
  font-weight: 600;
  color: #312e81;
}

.widget-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.widget-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}

.widget-secondary {
  color: #64748b;
  font-size: 0.9rem;
}

.widget-secondary:empty {
  display: none;
}

.sparkline {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 70px;
}

.sparkline span {
  width: 8px;
  background: linear-gradient(180deg, #6366f1, #a855f7);
  border-radius: 4px 4px 0 0;
}

.widget-locked {
  background: linear-gradient(135deg, #2b0a53, #3c0d6f);
  color: #f8fafc;
  border: none;
}

.widget-locked .widget-title {
  color: #f8fafc;
}

.widget-locked-content {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.widget-locked-text {
  max-width: 55%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.widget-locked-title {
  font-size: 0.95rem;
  line-height: 1.4;
}

.widget-locked-link {
  color: #f9b233;
  text-decoration: none;
  font-weight: 600;
}

.widget-locked-illustration svg {
  width: 90px;
  height: 90px;
}

.store-select {
  max-width: 1100px;
  margin: 0 auto;
}

.asset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.asset-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.asset-search {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .asset-search {
    flex-direction: column;
  }
}

.asset-card {
  border-radius: 16px;
  border: 1px solid #e5e7eb;
}

.asset-photo {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.asset-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-photo-placeholder {
  color: #94a3b8;
  font-weight: 600;
}

.asset-code {
  width: 100%;
  max-width: 220px;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
  border: 1px solid #e2e8f0;
}

.asset-section {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 1rem;
}

.asset-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.asset-form summary {
  cursor: pointer;
  font-weight: 600;
  margin-top: 0.75rem;
}

.asset-form summary::marker {
  color: #64748b;
}

.asset-scan-video {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}

.asset-scan-video video {
  width: 100%;
  height: auto;
}

.asset-status {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.asset-status-ativo {
  background: rgba(16, 185, 129, 0.15);
  color: #0f766e;
}

.asset-status-emmanutencao {
  background: rgba(249, 115, 22, 0.2);
  color: #c2410c;
}

.asset-status-baixado {
  background: rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}

.asset-status-extraviado {
  background: rgba(234, 179, 8, 0.2);
  color: #92400e;
}

@media (max-width: 992px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
