:root {
  --lp-blue: #0937ff;
  --lp-blue-soft: #f3f7ff;
  --lp-text: #444c5c;
  --lp-muted: #acb2ce;
  --lp-line: #e7e9ef;
  --lp-bg: #fff;
  --lp-shadow: 0 1px 2px rgba(23,27,175,.12), 0 10px 30px rgba(39,45,117,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.latepoint-admin {
  font-family: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--lp-text);
  background: #fff;
  font-size: 14px;
  line-height: 1.4;
}
a { color: var(--lp-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.lp-icon { width: 18px; height: 18px; display: inline-block; vertical-align: middle; }

.latepoint-all-wrapper { min-height: 100vh; }
.latepoint-content-and-menu-w { display: flex; min-height: 100vh; }
.latepoint-side-menu-w {
  flex: 0 0 200px;
  background: #fff;
  border-right: 1px solid var(--lp-line);
  min-height: 100vh;
}
.side-menu-top-part-w { padding: 22px 18px 16px; border-bottom: 1px solid var(--lp-line); }
.os-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.os-logo-mark {
  width: 32px; height: 32px; border-radius: 8px; background: var(--lp-blue); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 18px;
}
.os-logo-text { font-weight: 700; font-size: 18px; color: #1b2140; letter-spacing: .3px; }
ul.side-menu { list-style: none; margin: 0; padding: 18px 0; }
ul.side-menu > li { margin: 0; }
ul.side-menu > li > a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; color: #444c5c; text-transform: uppercase;
  font-size: 13px; font-weight: 500; letter-spacing: 1px; text-decoration: none;
}
ul.side-menu > li > a .lp-icon { color: var(--lp-blue); }
ul.side-menu > li.menu-item-is-active > a { color: var(--lp-blue); background: var(--lp-blue-soft); }
ul.side-menu > li.menu-spacer.with-label {
  padding: 22px 16px 8px; font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 2px; color: #acb2ce; position: relative;
}
ul.side-menu > li.menu-spacer.with-label:after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 1px; background: rgba(0,0,0,.07);
}
.side-sub-menu { list-style: none; margin: 0 0 12px; padding: 4px 0 4px 44px; }
.side-sub-menu a { display: block; padding: 4px 0; color: #444c5c; font-size: 13px; text-decoration: none; }
.side-sub-menu a:hover { color: var(--lp-blue); }

.latepoint-content-w { flex: 1; min-width: 0; background: #fff; }
.latepoint-top-bar-w {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 28px; border-bottom: 1px solid var(--lp-line);
}
.latepoint-top-search-w { flex: 1; position: relative; }
.latepoint-top-search-input-w { display: flex; align-items: center; gap: 8px; color: var(--lp-muted); }
.latepoint-top-search {
  width: 100%; border: 0; outline: none; font: inherit; font-size: 15px; padding: 8px 0; color: var(--lp-text);
}
.latepoint-top-search-results-w {
  position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: var(--lp-shadow);
  border-radius: 6px; z-index: 20; display: none;
}
.latepoint-top-search-results-w.open { display: block; }
.latepoint-top-search-results-w a { display: block; padding: 10px 14px; color: var(--lp-text); text-decoration: none; }
.latepoint-top-search-results-w a:hover { background: var(--lp-blue-soft); }
.latepoint-top-search-results-w small { color: var(--lp-muted); margin-right: 8px; }
.latepoint-top-iconed-link {
  position: relative; width: 38px; height: 38px; display: grid; place-items: center;
  color: #5b6478; border-radius: 8px; text-decoration: none;
}
.latepoint-top-iconed-link:hover { background: var(--lp-blue-soft); color: var(--lp-blue); }
.notifications-count {
  position: absolute; top: 2px; right: 2px; background: #ffb123; color: #111;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 99px;
  display: grid; place-items: center; padding: 0 4px;
}
.latepoint-top-new-appointment-btn { margin-left: 6px; }
.latepoint-top-user-info-w .avatar-w {
  width: 36px; height: 36px; border-radius: 50%; background: var(--lp-blue); color: #fff;
  display: grid; place-items: center; font-weight: 600;
}
.page-header-w { padding: 22px 40px 0; }
.page-header-main { margin: 0; font-size: 28px; font-weight: 600; color: #1b2140; }
.latepoint-content { padding: 28px 40px 50px; }

.latepoint-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--lp-blue); color: #fff; border: 0; border-radius: 6px;
  padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.latepoint-btn:hover { filter: brightness(1.05); text-decoration: none; color: #fff; }
.latepoint-btn-secondary, .latepoint-btn-outline {
  background: #fff; color: var(--lp-text); border: 1px solid var(--lp-line);
}
.latepoint-btn-secondary:hover, .latepoint-btn-outline:hover { color: var(--lp-text); }
.latepoint-btn-danger { background: #ef4444; }
.latepoint-btn-sm { padding: 6px 12px; font-size: 13px; }
.latepoint-btn-link { background: none; color: var(--lp-blue); padding: 0; }
.latepoint-btn-block { width: 100%; justify-content: center; }

.os-form-control, select.os-form-control, input.os-form-control, textarea.os-form-control {
  width: 100%; border: 1px solid #dfe3ee; border-radius: 6px; padding: 9px 12px;
  font: inherit; color: var(--lp-text); background: #fff;
}
.os-form-group { margin-bottom: 14px; }
.os-form-group label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: #6b7390; }
.os-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 4px; }
.os-col-4 { flex: 1 1 30%; min-width: 180px; }
.os-col-6 { flex: 1 1 45%; min-width: 220px; }
.os-flex { display: flex; align-items: center; gap: 10px; }
.white-box {
  background: #fff; box-shadow: var(--lp-shadow); border-radius: 3px; margin-bottom: 22px;
}
.white-box-header { padding: 18px 24px 0; }
.white-box-content { padding: 16px 24px 22px; }
.os-form-sub-header { display: flex; justify-content: space-between; align-items: center; margin: 0 0 12px; }
.os-form-sub-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.os-form-buttons { padding: 0 0 8px; }

.os-table-w { overflow-x: auto; box-shadow: var(--lp-shadow); border-radius: 3px; }
.os-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.os-table th, .os-table td { padding: 11px 12px; border-bottom: 1px solid var(--lp-line); text-align: left; }
.os-table thead th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--lp-muted); font-weight: 600;
  background: #fafbfe;
}
.os-table tbody tr:hover { background: #f8faff; }
.os-column-faded { color: var(--lp-muted); }
.os-column-service-color { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.os-with-avatar { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.os-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: #dbe4ff; color: var(--lp-blue);
  display: inline-grid; place-items: center; font-size: 11px; font-weight: 700;
}
.os-avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.os-avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.os-column-status {
  display: inline-block; padding: 3px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; text-transform: uppercase;
}
.os-column-status-approved { background: #d1fae5; color: #065f46; }
.os-column-status-pending { background: #fef3c7; color: #92400e; }
.os-column-status-cancelled { background: #fee2e2; color: #991b1b; }
.os-column-status-payment_pending { background: #ede9fe; color: #5b21b6; }

.os-pagination-w { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 14px; color: #6b7390; }
.os-filters-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.os-filters-bar .os-form-control { width: auto; min-width: 140px; }

.stats-grid-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 22px; }
.stats-grid-box { background: #fff; box-shadow: var(--lp-shadow); border-radius: 8px; padding: 16px 18px; }
.stats-grid-value { font-size: 26px; font-weight: 700; color: #1b2140; }
.stats-grid-label { font-size: 12px; color: var(--lp-muted); text-transform: uppercase; letter-spacing: .04em; }
.os-widget { box-shadow: var(--lp-shadow); border-radius: 8px; margin-bottom: 22px; }
.os-widget-header { padding: 16px 20px; border-bottom: 1px solid var(--lp-line); }
.os-widget-header-text { margin: 0; font-size: 16px; }
.os-widget-content { padding: 16px 20px; }

.appointment-boxes-squared-w { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.appointment-box-squared {
  display: block; border: 1px solid var(--lp-line); border-radius: 8px; padding: 12px; color: inherit; text-decoration: none;
}
.appointment-box-squared:hover { border-color: #c9d4f5; text-decoration: none; }
.appointment-color-elem { width: 100%; height: 4px; border-radius: 4px; margin-bottom: 8px; }
.appointment-service-name { font-weight: 600; margin-bottom: 8px; }
.appointment-date-w { display: flex; justify-content: space-between; align-items: center; }
.appointment-date { font-size: 13px; }
.appointment-time { color: var(--lp-muted); font-size: 12px; }
.appointment-person-info { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.agent-label { font-size: 11px; color: var(--lp-muted); }
.agent-name { font-weight: 600; font-size: 13px; }

.index-agent-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.agent-box-w, .create-agent-link-w, .create-service-link-w {
  display: block; border: 1px solid var(--lp-line); border-radius: 10px; padding: 16px; color: inherit; text-decoration: none;
  background: #fff; box-shadow: var(--lp-shadow);
}
.agent-box-w:hover, .create-agent-link-w:hover { text-decoration: none; border-color: #c9d4f5; }
.agent-info-w { display: flex; gap: 12px; align-items: center; }
.agent-name { font-weight: 600; font-size: 16px; }
.agent-phone { color: var(--lp-muted); font-size: 13px; }
.agent-schedule { display: flex; gap: 4px; margin: 14px 0; }
.schedule-day { flex: 1; text-align: center; font-size: 10px; font-weight: 700; padding: 6px 0; border-radius: 4px; background: #f1f5f9; color: #94a3b8; }
.schedule-day.is-on { background: #dbe4ff; color: var(--lp-blue); }
.agent-schedule-info { display: flex; justify-content: space-between; font-size: 12px; color: #6b7390; }
.today-status.is-on-duty { color: #059669; font-weight: 600; }
.today-status.is-off-duty { color: #ef4444; font-weight: 600; }
.today-bookings-count { font-size: 20px; font-weight: 700; color: #1b2140; }
.create-agent-link-i, .create-service-link-i { text-align: center; padding: 28px 10px; color: var(--lp-muted); }
.add-agent-plus, .add-service-plus { font-size: 24px; margin-bottom: 8px; }

.os-services-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 24px; }
.os-service { border: 1px solid var(--lp-line); border-radius: 10px; overflow: hidden; box-shadow: var(--lp-shadow); }
.os-service-header { padding: 14px 16px; display: flex; align-items: center; gap: 8px; }
.service-color-dot { width: 10px; height: 10px; border-radius: 50%; }
.service-name { margin: 0; font-size: 16px; }
.os-service-body { padding: 0 16px 12px; }
.service-info-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: #6b7390; }
.os-service-foot { padding: 12px 16px; border-top: 1px solid var(--lp-line); }

.location-box {
  display: block; padding: 14px 16px; border: 1px solid var(--lp-line); border-radius: 8px;
  margin-bottom: 10px; color: inherit; text-decoration: none;
}
.location-name { font-weight: 600; }
.location-addr { color: var(--lp-muted); font-size: 13px; margin: 4px 0 8px; }

.no-results-w { border: 4px dotted #eee; border-radius: 4px; text-align: center; padding: 40px; }
.no-results-w h2 { color: #ACB8CE; margin: 0 0 16px; }

.latepoint-message { padding: 12px 14px; border-radius: 6px; margin-bottom: 16px; }
.latepoint-message-success { background: #d1fae5; color: #065f46; }
.latepoint-message-warning { background: #fef3c7; color: #92400e; }
.latepoint-message-error { background: #fee2e2; color: #991b1b; }
.latepoint-message-subtle { background: #f8fafc; color: #64748b; border: 1px solid var(--lp-line); }

.os-page-tabs { display: flex; gap: 18px; list-style: none; padding: 0; margin: 0 0 18px; border-bottom: 1px solid var(--lp-line); }
.os-page-tabs a { display: block; padding: 10px 0; color: #6b7390; text-decoration: none; font-weight: 500; }
.os-page-tab-active a { color: var(--lp-blue); box-shadow: 0 1px 0 var(--lp-blue); }

.cal-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cal-nav h2 { margin: 0; font-size: 20px; flex: 1; text-align: center; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.month-head { font-size: 11px; font-weight: 700; color: var(--lp-muted); text-align: center; padding: 6px; text-transform: uppercase; }
.month-cell { min-height: 110px; border: 1px solid var(--lp-line); border-radius: 6px; padding: 6px; background: #fff; }
.month-cell.empty { background: #fafbfe; }
.month-cell.is-today { border-color: var(--lp-blue); }
.month-day { font-weight: 700; display: inline-block; margin-bottom: 4px; color: #1b2140; }
.month-apt { display: block; font-size: 11px; padding: 2px 4px; margin-bottom: 2px; border-left: 3px solid var(--lp-blue); background: #f8faff; color: #1b2140; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month-more { font-size: 11px; color: var(--lp-muted); }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.week-col { border: 1px solid var(--lp-line); border-radius: 8px; min-height: 280px; padding: 8px; }
.week-head { font-weight: 600; font-size: 12px; margin-bottom: 8px; color: #6b7390; }
.week-apt { display: block; padding: 8px; border-radius: 6px; margin-bottom: 6px; border-left: 3px solid; color: inherit; text-decoration: none; font-size: 12px; }
.week-apt em { display: block; font-style: normal; color: #6b7390; }
.daily-agents { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.daily-agent-col { border: 1px solid var(--lp-line); border-radius: 8px; padding: 12px; min-height: 200px; }
.da-head-agent { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 600; }
.daily-apt { display: block; padding: 8px 10px; border-left: 3px solid; background: #f8faff; border-radius: 4px; margin-bottom: 8px; color: inherit; text-decoration: none; }
.daily-apt-time { font-weight: 600; font-size: 12px; }
.daily-apt-svc { font-size: 13px; }
.daily-apt-cus { font-size: 12px; color: #6b7390; }

.latepoint-system-status-w ul { list-style: none; padding: 0; }
.latepoint-system-status-w li { padding: 6px 0; }
.lp-status-banner { padding: 12px 14px; border-radius: 6px; font-weight: 600; margin: 12px 0 16px; }
.lp-status-banner.is-ok { background: #d1fae5; color: #065f46; }
.lp-status-banner.is-warn { background: #fef3c7; color: #92400e; }
.lp-status-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.lp-stat { background: #f8faff; border: 1px solid var(--lp-line); border-radius: 8px; padding: 12px; text-align: center; font-size: 12px; color: #6b7390; text-transform: uppercase; }
.lp-stat span { display: block; font-size: 22px; font-weight: 800; color: var(--lp-blue); }
.lp-cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.muted { color: var(--lp-muted); font-size: 12px; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: #f3f7ff; padding: 1px 5px; border-radius: 4px; }
.selected-pill { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.mobile-menu { display: none; }

@media (max-width: 1000px) {
  .stats-grid-row, .lp-status-stats { grid-template-columns: repeat(3, 1fr); }
  .week-grid, .month-grid { grid-template-columns: 1fr; }
  .month-head { display: none; }
}
@media (max-width: 800px) {
  .latepoint-side-menu-w { position: fixed; z-index: 40; transform: translateX(-100%); transition: .2s; }
  .latepoint-side-menu-w.open { transform: none; }
  .mobile-menu { display: grid; }
  .latepoint-content { padding: 16px; }
  .page-header-w { padding: 16px 16px 0; }
  .stats-grid-row { grid-template-columns: 1fr 1fr; }
  .latepoint-top-new-appointment-btn span { display: none; }
}
