:root {
  --bs-primary: #ea401b;
  --bs-secondary: #302d2a;
  --bs-success: #2f7d32;
  --bs-info: #0074b1;
  --bs-warning: #d6a100;
  --bs-danger: #c0392b;
  --bs-light: #f5f7f9;
  --bs-dark: #302d2a;

  --bs-body-bg: #f5f7f9;
  --bs-body-color: #41362f;
  --bs-link-color: #0074b1;
  --bs-link-hover-color: #005f91;
  --bs-border-color: #d8d7d7;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #41362f;
  background: #ffffff;
}

/* ── Buttons ────────────────────────────────────────────────── */

.btn-primary {
  background-color: #ea401b;
  border-color: #ea401b;
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #d63716;
  border-color: #d63716;
  color: #ffffff;
}

.btn-info {
  background-color: #0074b1;
  border-color: #0074b1;
  color: #ffffff;
}

.btn-info:hover,
.btn-info:focus {
  background-color: #005f91;
  border-color: #005f91;
  color: #ffffff;
}

/* ── Navbar ─────────────────────────────────────────────────── */

.jrec-navbar {
  background: #ffffff;
  border-bottom: 1px solid #e8e8e8;
  padding: 12px 0;
}

.jrec-logo-icon {
  display: flex;
  align-items: center;
}

.jrec-brand-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: #302d2a;
  letter-spacing: -0.5px;
}

.btn-login {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 8px 24px;
  border-radius: 4px;
}

/* ── Hero Section ───────────────────────────────────────────── */

.jrec-hero {
  background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
  padding: 80px 0 100px;
  overflow: hidden;
}

.jrec-hero-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: #ea401b;
  margin-bottom: 20px;
}

.jrec-hero-dash {
  display: inline-block;
  width: 40px;
  height: 2px;
  background: #ea401b;
}

.jrec-hero-title {
  font-size: 4rem;
  font-weight: 800;
  color: #302d2a;
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -1.5px;
}

.jrec-hero-subtitle {
  font-size: 1.2rem;
  font-weight: 500;
  color: #41362f;
  margin-bottom: 12px;
}

.jrec-hero-desc {
  font-size: 1rem;
  color: #6b6b6b;
  line-height: 1.7;
  max-width: 480px;
}

.jrec-hero-btn {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 14px 32px;
  border-radius: 4px;
}

.jrec-hero-btn-outline {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 14px 32px;
  border-radius: 4px;
  border: 2px solid #302d2a;
  color: #302d2a;
  background: transparent;
}

.jrec-hero-btn-outline:hover {
  background: #302d2a;
  color: #ffffff;
}

/* ── Dashboard Preview ──────────────────────────────────────── */

.jrec-dashboard-preview {
  position: relative;
  perspective: 1000px;
}

.jrec-dashboard-frame {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.15), 0 8px 24px rgba(0,0,0,0.08);
  overflow: hidden;
  font-size: 0.6rem;
  transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
  transition: transform 0.3s ease;
}

.jrec-dashboard-frame:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.jrec-dash-header {
  background: #ffffff;
  border-bottom: 1px solid #e8e8e8;
  padding: 8px 16px;
}

.jrec-dash-title-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #302d2a;
}

.jrec-dash-icon {
  color: #999;
  font-size: 0.7rem;
}

.jrec-dash-admin {
  font-size: 0.6rem;
  color: #666;
}

/* Dashboard Sidebar */
.jrec-dash-sidebar {
  background: #302d2a;
  width: 120px;
  min-height: 320px;
  padding-top: 8px;
  flex-shrink: 0;
}

.jrec-dash-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 16px;
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 700;
}

.jrec-dash-nav-item {
  padding: 6px 12px;
  color: #aaa;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 6px;
}

.jrec-dash-nav-item i {
  width: 14px;
  text-align: center;
  font-size: 0.55rem;
}

.jrec-dash-nav-item.active {
  background: #ea401b;
  color: #ffffff;
  border-radius: 4px;
  margin: 0 6px;
  padding: 6px 8px;
}

