:root {
  --rm-primary: #1f2d5c;
  --rm-primary-dark: #16224a;
  --rm-accent: #f5a524;
  --rm-body-bg: #f6f8fc;
  --rm-border: #e3e8f0;
  --rm-muted: #6b7794;
  --rm-radius: 14px;
  --rm-shadow: 0 10px 30px rgba(24, 38, 82, .08);
}

* { box-sizing: border-box; }

/* Hides an element even when a Bootstrap display utility (which uses
   !important) is applied to it. */
.rm-hidden { display: none !important; }

body {
  background: var(--rm-body-bg);
  color: #23293a;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--rm-primary); }
a:hover { color: var(--rm-accent); }

/* ---------- Header ---------- */
.rm-navbar {
  background: var(--rm-primary);
  box-shadow: 0 2px 18px rgba(20, 30, 70, .18);
}
.rm-navbar .navbar-brand { color: #fff; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: .55rem; }
.rm-navbar .nav-link { color: rgba(255,255,255,.82); font-weight: 500; }
.rm-navbar .nav-link:hover, .rm-navbar .nav-link.active { color: #fff; }
.rm-brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--rm-accent), #ff7a45); color: #fff; font-weight: 800;
}
/* ---------- Buttons ---------- */
.btn-rm-accent {
  background: var(--rm-accent); color: #1b1206; border: 1px solid transparent; font-weight: 600;
}
.btn-rm-accent:hover, .btn-rm-accent:focus {
  background: #ffb648; color: #1b1206; border-color: transparent;
}
.btn-rm-primary {
  background: var(--rm-primary); color: #fff; border: 1px solid transparent; font-weight: 600;
}
.btn-rm-primary:hover, .btn-rm-primary:focus {
  background: var(--rm-primary-dark); color: #fff; border-color: transparent;
}
.btn-rm-ghost {
  background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.3); font-weight: 600;
}
.btn-rm-ghost:hover { background: rgba(255,255,255,.16); color: #fff; }

/* ---------- Hero ---------- */
.rm-hero {
  background: linear-gradient(135deg, var(--rm-primary-dark) 0%, var(--rm-primary) 55%, #2d4184 100%);
  color: #fff; padding: 76px 0 84px; position: relative; overflow: hidden;
}
.rm-hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(245,165,36,.28), transparent 65%); border-radius: 50%;
}
.rm-hero h1 { font-weight: 800; letter-spacing: -.03em; max-width: 760px; }
.rm-hero p.lead { color: rgba(255,255,255,.82); max-width: 640px; }
.rm-stat { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: var(--rm-radius); padding: 1rem 1.1rem; }
.rm-stat .rm-stat-value { font-size: 1.6rem; font-weight: 800; }
.rm-stat .rm-stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.7); }

/* ---------- Cards ---------- */
.rm-card {
  background: #fff; border: 1px solid var(--rm-border); border-radius: var(--rm-radius);
  box-shadow: var(--rm-shadow); padding: 1.25rem;
}
/* Cards that sit directly in a grid column stretch to the tallest column so the
   rows stay aligned. Nested cards keep their natural height. */
.row > [class*="col-"] > .rm-card { height: 100%; }
.rm-card-hover { transition: transform .18s ease, box-shadow .18s ease; }
.rm-card-hover:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(24,38,82,.13); }
.rm-icon-tile {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(31,45,92,.08); color: var(--rm-primary); font-size: 1.25rem; margin-bottom: .75rem;
}
.rm-price { font-size: 1.35rem; font-weight: 800; color: var(--rm-primary); }
.rm-strike { text-decoration: line-through; color: var(--rm-muted); font-size: .95rem; }
.rm-badge-cat { background: rgba(245,165,36,.16); color: #8a5a00; font-weight: 600; }

/* ---------- Section headings ---------- */
.rm-section { padding: 62px 0; }
.rm-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 700; color: var(--rm-accent); }
.rm-section-title { font-weight: 800; letter-spacing: -.02em; color: var(--rm-primary); }
.rm-section-sub { color: var(--rm-muted); max-width: 640px; }

