/* SalonFlow owner platform: same look as the salon app (plum #2e2036, flat white cards, 8px corners, solid buttons and badges) */
:root {
  --mg-brand: #2e2036; --mg-brand-2: #5b3f6c; --mg-canvas: #f4f3f6; --mg-border: #e3e0e7; --mg-line: #eeebf1;
  --mg-text: #231f27; --mg-muted: #5e5866; --mg-ok: #1e7a4c; --mg-wait: #8f5400; --mg-bad: #b42332; --mg-note: #1d669c;
  --mg-side: 220px; --mg-top: 56px;
}
body { background: var(--mg-canvas); color: var(--mg-text); font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 13px; }
:focus-visible { outline: 2px solid #7d5b92; outline-offset: 2px; }
a { color: var(--mg-brand-2); }

.mg-side { position: fixed; inset: 0 auto 0 0; width: var(--mg-side); background: #fff; border-right: 1px solid var(--mg-border); display: flex; flex-direction: column; padding: 14px 10px; z-index: 1030; overflow-y: auto; scrollbar-width: none; }
.mg-side::-webkit-scrollbar { display: none; }
.mg-brand { display: flex; align-items: baseline; gap: 8px; padding: 4px 10px 16px; font-weight: 650; color: var(--mg-text); text-decoration: none; font-size: 14px; }
.mg-brand span { font: 700 26px/1 "Segoe UI", sans-serif; letter-spacing: -2px; color: var(--mg-brand); }
.mg-brand b { color: #8e7ba4; }
.mg-side nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mg-side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 6px; color: #57505f; text-decoration: none; font-weight: 550; }
.mg-side nav a:hover { background: #f3f0f5; color: var(--mg-brand); }
.mg-side nav a.active { background: var(--mg-brand); color: #fff; }
.mg-side nav a i { font-size: 16px; }
.mg-me { border-top: 1px solid var(--mg-line); padding-top: 10px; display: grid; gap: 8px; }
.mg-me a { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--mg-text); text-decoration: none; font-weight: 600; padding: 0 6px; }
.mg-me small { width: 100%; padding-left: 22px; color: var(--mg-muted); font-weight: 500; }
.mg-top { position: fixed; top: 0; left: var(--mg-side); right: 0; height: var(--mg-top); display: flex; align-items: center; gap: 10px; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--mg-border); z-index: 1020; }
.mg-top h1 { font-size: 16px; font-weight: 650; margin: 0; }
.mg-main { margin-left: var(--mg-side); padding: calc(var(--mg-top) + 20px) 24px 32px; max-width: calc(1500px + var(--mg-side)); }
.mg-auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }

.card { border: 1px solid var(--mg-border); border-radius: 8px; box-shadow: 0 1px 2px #2e20360a; margin-bottom: 14px; }
.card-body { padding: 16px; }
.card-title, .mg-h { font-size: 13.5px; font-weight: 650; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.mg-sub { font-size: 11.5px; color: var(--mg-muted); }

.btn { border-radius: 4px; font-weight: 550; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-sm { font-size: 11.5px; }
.btn-primary { background: var(--mg-brand); border-color: var(--mg-brand); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: #1b1320; border-color: #1b1320; }
.btn-secondary { background: #4a4452; border-color: #4a4452; color: #fff; }
.btn-secondary:hover { background: #34303a; border-color: #34303a; }
.btn-success { background: var(--mg-ok); border-color: var(--mg-ok); }
.btn-danger { background: var(--mg-bad); border-color: var(--mg-bad); }
.btn-warning { background: var(--mg-wait); border-color: var(--mg-wait); color: #fff; }
.btn-info { background: var(--mg-note); border-color: var(--mg-note); color: #fff; }
.btn-warning:hover, .btn-info:hover { color: #fff; filter: brightness(.9); }

.badge { border-radius: 4px; font-weight: 600; color: #fff; }
.badge.bg-success { background: var(--mg-ok) !important; } .badge.bg-warning { background: var(--mg-wait) !important; color: #fff !important; }
.badge.bg-danger { background: var(--mg-bad) !important; } .badge.bg-info { background: var(--mg-note) !important; }
.badge.bg-secondary { background: #4a4452 !important; } .badge.bg-primary { background: var(--mg-brand) !important; }

.form-label { font-weight: 600; font-size: 12px; margin-bottom: 4px; color: #423b49; }
.form-control, .form-select { border-radius: 4px; border-color: #cfc9d5; font-size: 13px; }
.form-control:focus, .form-select:focus { border-color: #7d5b92; box-shadow: 0 0 0 3px #7d5b9226; }
.form-text { font-size: 11px; }
.form-check-input:checked { background-color: var(--mg-brand); border-color: var(--mg-brand); }

.table { font-size: 12.5px; margin: 0; }
.table thead th { background: #f8f7fa; color: var(--mg-muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; font-weight: 600; border-bottom: 1px solid var(--mg-border); white-space: nowrap; }
.table td { vertical-align: middle; border-color: var(--mg-line); }
.table-hover tbody tr:hover > td { background: #faf8fb; }
.table .text-end { font-variant-numeric: tabular-nums; }

.mg-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.mg-kpi { background: #fff; border: 1px solid var(--mg-border); border-radius: 8px; padding: 14px; text-decoration: none; color: var(--mg-text); display: flex; flex-direction: column; gap: 4px; }
.mg-kpi:hover { border-color: #cfc6d6; color: var(--mg-text); }
.mg-kpi span { font-size: 11.5px; color: var(--mg-muted); display: flex; gap: 6px; align-items: center; }
.mg-kpi strong { font-size: 22px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.mg-kpi.is-bad strong { color: var(--mg-bad); } .mg-kpi.is-wait strong { color: var(--mg-wait); } .mg-kpi.is-ok strong { color: var(--mg-ok); }

.mg-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.mg-tabs a { padding: 7px 14px; border-radius: 4px; background: #4a4452; color: #fff; text-decoration: none; font-weight: 550; }
.mg-tabs a.active { background: var(--mg-brand); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--mg-brand); }
.mg-filter { display: flex; flex-wrap: wrap; gap: 4px; }
.mg-filter a { padding: 4px 10px; border-radius: 4px; background: #5e5866; color: #fff; text-decoration: none; font-size: 11.5px; }
.mg-filter a.active { background: var(--mg-brand); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--mg-brand); }

.mg-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 12.5px; }
.mg-dl dt { color: var(--mg-muted); font-weight: 500; } .mg-dl dd { margin: 0; font-weight: 600; }
.mg-secret { font-family: ui-monospace, Consolas, monospace; font-size: 15px; letter-spacing: 1px; background: #2e2036; color: #fff; padding: 8px 12px; border-radius: 4px; display: inline-block; user-select: all; }
.mg-step { border-left: 3px solid var(--mg-brand); padding-left: 14px; margin-bottom: 18px; }
.mg-step h3 { font-size: 13px; font-weight: 650; margin-bottom: 10px; }
.mg-lines td { padding: 4px !important; }
.mg-lines input { min-width: 70px; }
.mg-auth-card { width: min(380px, 100%); }
.mg-auth-card .mg-brand { justify-content: center; padding-bottom: 6px; }

@media (max-width: 991px) {
  .mg-side { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 30px #0003; }
  .mg-side.open { transform: none; }
  .mg-top { left: 0; padding: 0 14px; }
  .mg-main { margin-left: 0; padding: calc(var(--mg-top) + 14px) 14px 24px; }
}
@media print {
  .mg-side, .mg-top, .no-print, .alert { display: none !important; }
  .mg-main { margin: 0; padding: 0; }
  .card { border: 0; box-shadow: none; }
  body { background: #fff; }
}
