:root {
  --app-bg: #f3f6fb;
  --surface: #ffffff;
  --sidebar-bg: #0f172a;
  --sidebar-border: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-title: #f8fafc;
  --accent: #1d4ed8;
  --accent-hover: #2563eb;
  --content-padding: 1.5rem;
  --sidebar-width: 260px;
}

html {
  font-size: 14px;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--app-bg);
  color: #111827;
}

.app-topbar,
.app-footer {
  background: var(--surface);
}

.app-brand {
  align-items: center;
  color: #0f172a;
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.app-brand:hover,
.app-brand:focus {
  color: #0f172a;
  text-decoration: none;
}

.app-brand-shop {
  color: #1d4ed8;
}

.app-brand-manager {
  color: #0f172a;
  margin-left: 0.22rem;
}

.app-shell {
  display: flex;
  min-height: calc(100vh - 97px);
}

.sidebar-nav {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  padding: 1rem;
}

.sidebar-title {
  color: var(--sidebar-title);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.sidebar-section-title {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.sidebar-link {
  border-radius: 0.5rem;
  color: var(--sidebar-text);
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  padding: 0.5rem 0.7rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover {
  background: #1e293b;
  color: var(--sidebar-title);
}

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

.app-content {
  flex: 1;
  padding: var(--content-padding);
}

.page-header h1 {
  margin: 0;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #ffffff, 0 0 0 0.25rem rgba(37, 99, 235, 0.35);
}

@media (max-width: 991.98px) {
  .app-shell {
    flex-direction: column;
    min-height: auto;
  }

  .sidebar-nav {
    width: 100%;
    flex: 0 0 auto;
    border-right: 0;
    border-bottom: 1px solid var(--sidebar-border);
  }

  .app-content {
    padding: 1rem;
  }
}

.dashboard-metric-section {
  margin-bottom: 0.25rem;
}

.dashboard-metric-row-title {
  border-left: 5px solid transparent;
  border-radius: 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.45rem 0.65rem;
}

.dashboard-metric-row-title-order {
  background: #e8f0ff;
  border-left-color: #1d4ed8;
  color: #1e3a8a;
}

.dashboard-metric-row-title-profit {
  background: #e8f8ef;
  border-left-color: #15803d;
  color: #14532d;
}

.dashboard-metric-card {
  border-radius: 0.65rem;
}

.dashboard-metric-card-order {
  background: linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%);
}

.dashboard-metric-card-profit {
  background: linear-gradient(180deg, #f7fdf9 0%, #ebf8f0 100%);
}

.dashboard-metric-label {
  color: #475569;
  font-weight: 600;
}

.dashboard-metric-value {
  font-size: 1.2rem;
}

.dashboard-metric-value-order {
  color: #1d4ed8;
}

.dashboard-metric-value-profit {
  color: #15803d;
}
