:root {
  --dorm-primary: #1d4ed8;
  --dorm-primary-dark: #1e40af;
  --dorm-sidebar-bg: #0f172a;
  --dorm-sidebar-hover: #1e293b;
  --dorm-sidebar-active: #2563eb;
  --dorm-bg: #f1f5f9;
  --dorm-card-border: #e2e8f0;
}

body {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  background-color: var(--dorm-bg);
  color: #0f172a;
  font-size: 0.9375rem;
}

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

.app-sidebar {
  width: 265px;
  min-width: 265px;
  background: var(--dorm-sidebar-bg);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.app-sidebar .brand-box {
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.app-sidebar .nav-link {
  color: #cbd5e1;
  padding: 0.65rem 1.1rem;
  margin: 0.15rem 0.75rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background-color 0.15s, color 0.15s;
}

.app-sidebar .nav-link:hover {
  background-color: var(--dorm-sidebar-hover);
  color: #fff;
}

.app-sidebar .nav-link.active {
  background-color: var(--dorm-sidebar-active);
  color: #fff;
}

.app-sidebar .nav-section-title {
  font-size: 0.72rem;
  color: #64748b;
  padding: 0.9rem 1.25rem 0.3rem;
  font-weight: 600;
}

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

.app-topbar {
  background: #fff;
  border-bottom: 1px solid var(--dorm-card-border);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.card {
  border: 1px solid var(--dorm-card-border);
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.card-header {
  background-color: #fff;
  border-bottom: 1px solid var(--dorm-card-border);
  padding: 0.9rem 1.25rem;
  font-weight: 600;
}

.stat-card {
  border-radius: 0.75rem;
  border: 1px solid var(--dorm-card-border);
  background: #fff;
  padding: 1.15rem 1.25rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.table > :not(caption) > * > * {
  padding: 0.72rem 0.85rem;
  vertical-align: middle;
}

.table thead th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 0.83rem;
  border-bottom-width: 1px;
}

.login-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  max-width: 440px;
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  border: none;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.ltr-num {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -280px;
    z-index: 1050;
  }
  .app-sidebar.show {
    right: 0;
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1040;
  }
  .sidebar-backdrop.show {
    display: block;
  }
}