/* Dashboard Content */
.jrec-dash-content {
  flex: 1;
  background: #f5f7f9;
  min-height: 320px;
  padding: 0;
}

.jrec-dash-scope-bar {
  background: #ffffff;
  border-bottom: 1px solid #e8e8e8;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.52rem;
  color: #666;
}

.jrec-dash-help {
  color: #0074b1;
}

.jrec-dash-reload {
  margin-left: auto;
  background: #ea401b;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.48rem;
  font-weight: 600;
}

/* Stats */
.jrec-dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 12px;
}

.jrec-dash-stat {
  background: #ffffff;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.jrec-dash-stat-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.5rem;
  flex-shrink: 0;
}

.jrec-dash-stat-label {
  font-size: 0.42rem;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.jrec-dash-stat-value {
  font-size: 0.75rem;
  font-weight: 700;
  color: #302d2a;
}

.jrec-dash-stat-change {
  font-size: 0.4rem;
  color: #999;
}

/* Chart */
.jrec-dash-chart-area {
  margin: 0 12px 12px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
}

.jrec-dash-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.55rem;
}

.jrec-dash-chart-period {
  font-size: 0.48rem;
  color: #999;
}

.jrec-dash-chart-placeholder {
  padding: 10px;
  height: 90px;
}

.jrec-dash-chart-svg {
  width: 100%;
  height: 100%;
}

/* ── Features Section ───────────────────────────────────────── */

.jrec-features {
  background: #ffffff;
  padding: 80px 0 60px;
}

.jrec-features-heading {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #302d2a;
  margin-bottom: 12px;
}

.jrec-features-divider {
  width: 50px;
  height: 3px;
  background: #ea401b;
  margin: 0 auto;
}

.jrec-feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #302d2a;
}

.jrec-feature-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #302d2a;
  margin-bottom: 8px;
}

.jrec-feature-desc {
  font-size: 0.82rem;
  color: #6b6b6b;
  line-height: 1.6;
}

/* ── Footer ─────────────────────────────────────────────────── */

.jrec-footer {
  background: #f5f7f9;
  border-top: 1px solid #e8e8e8;
  padding: 24px 0;
  font-size: 0.85rem;
  color: #999;
}

/* ── Auth / Login Page ───────────────────────────────────────── */

.auth-body {
  background: linear-gradient(135deg, #302d2a 0%, #1a1816 100%);
  min-height: 100vh;
}

.auth-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-brand {
  font-size: 1.6rem;
  font-weight: 800;
  color: #302d2a;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.auth-form .form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #41362f;
}

.auth-form .input-group-text {
  background: #f5f7f9;
  border-color: #d8d7d7;
  color: #888;
}

.auth-form .form-control {
  border-color: #d8d7d7;
  padding: 10px 14px;
}

.auth-form .form-control:focus {
  border-color: #ea401b;
  box-shadow: 0 0 0 3px rgba(234,64,27,0.1);
}

.auth-submit {
  padding: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
}

.auth-footer a {
  color: #888;
  text-decoration: none;
  font-size: 0.85rem;
}

.auth-footer a:hover {
  color: #ea401b;
}

.auth-forgot-link {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
  color: #ea401b !important;
}

.auth-forgot-link:hover {
  text-decoration: underline !important;
}

.auth-copyright {
  color: #666;
  font-size: 0.8rem;
  margin-top: 32px;
}

/* ── Admin App Layout ───────────────────────────────────────── */

.app-body {
  background: #f5f7f9;
  overflow: hidden;
}

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

/* Sidebar */
.app-sidebar {
  width: 220px;
  background: #302d2a;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.25s ease;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
}

.app-sidebar.collapsed {
  width: 60px;
}

.app-sidebar.collapsed .sidebar-link span,
.app-sidebar.collapsed .sidebar-brand span,
.app-sidebar.collapsed .sidebar-collapse span {
  display: none;
}

.app-sidebar.collapsed .sidebar-brand a {
  justify-content: center;
}

.app-sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 12px 0;
}

