/* Risemill — premium admin shell (Bootstrap 5 extension) */
:root {
  --rm-sidebar: #0f172a;
  --rm-sidebar-hover: #1e293b;
  --rm-accent: #3b82f6;
  --rm-accent-soft: rgba(59, 130, 246, 0.12);
  --rm-success: #10b981;
  --rm-warning: #f59e0b;
  --rm-danger: #ef4444;
  --rm-surface: #f8fafc;
  --rm-card: #ffffff;
  --rm-border: #e2e8f0;
  --rm-text-muted: #64748b;
  --rm-sidebar-width: 280px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--rm-surface);
  color: #0f172a;
  min-height: 100vh;
}

/* Sidebar */
.rm-sidebar {
  width: var(--rm-sidebar-width);
  min-height: 100vh;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.08);
}

.rm-brand {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rm-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--rm-accent) 0%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.rm-brand-title {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.rm-brand-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rm-nav {
  padding: 1rem 0.75rem;
  flex: 1;
  overflow-y: auto;
}

.rm-nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 0.5rem 0.75rem 0.35rem;
}

.rm-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  margin-bottom: 2px;
}

.rm-nav-link i {
  font-size: 1.15rem;
  opacity: 0.85;
}

.rm-nav-link:hover {
  background: var(--rm-sidebar-hover);
  color: #fff;
}

.rm-nav-link.active {
  background: var(--rm-accent-soft);
  color: #93c5fd;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.rm-nav-link.active i {
  color: var(--rm-accent);
  opacity: 1;
}

.rm-nav-child {
  font-size: 0.875rem;
  padding-left: 2.35rem;
  margin-bottom: 1px;
}

.rm-nav-child i {
  font-size: 1rem;
  opacity: 0.9;
}

.rm-sidebar-foot {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: #64748b;
}

/* Main */
.rm-main {
  margin-left: var(--rm-sidebar-width);
  min-height: 100vh;
  padding: 1.75rem 2rem 3rem;
}

@media (max-width: 991.98px) {
  .rm-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .rm-sidebar.rm-open {
    transform: translateX(0);
  }
  .rm-main {
    margin-left: 0;
    padding: 1rem 1rem 2rem;
  }
}

.rm-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.rm-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0;
}

.rm-page-desc {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--rm-text-muted);
}

/* Cards */
.rm-card {
  background: var(--rm-card);
  border: 1px solid var(--rm-border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.rm-card-header {
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--rm-border);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.rm-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: #0f172a;
}

.rm-card-body {
  padding: 1.35rem;
}

/* Stat cards */
.rm-stat {
  border: 1px solid var(--rm-border);
  border-radius: 14px;
  background: #fff;
  padding: 1.35rem;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rm-stat:hover {
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.rm-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

.rm-stat.rm-stat-primary::before {
  background: linear-gradient(180deg, #3b82f6, #6366f1);
}
.rm-stat.rm-stat-success::before {
  background: linear-gradient(180deg, #10b981, #14b8a6);
}
.rm-stat.rm-stat-warning::before {
  background: linear-gradient(180deg, #f59e0b, #f97316);
}
.rm-stat.rm-stat-info::before {
  background: linear-gradient(180deg, #0ea5e9, #06b6d4);
}

.rm-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.rm-stat-primary .rm-stat-icon {
  background: var(--rm-accent-soft);
  color: var(--rm-accent);
}
.rm-stat-success .rm-stat-icon {
  background: rgba(16, 185, 129, 0.12);
  color: var(--rm-success);
}
.rm-stat-warning .rm-stat-icon {
  background: rgba(245, 158, 11, 0.14);
  color: var(--rm-warning);
}
.rm-stat-info .rm-stat-icon {
  background: rgba(14, 165, 233, 0.12);
  color: #0ea5e9;
}

.rm-stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--rm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.rm-stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
}

.rm-stat-meta {
  font-size: 0.8125rem;
  color: var(--rm-text-muted);
  margin-top: 0.5rem;
}

/* Forms */
.rm-form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}

.form-control,
.form-select {
  border-radius: 10px;
  border-color: var(--rm-border);
  padding: 0.55rem 0.85rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--rm-accent);
  box-shadow: 0 0 0 3px var(--rm-accent-soft);
}

.rm-btn-primary {
  border-radius: 10px;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
}

/* Sale type pills */
.rm-sale-type .btn-check:checked + .btn {
  background: var(--rm-accent);
  border-color: var(--rm-accent);
  color: #fff;
}

.rm-sale-type .btn {
  border-radius: 10px;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
}

/* Output rows */
.rm-output-row {
  background: #f8fafc;
  border: 1px dashed var(--rm-border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.rm-output-row:last-child {
  margin-bottom: 0;
}

/* Table quick view */
.rm-table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rm-text-muted);
  font-weight: 600;
  border-bottom-width: 1px;
}

/* List / data tables */
.rm-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.rm-list-toolbar .form-control,
.rm-list-toolbar .form-select {
  min-width: 140px;
}

.rm-table-actions .btn {
  border-radius: 8px;
}

.rm-pagination-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--rm-border);
  background: #fafbfc;
}

.rm-pagination-wrap .pagination {
  margin-bottom: 0;
}

.rm-empty-row td {
  padding: 2.5rem 1rem !important;
}

/* Reports */
.rm-chart-card {
  min-height: 280px;
}

.rm-report-filters .form-control,
.rm-report-filters .form-select {
  max-width: 200px;
}
