:root {
  --orange-primary: #f97316;
  --orange-dark: #c2410c;
  --orange-light: #fed7aa;
  --blue-primary: #2563eb;
  --blue-dark: #1e40af;
  --bg-light: #f8fafc;
  --text-dark: #0f172a;
  --sidebar-width: 250px;
}

body.app-body {
  background: var(--bg-light);
  color: var(--text-dark);
}

.app-header {
  background: linear-gradient(135deg, var(--orange-primary), var(--blue-primary));
}

.app-main {
  min-height: calc(100vh - 120px);
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.18);
  padding: 2px;
}

.app-layout {
  display: flex;
  min-height: calc(100vh - 62px);
  position: relative;
}

.sidebar-toggle-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.sidebar-floating-toggle {
  position: fixed;
  top: 76px;
  left: calc(var(--sidebar-width) - 17px);
  z-index: 1040;
  width: 34px;
  height: 34px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  box-shadow: 0 0.3rem 0.9rem rgba(15, 23, 42, 0.2);
  transition: left 0.2s ease, transform 0.2s ease;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  padding: 1rem;
  position: sticky;
  top: 0;
  height: calc(100vh - 62px);
}

.app-content {
  flex: 1;
}

.app-layout.sidebar-hidden .app-sidebar {
  display: none !important;
}

.app-layout.sidebar-hidden .sidebar-floating-toggle {
  left: 12px;
  transform: rotate(180deg);
}

@media (min-width: 992px) {
  .app-layout.sidebar-hidden .app-content {
    padding-left: 4.25rem !important;
  }
}

.sidebar-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.sidebar-link {
  display: block;
  text-decoration: none;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.58rem 0.72rem;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #0f172a;
}

.sidebar-link.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--orange-primary), var(--blue-primary));
}

.sidebar-link-danger {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.sidebar-link-danger:hover {
  color: #991b1b;
  background: #fee2e2;
}

.photo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
}

.photo-link svg {
  width: 16px;
  height: 16px;
}

.dashboard-card {
  border: 0;
  box-shadow: 0 0.2rem 0.8rem rgba(15, 23, 42, 0.08);
}

.btn-primary {
  background-color: var(--blue-primary);
  border-color: var(--blue-primary);
}

.btn-warning {
  background-color: var(--orange-primary);
  border-color: var(--orange-primary);
  color: #fff;
}

.card {
  border-radius: 0.85rem;
}

.form-control,
.form-select {
  border-radius: 0.7rem;
}

@media (max-width: 768px) {
  .app-header .btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
  }
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background:
    radial-gradient(900px 420px at 15% 10%, rgba(249, 115, 22, 0.16), transparent 70%),
    radial-gradient(860px 400px at 88% 92%, rgba(37, 99, 235, 0.14), transparent 70%),
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.auth-panel {
  width: 100%;
  max-width: 500px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.08);
}

.auth-logo-wrap {
  width: 82px;
  height: 82px;
  margin: 0 auto 1.1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.24), rgba(37, 99, 235, 0.24));
  display: grid;
  place-items: center;
}

.auth-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.auth-title {
  text-align: center;
  background: linear-gradient(135deg, var(--orange-primary), var(--blue-primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.auth-subtitle {
  text-align: center;
  color: #475569;
  margin-bottom: 1.2rem;
}

.auth-label {
  color: #1e293b;
  font-size: 1.05rem;
}

.auth-form .form-control {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

.auth-form .form-control::placeholder {
  color: #94a3b8;
}

.auth-form .form-control:focus {
  background: #ffffff;
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 0.18rem rgba(37, 99, 235, 0.2);
  color: #0f172a;
}

.auth-check .form-check-input {
  border-color: var(--orange-primary);
  background-color: transparent;
}

.auth-check .form-check-input:checked {
  background-color: var(--orange-primary);
  border-color: var(--orange-primary);
}

.auth-check .form-check-label {
  color: #475569;
}

.auth-inline-error {
  margin: 0 0 0.85rem;
  color: #f87171;
  font-size: 0.92rem;
}

.auth-btn-primary {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, var(--orange-primary), var(--blue-primary));
}

.auth-btn-primary:hover {
  color: #fff;
  opacity: 0.95;
}

.auth-btn-secondary {
  color: #1e293b;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.auth-btn-secondary:hover {
  color: #0f172a;
  border-color: #94a3b8;
  background: #f8fafc;
}

@media (max-width: 576px) {
  .auth-panel {
    padding: 1.25rem;
    border-radius: 1rem;
  }
}