.app-sidebar.collapsed .sidebar-link i {
  margin: 0;
  font-size: 1.1rem;
}

.app-sidebar.collapsed .sidebar-collapse {
  justify-content: center;
}

.app-sidebar.collapsed .sidebar-collapse i {
  transform: rotate(180deg);
}

.sidebar-brand {
  padding: 20px 18px;
  border-bottom: 1px solid #3d3935;
}

.sidebar-brand a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  color: #b0aba6;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  color: #ffffff;
  background: #3d3935;
}

.sidebar-link.active {
  color: #ffffff;
  background: #ea401b;
  border-left-color: #ffffff;
}

.sidebar-link i {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
}

.sidebar-collapse {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  color: #b0aba6;
  border-top: 1px solid #3d3935;
  cursor: pointer;
  font-size: 0.82rem;
  transition: color 0.15s;
}

.sidebar-collapse:hover {
  color: #ffffff;
}

.sidebar-collapse i {
  transition: transform 0.25s;
}

/* Main content area */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  margin-left: 220px;
  transition: margin-left 0.25s ease;
}

.app-main.sidebar-collapsed {
  margin-left: 60px;
}

/* Top bar */
.app-topbar {
  background: #ffffff;
  border-bottom: 1px solid #e8e8e8;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #41362f;
  cursor: pointer;
  padding: 4px 8px;
}

.topbar-search {
  position: relative;
  display: flex;
  align-items: center;
}

.topbar-search i {
  position: absolute;
  left: 12px;
  color: #999;
  font-size: 0.85rem;
}

.topbar-search input {
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 8px 14px 8px 36px;
  font-size: 0.85rem;
  width: 280px;
  background: #f5f7f9;
  outline: none;
  transition: border-color 0.15s;
}

.topbar-search input:focus {
  border-color: #ea401b;
  background: #ffffff;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-notifications {
  cursor: pointer;
  font-size: 1.15rem;
  color: #666;
}

.topbar-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #ea401b;
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: -80px;
  width: 380px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.08);
  z-index: 1050;
  overflow: hidden;
}

.notif-dropdown.open {
  display: block;
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
}

.notif-dropdown-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a1a;
}

.notif-mark-all {
  font-size: 0.8rem;
  color: #ea401b;
  text-decoration: none;
  font-weight: 500;
}

.notif-mark-all:hover {
  text-decoration: underline;
}

.notif-dropdown-body {
  max-height: 400px;
  overflow-y: auto;
}

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: #999;
  font-size: 0.875rem;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
  border-bottom: 1px solid #f5f5f5;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: #f8f9fa;
}

.notif-item.notif-read {
  opacity: 0.65;
}

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.notif-message {
  font-size: 0.8rem;
  color: #666;
  margin-top: 2px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-time {
  font-size: 0.72rem;
  color: #999;
  margin-top: 4px;
}

.notif-dot {
  width: 8px;
  height: 8px;
  background: #ea401b;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.topbar-user .dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #41362f;
}

.topbar-user .dropdown-toggle::after {
  display: none;
}

.topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 0.9rem;
}

.topbar-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.topbar-user-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.topbar-user-role {
  font-size: 0.72rem;
  color: #999;
}

/* App content */
.app-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* App footer */
.app-footer {
  background: #ffffff;
  border-top: 1px solid #e8e8e8;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #999;
  flex-shrink: 0;
}

.app-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-footer-version {
  font-weight: 600;
  color: #41362f;
  margin-right: 12px;
}

.app-footer a {
  color: #ea401b;
  text-decoration: none;
  font-size: 0.8rem;
}

.app-footer a:hover {
  text-decoration: underline;
}

/* ── Dashboard Page ─────────────────────────────────────────── */

.dash-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.dash-page-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #302d2a;
  margin: 0;
}

.dash-page-subtitle {
  color: #888;
  font-size: 0.9rem;
  margin: 4px 0 0;
}