/* ---------- Forms ---------- */
.rm-form .form-label { font-weight: 600; font-size: .88rem; color: #38415c; }
.rm-form .form-control, .rm-form .form-select {
  border-radius: 10px; border-color: var(--rm-border); padding: .6rem .85rem;
}
.rm-form .form-control:focus, .rm-form .form-select:focus {
  border-color: var(--rm-accent); box-shadow: 0 0 0 .2rem rgba(245,165,36,.18);
}
.rm-btn-primary { background: var(--rm-primary); border: 0; color: #fff; font-weight: 600; border-radius: 10px; padding: .6rem 1.3rem; }
.rm-btn-primary:hover { background: var(--rm-primary-dark); color: #fff; }
.rm-btn-accent { background: var(--rm-accent); border: 0; color: #1b1206; font-weight: 700; border-radius: 10px; padding: .6rem 1.3rem; }
.rm-btn-accent:hover { background: #ffb648; color: #1b1206; }
.rm-error { color: #c0392b; font-size: .82rem; margin-top: .25rem; }
.rm-field-error .form-control, .rm-field-error .form-select { border-color: #e74c3c; }

/* ---------- Slot picker ---------- */
.rm-slot { border: 1px solid var(--rm-border); border-radius: 9px; padding: .4rem .7rem; font-size: .85rem; cursor: pointer; background: #fff; }
.rm-slot input { display: none; }
.rm-slot:has(input:checked) { background: var(--rm-primary); color: #fff; border-color: var(--rm-primary); }
.rm-date-pill { border: 1px solid var(--rm-border); border-radius: 10px; padding: .5rem .7rem; font-size: .8rem; cursor: pointer; background: #fff; text-align: center; }
.rm-date-pill input { display: none; }
.rm-date-pill:has(input:checked) { background: var(--rm-accent); border-color: var(--rm-accent); color: #1b1206; font-weight: 600; }

/* ---------- Tables ---------- */
.rm-table-wrap { background: #fff; border: 1px solid var(--rm-border); border-radius: var(--rm-radius); overflow: hidden; }
.rm-table { margin: 0; }
.rm-table thead th { background: #f9fafd; border-bottom: 1px solid var(--rm-border); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--rm-muted); font-weight: 700; white-space: nowrap; }
.rm-table td { vertical-align: middle; font-size: .9rem; }
.rm-table tbody tr:hover { background: #fafbff; }

/* ---------- Status pills ---------- */
.rm-status { display: inline-block; padding: .18rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; }
.rm-status-pending { background: #fff4e0; color: #9a6300; }
.rm-status-confirmed, .rm-status-assigned { background: #e5efff; color: #17458f; }
.rm-status-in_progress { background: #ede4ff; color: #5b32b0; }
.rm-status-on_hold { background: #f1f3f7; color: #5a6379; }
.rm-status-completed { background: #e2f7ec; color: #137547; }
.rm-status-cancelled { background: #fdeaea; color: #b3261e; }
.rm-status-refunded { background: #f3e8ff; color: #6b21a8; }
.rm-status-unpaid { background: #f1f3f7; color: #5a6379; }
.rm-status-paid { background: #e2f7ec; color: #137547; }
.rm-status-active { background: #e2f7ec; color: #137547; }
.rm-status-inactive, .rm-status-banned, .rm-status-suspended { background: #fdeaea; color: #b3261e; }

/* ---------- Flash ---------- */
.rm-flash { border-radius: 12px; padding: .8rem 1.1rem; font-weight: 500; margin-bottom: 1.25rem; border: 1px solid transparent; }
.rm-flash-success { background: #e6f7ee; border-color: #b7e6cd; color: #11603c; }
.rm-flash-error { background: #fdecea; border-color: #f5c2c0; color: #93231d; }
.rm-flash-info { background: #e9f1ff; border-color: #c3d9ff; color: #17458f; }

/* ---------- Admin & dashboard shells ---------- */
.rm-shell { display: flex; min-height: 100vh; }
.rm-side {
  width: 256px; flex: 0 0 256px; background: var(--rm-primary); color: rgba(255,255,255,.8);
  padding: 1.1rem .8rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.rm-side .rm-side-brand { color: #fff; font-weight: 800; display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem 1rem; }
.rm-side a.rm-side-link { display: flex; align-items: center; gap: .6rem; color: rgba(255,255,255,.74); padding: .5rem .6rem; border-radius: 9px; font-size: .9rem; margin-bottom: .1rem; }
.rm-side a.rm-side-link:hover { background: rgba(255,255,255,.09); color: #fff; }
.rm-side a.rm-side-link.active { background: rgba(245,165,36,.18); color: #fff; font-weight: 600; }
.rm-side .rm-side-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.42); padding: 1rem .6rem .35rem; }
.rm-main { flex: 1 1 auto; min-width: 0; padding: 1.4rem 1.6rem 3rem; }
.rm-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.rm-page-title { font-weight: 800; font-size: 1.4rem; color: var(--rm-primary); margin: 0; }
.rm-page-sub { color: var(--rm-muted); font-size: .9rem; margin: .15rem 0 0; }
.rm-kpi { background: #fff; border: 1px solid var(--rm-border); border-radius: var(--rm-radius); padding: 1rem 1.1rem; }
.rm-kpi .rm-kpi-value { font-size: 1.75rem; font-weight: 800; color: var(--rm-primary); line-height: 1.1; }
.rm-kpi .rm-kpi-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--rm-muted); }
.rm-kpi .rm-kpi-icon { float: right; font-size: 1.4rem; color: var(--rm-accent); }

/* ---------- Auth ---------- */
.rm-auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--rm-primary-dark), #2a3c78 60%, #3a4f96); }
.rm-auth-card { width: 100%; max-width: 470px; background: #fff; border-radius: 18px; padding: 2rem; box-shadow: 0 30px 70px rgba(10,18,45,.35); }
.rm-auth-card h1 { font-weight: 800; color: var(--rm-primary); font-size: 1.5rem; }
.rm-auth-links { display: flex; justify-content: space-between; font-size: .86rem; margin-top: 1rem; }
.rm-social-btn { border: 1px solid var(--rm-border); border-radius: 10px; padding: .55rem; display: flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 600; font-size: .88rem; background: #fff; }
.rm-social-btn:hover { border-color: var(--rm-primary); color: var(--rm-primary); }

/* ---------- Misc ---------- */
.rm-timeline { list-style: none; padding: 0; margin: 0; }
.rm-timeline li { position: relative; padding-left: 1.6rem; padding-bottom: 1rem; border-left: 2px solid var(--rm-border); }
.rm-timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--rm-accent); }
.rm-timeline li:last-child { border-left-color: transparent; }
.rm-empty { text-align: center; padding: 3rem 1rem; color: var(--rm-muted); }
.rm-empty i { font-size: 2.4rem; opacity: .4; display: block; margin-bottom: .5rem; }
.rm-chat-widget { position: fixed; right: 18px; bottom: 18px; z-index: 1040; }
.rm-chat-toggle { width: 56px; height: 56px; border-radius: 50%; background: var(--rm-primary); color: #fff; border: 0; font-size: 1.4rem; box-shadow: 0 12px 28px rgba(24,38,82,.3); }
.rm-chat-panel { width: 330px; max-width: calc(100vw - 36px); background: #fff; border-radius: 16px; box-shadow: 0 20px 50px rgba(24,38,82,.25); border: 1px solid var(--rm-border); overflow: hidden; }
.rm-chat-head { background: var(--rm-primary); color: #fff; padding: .8rem 1rem; font-weight: 600; }
.rm-chat-body { height: 260px; overflow-y: auto; padding: .8rem; background: #f8faff; }
.rm-chat-msg { background: #fff; border: 1px solid var(--rm-border); border-radius: 12px; padding: .5rem .7rem; margin-bottom: .5rem; font-size: .87rem; }
.rm-chat-msg.is-staff { background: rgba(245,165,36,.14); border-color: rgba(245,165,36,.4); }
.rm-cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1050; background: #fff; border: 1px solid var(--rm-border); border-radius: 14px; box-shadow: 0 18px 44px rgba(24,38,82,.2); padding: 1rem 1.1rem; }
.rm-chip { display: inline-block; background: rgba(31,45,92,.07); color: var(--rm-primary); border-radius: 999px; padding: .18rem .65rem; font-size: .78rem; font-weight: 600; margin: 0 .25rem .25rem 0; }
.rm-progress { height: 7px; border-radius: 99px; background: #eef1f7; overflow: hidden; }
.rm-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--rm-accent), #ff8a4c); }
.rm-bar-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; font-size: .85rem; }
.rm-bar-row .rm-bar { flex: 1; height: 8px; background: #eef1f7; border-radius: 99px; overflow: hidden; }
.rm-bar-row .rm-bar span { display: block; height: 100%; background: var(--rm-primary); }

@media (max-width: 991px) {
  .rm-shell { flex-direction: column; }
  .rm-side { width: 100%; flex: none; height: auto; position: static; }
  .rm-main { padding: 1rem; }
}
