/* Back-office skin: dark sidebar + card dashboard, in the spirit of an AdminLTE layout. */
:root {
  --primary: #2563eb;
  --secondary: #1e293b;
  --accent: #2563eb;
  --primary-fg: #fff;
  --header-bg: #0f172a;
  --header-color: #e2e8f0;
  --header-branding-color: #fff;
  --header-link-color: #e2e8f0;
  --breadcrumbs-bg: #1e293b;
  --breadcrumbs-fg: #cbd5e1;
  --breadcrumbs-link-fg: #fff;
  --link-fg: #2563eb;
  --link-hover-color: #1d4ed8;
  --button-bg: #2563eb;
  --button-hover-bg: #1d4ed8;
  --default-button-bg: #2563eb;
  --default-button-hover-bg: #1d4ed8;
  --object-tools-bg: #1e293b;
  --object-tools-hover-bg: #334155;
}

#header { padding: 10px 24px; }
#site-name a { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
#site-name small { font-weight: 400; opacity: .6; font-size: 12px; }
.bo-logo {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  background: var(--primary); color: #fff; font-size: 15px; font-weight: 800;
}

/* Sidebar */
#nav-sidebar { background: #0f172a; border-right: 0; }
#nav-sidebar .module caption, #nav-sidebar .module th { background: transparent; }
#nav-sidebar .module caption a.section { color: #94a3b8; text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }
#nav-sidebar a { color: #cbd5e1; }
#nav-sidebar a:hover, #nav-sidebar tr.current-model a { color: #fff; background: #1e293b; }
#nav-sidebar .current-app .section:link, #nav-sidebar .current-app .section:visited { color: #fff; }
#nav-filter { background: #1e293b; color: #e2e8f0; border: 1px solid #334155; }
.toggle-nav-sidebar { background: #0f172a; border-right: 1px solid #1e293b; color: #94a3b8; }

/* Dashboard */
.bo-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.bo-toolbar h1 { margin: 0; font-size: 22px; }
.bo-toolbar h1 small { font-size: 13px; font-weight: 400; color: #64748b; margin-left: 6px; }
.bo-range { display: flex; gap: 6px; }
.bo-range a { padding: 6px 12px; border-radius: 999px; background: #e2e8f0; color: #0f172a; font-size: 13px; text-decoration: none; }
.bo-range a.is-active { background: var(--primary); color: #fff; }

.bo-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.bo-kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 12px; background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.bo-kpi__label { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: .05em; }
.bo-kpi__value { font-size: 30px; font-weight: 700; color: #0f172a; line-height: 1.1; }
.bo-kpi__hint { font-size: 12px; color: #94a3b8; }

.bo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 18px; }
.bo-card { padding: 16px 18px; border-radius: 12px; background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(15,23,42,.04); margin-bottom: 18px; }
.bo-grid .bo-card { margin-bottom: 0; }
.bo-card h3 { margin: 0 0 12px; font-size: 14px; color: #0f172a; text-transform: none; }
.bo-table { width: 100%; border-collapse: collapse; }
.bo-table td { padding: 7px 4px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.bo-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.bo-empty { color: #94a3b8; font-size: 13px; }
.bo-bar { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
.bo-bar div { height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.bo-bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.bo-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.bo-note { color: #94a3b8; font-size: 12px; }

/* Role permissions grid */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 8px; }
.perm-card { border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; background: #fff; }
.perm-card__head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.perm-card__app { color: #94a3b8; font-size: 12px; }
.perm-card__all { margin-left: auto; font-size: 12px; }
.perm-card__body { padding: 8px 12px; display: grid; gap: 4px; }
.perm-box { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 400; }
.perm-box input { width: auto; }