.dash-reload-btn {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Scope bar */
.dash-scope-bar {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: #666;
}

.dash-scope-select {
  width: auto;
  font-size: 0.82rem;
  border-color: #d8d7d7;
}

.dash-scope-help {
  color: #302d2a;
  font-size: 1rem;
  cursor: help;
}

/* Stat cards */
.dash-stat-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.dash-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.bg-primary-icon { background: #ea401b; }
.bg-info-icon { background: #0074b1; }
.bg-success-icon { background: #2f7d32; }
.bg-warning-icon { background: #d6a100; }
.bg-danger-icon { background: #c62828; }
.bg-purple-icon { background: #7b1fa2; }

.dash-stat-body {
  min-width: 0;
}

.dash-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.dash-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #302d2a;
  line-height: 1.2;
}

.dash-stat-change {
  font-size: 0.75rem;
  color: #999;
}

/* Cards */
.dash-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
}

.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.dash-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #302d2a;
  margin: 0;
}

.dash-card-body {
  padding: 20px;
}

.dash-view-all {
  color: #ea401b;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.dash-view-all:hover {
  text-decoration: underline;
}

.dash-period-select {
  width: auto;
  font-size: 0.82rem;
  border-color: #d8d7d7;
}

/* Chart */
.dash-chart {
  width: 100%;
}

.dash-chart-svg {
  width: 100%;
  height: auto;
}

/* Tables */
.dash-table {
  font-size: 0.85rem;
}

.dash-table thead th {
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: #666;
  letter-spacing: 0.3px;
  border-bottom: 2px solid #e8e8e8;
  padding: 12px 20px;
}

.dash-table tbody td {
  padding: 12px 20px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f0;
  color: #41362f;
}

.dash-product-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Notifications */
.dash-notification {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.dash-notification:last-child {
  border-bottom: none;
}

.dash-notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.dash-notif-success { background: #e8f5e9; color: #2f7d32; }
.dash-notif-info { background: #e3f2fd; color: #0074b1; }
.dash-notif-warning { background: #fff8e1; color: #d6a100; }
.dash-notif-primary { background: #fbe9e7; color: #ea401b; }

.dash-notif-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
  color: #41362f;
}

.dash-notif-time {
  font-size: 0.75rem;
  color: #999;
}

/* ── Shared / Admin layout classes ──────────────────────────── */

.card,
.modal-content,
.dropdown-menu {
  background-color: #ffffff;
  border-color: #d8d7d7;
}

/* ── Settings Pages ────────────────────────────────────────── */

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.settings-page-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #302d2a;
  margin: 0;
}

.settings-page-subtitle {
  color: #888;
  font-size: 0.9rem;
  margin: 4px 0 0;
}

.settings-back-btn {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Settings Dashboard Cards */
.settings-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.settings-card-link:hover {
  color: inherit;
}

.settings-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 24px;
  height: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.settings-card:hover {
  border-color: #ea401b;
  box-shadow: 0 4px 12px rgba(234, 64, 27, 0.1);
}

.settings-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.settings-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #302d2a;
  margin: 0 0 8px;
}

.settings-card-desc {
  font-size: 0.82rem;
  color: #888;
  line-height: 1.5;
  margin: 0 0 12px;
}

.settings-card-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ea401b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Settings Form Card */
.settings-form-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 32px;
}

.settings-form-section {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.settings-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #41362f;
}

.settings-form-actions {
  display: flex;
  gap: 12px;
  padding-top: 8px;
}

.settings-meta {
  font-size: 0.8rem;
  color: #999;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

/* Form switch override for consistent sizing */
.settings-form-card .form-check-input {
  width: 3em;
  height: 1.5em;
}

.settings-form-card .form-check-input:checked {
  background-color: #ea401b;
  border-color: #ea401b;
}

.settings-form-card .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(234, 64, 27, 0.15);
  border-color: #ea401b;
}

/* ── Catalog Category Pages ────────────────────────────────── */

.cat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.cat-page-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #302d2a;
  margin: 0;
}

.cat-page-subtitle {
  color: #888;
  font-size: 0.9rem;
  margin: 4px 0 0;
}

.cat-add-btn {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Filter Bar */
.cat-filter-bar {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.cat-filter-form {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cat-filter-search {
  position: relative;
  flex: 1;
  max-width: 340px;
}

.cat-filter-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 0.85rem;
}

.cat-filter-search .form-control {
  padding-left: 36px;
  font-size: 0.85rem;
}

.cat-filter-select {
  width: auto;
  min-width: 140px;
  font-size: 0.85rem;
}

.cat-filter-btn {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 16px;
  white-space: nowrap;
}

/* Category Table */
.cat-table-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
}

.cat-table {
  font-size: 0.85rem;
  margin: 0;
}

.cat-table thead th {
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: #666;
  letter-spacing: 0.3px;
  border-bottom: 2px solid #e8e8e8;
  padding: 14px 20px;
  background: #fafafa;
}

.cat-table tbody td {
  padding: 12px 20px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f0;
  color: #41362f;
}

.cat-table tbody tr:hover {
  background: #fafafa;
}

.cat-table tbody tr:last-child td {
  border-bottom: none;
}

.cat-name-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-child-indicator {
  color: #ccc;
  font-size: 0.75rem;
}

.cat-name {
  font-weight: 600;
  color: #302d2a;
}

.cat-slug {
  font-size: 0.8rem;
  color: #888;
  background: #f5f7f9;
  padding: 2px 8px;
  border-radius: 4px;
}

.cat-badge-active {
  background: #e8f5e9;
  color: #2f7d32;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 4px 10px;
}

.cat-badge-inactive {
  background: #f5f5f5;
  color: #999;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 4px 10px;
}

/* Empty state */
.cat-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.cat-empty i {
  font-size: 3rem;
  margin-bottom: 16px;
  color: #ddd;
}

.cat-empty p {
  font-size: 1rem;
  margin-bottom: 16px;
}

/* ── Sidebar Submenu ──────────────────────────────────────── */

.sidebar-link-parent {
  position: relative;
}

.sidebar-arrow {
  font-size: 0.6rem;
  margin-left: auto;
  transition: transform 0.2s ease;
}

.sidebar-link-parent.open .sidebar-arrow {
  transform: rotate(180deg);
}

.sidebar-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  background: #272421;
}

.sidebar-submenu.open {
  max-height: 500px;
}

.sidebar-sublink {
  display: flex;
  align-items: center;
  padding: 9px 18px 9px 52px;
  color: #b0aba6;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}

.sidebar-sublink:hover {
  color: #ffffff;
  background: #3d3935;
}

.sidebar-sublink.active {
  color: #ffffff;
  background: rgba(234, 64, 27, 0.15);
  border-left-color: #ea401b;
}

.app-sidebar.collapsed .sidebar-submenu {
  display: none;
}

.app-sidebar.collapsed .sidebar-arrow {
  display: none;
}

/* ── Catalog Product Pages ───────────────────────────────────── */

.prod-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 0.9rem;
  overflow: hidden;
  flex-shrink: 0;
}

.prod-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prod-quill-editor {
  background: #fff;
  position: relative;
  z-index: 1;
}

.prod-quill-sm .ql-editor {
  min-height: 80px;
  max-height: 200px;
  overflow-y: auto;
}

.prod-quill-lg .ql-editor {
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
}

.prod-quill-editor .ql-toolbar {
  border-radius: 6px 6px 0 0;
  border-color: #dee2e6;
  position: relative;
  z-index: 2;
}

.prod-quill-editor .ql-container {
  border-radius: 0 0 6px 6px;
  border-color: #dee2e6;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
}

.prod-quill-editor + .form-text {
  margin-top: 0.35rem;
}

.prod-quill-row {
  margin-bottom: 2rem;
}

.prod-form-image-preview {
  max-width: 200px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.prod-form-image-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.prod-slug-line {
  margin-top: 2px;
}

.prod-type-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  background: #f0f0f0;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.prod-original-price {
  text-decoration: line-through;
  color: #999;
  font-size: 0.8rem;
  margin-right: 4px;
}

.prod-sale-price {
  color: #c0392b;
  font-weight: 700;
}

.prod-badge-featured {
  background: #fff8e1;
  color: #d6a100;
  font-size: 0.75rem;
  padding: 4px 6px;
}

.prod-badge-special {
  background: #fbe9e7;
  color: #ea401b;
  font-size: 0.75rem;
  padding: 4px 6px;
}

/* Product Form Sections */
.prod-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

/* Product Image Cards */
.prod-image-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.prod-image-card:hover {
  border-color: #d0d0d0;
}

.prod-image-primary {
  border-color: #d6a100;
}

.prod-image-preview {
  position: relative;
  background: #f5f5f5;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prod-image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.prod-image-primary-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #d6a100;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.prod-image-info {
  padding: 12px;
}

.prod-image-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #302d2a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prod-image-meta {
  font-size: 0.75rem;
  color: #999;
  margin-top: 2px;
}

.prod-image-actions {
  display: flex;
  gap: 6px;
}

/* ── Media Library ──────────────────────────────────────────── */

.media-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.media-card:hover {
  border-color: #d0d0d0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.media-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.media-card-preview {
  position: relative;
  background: #f5f5f5;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.media-card-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.media-card-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #999;
}

.media-card-icon i {
  font-size: 2.5rem;
}

.media-card-icon span {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.media-card-info {
  padding: 12px;
}

.media-card-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #302d2a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-card-meta {
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.media-card-date {
  font-size: 0.72rem;
  color: #aaa;
  margin-top: 2px;
}

.media-type-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: #666;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Media Detail Page */

.media-detail-preview {
  background: #f5f5f5;
  border-radius: 8px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.media-detail-img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
}

.media-detail-file-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #999;
  padding: 60px 20px;
}

.media-detail-file-icon i {
  font-size: 4rem;
}

.media-detail-file-icon span {
  font-size: 0.9rem;
  font-weight: 600;
}

.media-info-table {
  font-size: 0.85rem;
  margin: 0;
}

.media-info-table td {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.media-info-table tr:last-child td {
  border-bottom: none;
}

.media-info-label {
  font-weight: 600;
  color: #666;
  width: 110px;
  white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 991px) {
  .jrec-hero-title {
    font-size: 2.8rem;
  }

  .jrec-dashboard-frame {
    transform: none;
  }

  .jrec-dashboard-frame:hover {
    transform: none;
  }

  .app-sidebar {
    width: 60px;
  }

  .app-sidebar .sidebar-link span,
  .app-sidebar .sidebar-brand span,
  .app-sidebar .sidebar-collapse span,
  .app-sidebar .sidebar-arrow {
    display: none;
  }

  .app-sidebar .sidebar-submenu {
    display: none;
  }

  .app-sidebar .sidebar-brand a {
    justify-content: center;
  }

  .app-sidebar .sidebar-link {
    justify-content: center;
    padding: 12px 0;
  }

  .app-sidebar .sidebar-link i {
    margin: 0;
  }

  .app-main {
    margin-left: 60px;
  }

  .topbar-search input {
    width: 180px;
  }
}

@media (max-width: 575px) {
  .jrec-hero {
    padding: 50px 0 60px;
  }

  .jrec-hero-title {
    font-size: 2.2rem;
  }

  .jrec-dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-sidebar {
    display: none;
  }

  .app-main {
    margin-left: 0;
  }

  .dash-header-row {
    flex-direction: column;
    gap: 12px;
  }

  .app-footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .settings-header {
    flex-direction: column;
    gap: 12px;
  }

  .settings-form-card {
    padding: 20px;
  }

  .settings-form-actions {
    flex-direction: column;
  }

  .cat-header {
    flex-direction: column;
    gap: 12px;
  }

  .cat-filter-form {
    flex-wrap: wrap;
  }

  .cat-filter-search {
    max-width: 100%;
    width: 100%;
  }
}
