/* Liquid Glass theme over the bundled Tabler components. */
:root {
  --tblr-primary: #3863df;
  --tblr-primary-rgb: 56, 99, 223;
  --tblr-body-color: #233451;
  --tblr-secondary: #586a84;
  --tblr-border-color: rgba(81, 108, 151, .14);
  --tblr-font-sans-serif: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --glass-surface: rgba(255, 255, 255, .62);
  --glass-border: rgba(255, 255, 255, .88);
  --glass-shadow: 0 12px 40px rgba(57, 79, 132, .07), inset 0 1px 0 rgba(255, 255, 255, .95);
  --glass-blur: blur(24px) saturate(145%);
}
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  background: #edf1fa;
  color: var(--tblr-body-color);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 5% 15%, #c9e6ff 0, transparent 48%),
    radial-gradient(ellipse at 88% 12%, #e3d7fa 0, transparent 45%),
    radial-gradient(ellipse at 75% 92%, #cceeea 0, transparent 50%),
    linear-gradient(135deg, #eff4fc, #f4f0fb 55%, #edf7fb);
  pointer-events: none;
}
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #3863df;
  outline-offset: 4px;
}
.text-secondary { color: var(--tblr-secondary) !important; }
.icon { width: 21px; height: 21px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn {
  border-radius: 12px;
  min-height: 40px;
  font-weight: 600;
  border-color: rgba(102, 125, 167, .22);
  background-color: rgba(255, 255, 255, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 2px 4px rgba(57, 79, 132, .03);
  transition: background-color .18s, box-shadow .18s, border-color .18s;
}
.btn:hover { background-color: rgba(255, 255, 255, .95); border-color: #9baedb; }
.btn-primary {
  --tblr-btn-color: #fff;
  --tblr-btn-bg: #3863df;
  --tblr-btn-border-color: #3863df;
  --tblr-btn-hover-bg: #2e52c2;
  --tblr-btn-hover-border-color: #2e52c2;
  --tblr-btn-active-bg: #294bb5;
  --tblr-btn-active-border-color: #294bb5;
  color: white;
  background: linear-gradient(160deg, #5b83f1, #3863df 65%, #3c58ce);
  border-color: rgba(58, 93, 204, .6);
  box-shadow: inset 0 1px 0 #ffffff59, 0 5px 12px #3863df26;
}
.btn-primary:hover { color: white; background: #2e52c2; border-color: #2e52c2; }
.btn-danger { color: white; background: #c83048; border-color: #c83048; }
.btn-danger:hover { color: white; background: #ad233a; border-color: #ad233a; }
.btn-ghost-secondary, .btn-ghost-danger, .btn-link { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost-danger { color: #b42844; }
.btn-ghost-danger:hover { color: #9c1d36; background: #fde8ed; border-color: transparent; }
.btn-link { color: var(--tblr-primary); }
.btn-sm { min-height: 34px; border-radius: 10px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; font-size: 25px; font-weight: 750; letter-spacing: -.9px; text-decoration: none; }
.brand:hover { text-decoration: none; color: inherit; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  color: white;
  border: 1px solid #ffffff80;
  border-radius: 14px;
  background: linear-gradient(145deg, #88afff, #4c76e9 55%, #6869d8);
  box-shadow: inset 0 1px 3px #ffffff80, 0 6px 14px #3863df26;
  font-size: 25px;
}
.project-name { min-width: 0; overflow-wrap: anywhere; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.7px; margin-bottom: 12px; color: #4c6081; }
.card, .sidebar, .topbar, .login-intro, .login-form-area, dialog {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.card { border-radius: 22px; }
.card-header { background: rgba(255, 255, 255, .15); border-bottom-color: var(--tblr-border-color); padding: 22px 24px; }
.card-body { padding: 26px; }
.card-footer { background: rgba(255, 255, 255, .25); border-top-color: var(--tblr-border-color); padding: 18px 24px; }
.card > :last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.card > :first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.login-shell { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; min-height: 100vh; padding: 28px; max-width: 1680px; margin: auto; }
.login-intro { display: flex; flex-direction: column; justify-content: space-between; padding: 44px 9%; border-radius: 32px; position: relative; overflow: hidden; background: linear-gradient(145deg, #ffffff70, #d3e3ff66 55%, #ded8ff80); }
.login-intro::after {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  border: 1px solid #ffffffb3;
  border-radius: 50%;
  right: -120px;
  bottom: -90px;
  background: linear-gradient(135deg, #ffffff80, #ffffff08 60%, #ffffff60);
  box-shadow: inset 12px 12px 35px #ffffff70, 0 0 0 28px #ffffff1a, 0 0 0 60px #ffffff1a;
  pointer-events: none;
}
.login-intro > * { position: relative; z-index: 1; }
.login-intro h1 { font-size: clamp(36px, 4.1vw, 64px); line-height: 1.1; font-weight: 650; letter-spacing: -2.4px; margin: 24px 0; }
.login-intro p { color: #4c6081; font-size: 16px; max-width: 390px; line-height: 1.8; }
.device-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 32px; }
.device-tags .badge { padding: 9px 15px; border: 1px solid #ffffffc9; border-radius: 30px; font-size: 12px; color: #405a84; background: #ffffff66; box-shadow: inset 0 1px 0 white; }
.intro-footer { font-size: 11px; color: #4c6081; margin-top: 40px; }
.login-form-area { display: grid; place-items: center; padding: 48px 32px; border-radius: 32px; }
.login-form { width: 100%; max-width: 360px; }
.login-form h2 { font-size: 30px; margin-bottom: 12px; letter-spacing: -.9px; }
.login-form .form-control { min-height: 48px; }
.login-form .btn { min-height: 48px; display: flex; justify-content: space-between; }
.login-note { color: #586a84; font-size: 12px; line-height: 1.8; margin-top: 26px; }
.portal { display: flex; min-height: 100vh; padding: 20px; gap: 24px; }
.sidebar { width: 242px; padding: 28px 16px 22px; display: flex; flex-direction: column; position: fixed; inset: 20px auto 20px 20px; border-radius: 26px; overflow-y: auto; }
.sidebar .brand { margin: 0 10px 46px; }
.nav-label { font-size: 9px; color: #586a84; letter-spacing: 1.2px; margin: 0 14px 16px; font-weight: 700; }
.sidebar .nav { gap: 7px; }
.sidebar .nav-entry { display: flex; align-items: center; gap: 12px; background: transparent; border: 1px solid transparent; padding: 13px 14px; width: 100%; text-align: left; border-radius: 14px; color: #4c6081; font-size: 13px; font-weight: 550; white-space: normal; }
.sidebar .nav-entry:hover { background: #ffffff80; color: #2e52c2; }
.sidebar .nav-entry.active { background: linear-gradient(120deg, #ffffffe6, #edf2ffb3); color: #2f54c4; border-color: #ffffffd9; box-shadow: 0 4px 12px #4e6da612, inset 0 1px 0 #fff; }
.sidebar-bottom { margin: auto 10px 0; border-top: 1px solid var(--tblr-border-color); padding-top: 22px; font-size: 11px; color: #4c6081; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #16876d; box-shadow: 0 0 0 4px #16876d12; margin-right: 8px; flex-shrink: 0; }
.workspace { min-width: 0; width: calc(100% - 266px); margin-left: 266px; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 14px 24px; color: #586a84; font-size: 12px; gap: 16px; border-radius: 22px; }
#breadcrumb { min-width: 0; overflow-wrap: anywhere; }
.account { display: flex; align-items: center; gap: 10px; color: #233451; flex-shrink: 0; }
.account small { display: block; font-size: 10px; color: #586a84; margin-top: 3px; }
.account .btn { margin-left: 10px; }
.account .avatar { border-radius: 50%; border: 1px solid white; }
.content { padding: 36px 8px 8px; max-width: 1680px; margin: auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 30px; }
.page-heading h1 { font-size: clamp(28px, 2.6vw, 38px); font-weight: 650; letter-spacing: -1.3px; margin-bottom: 8px; }
.page-heading p { margin: 0; font-size: 13px; line-height: 1.7; }
.page-heading .btn { flex-shrink: 0; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 18px; margin-bottom: 24px; }
.summary-card { padding: 24px; display: flex; flex-direction: row; align-items: center; gap: 16px; }
.summary-card .text-secondary { font-size: 12px; }
.summary-card strong { display: block; font-size: 32px; font-weight: 650; line-height: 1.3; letter-spacing: -1px; }
.summary-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; flex-shrink: 0; border: 1px solid #ffffffcc; box-shadow: inset 0 1px 2px #ffffffcc, 0 4px 10px #526e9c0d; }
.summary-icon .icon { width: 24px; height: 24px; }
.summary-note { background: linear-gradient(125deg, #ffffff9e, #e6f9f1a8); }
.summary-note strong { font-size: 13px; letter-spacing: -.1px; margin-bottom: 6px; }
.table-toolbar { padding: 22px 24px; display: flex; align-items: center; gap: 12px; }
.search-field { position: relative; flex: 1; max-width: 360px; min-width: 120px; }
.search-field > .icon { position: absolute; left: 13px; top: 11px; color: #586a84; pointer-events: none; }
.search-field input { padding-left: 42px; }
.table-toolbar select { max-width: 210px; }
.toolbar-hint { margin-left: auto; color: #586a84; font-size: 11px; white-space: nowrap; }
.form-control, .form-select { min-height: 42px; border-radius: 12px; border-color: #7389b04d; background-color: #ffffff80; color: #233451; box-shadow: inset 0 1px 3px #48659305; }
.form-control::placeholder { color: #687994; opacity: 1; }
.form-control:focus, .form-select:focus { background-color: #ffffffe6; border-color: #5c7de0; box-shadow: 0 0 0 3px #3863df1f; }
.form-select option { color: #233451; background: #f5f7fd; }
.form-check-input { border-color: #7389b080; }
.form-check-input:checked { background-color: #3863df; border-color: #3863df; }
.form-hint { font-size: 12px; color: #586a84; line-height: 1.6; }
.table { --tblr-table-bg: transparent; --tblr-table-border-color: var(--tblr-border-color); margin-bottom: 0; }
.table thead th { background: #edf2fc80; color: #586a84; font-size: 10px; font-weight: 650; letter-spacing: .8px; padding-top: 15px; padding-bottom: 15px; }
.table td { padding-top: 19px; padding-bottom: 19px; font-size: 13px; }
.table tbody tr:hover { background: #ffffff70; }
.table td:first-child { font-weight: 600; }
.device-name { display: flex; gap: 12px; align-items: center; min-width: 170px; }
.device-name small { display: block; font-size: 10px; font-weight: 400; color: #586a84; margin-top: 4px; letter-spacing: .5px; }
.device-name .avatar { background: #e7edfcaa; border: 1px solid #fff; border-radius: 12px; box-shadow: inset 0 1px 0 #fff; color: #4d69ac; }
.badge { font-size: 11px; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.description-cell { max-width: 270px; white-space: normal; overflow-wrap: anywhere; color: #586a84; }
.row-actions { display: flex; gap: 5px; justify-content: flex-end; }
.row-actions .btn { font-size: 11px; }
.pagination-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 12px; }
.pagination { gap: 5px; }
.page-link { font-size: 12px; border-radius: 10px !important; background: transparent; min-height: 36px; }
.page-link[aria-current] { color: #2f54c4; background: #ffffffa6; box-shadow: inset 0 1px 0 #fff; }
.empty { padding: 48px 24px; }
#startup { min-height: 100vh; display: grid; place-items: center; }
.empty-icon { color: #627db7; }
.empty-icon .icon { width: 42px; height: 42px; }
.content-footer { display: flex; justify-content: space-between; color: #586a84; font-size: 10px; margin: 26px 4px 10px; gap: 15px; }
.content-footer > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.alert { border-radius: 14px; box-shadow: inset 0 1px 0 #ffffff80; }
.alert-success { background: #e9f8f1e6; color: #166349; border-color: #9ccdbb; }
.alert-danger { background: #fff0f3ed; color: #a5223c; border-color: #e8b2bc; }
dialog { padding: 0; border-radius: 26px; width: min(560px, calc(100vw - 32px)); color: #233451; max-height: 90vh; max-height: 90dvh; background: #f5f7fce8; box-shadow: 0 32px 100px #20376538, inset 0 1px 0 white; }
dialog::backdrop { background: #22345847; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dialog-header, .dialog-footer { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; }
.dialog-header { border-bottom: 1px solid var(--tblr-border-color); }
.dialog-header h2 { font-size: 20px; letter-spacing: -.5px; }
.dialog-body { padding: 26px; }
.dialog-footer { justify-content: flex-end; gap: 10px; border-top: 1px solid var(--tblr-border-color); background: #ffffff40; }
.permissions { display: grid; gap: 10px; }
.storage-toolbar { display: flex; justify-content: space-between; gap: 16px; }
.storage-toolbar p { font-size: 12px; line-height: 1.7; }
.storage-toolbar .btn { flex-shrink: 0; }
.storage-path { display: block; max-width: 340px; white-space: normal; overflow-wrap: anywhere; font-size: 11px; font-weight: 400; color: #586a84; margin-top: 5px; }
.storage-error { max-width: 220px; white-space: normal; font-size: 11px; margin-top: 5px; }
.progress { background: #dce5f3; border-radius: 10px; }
.settings-field { max-width: 540px; }
.nav-tabs .nav-link { color: #586a84; }
.nav-tabs .nav-link.active { color: #2f54c4; background: #ffffff99; border-color: transparent; border-radius: 12px 12px 0 0; }
@media (max-width: 1200px) {
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-note { grid-column: 1 / -1; padding: 18px 24px; }
  .toolbar-hint { display: none; }
  .sidebar { width: 218px; }
  .workspace { margin-left: 242px; width: calc(100% - 242px); }
  .summary-card { padding: 20px; }
}
@media (max-width: 900px) {
  .page-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
  .login-shell { gap: 18px; padding: 18px; }
  .login-intro { padding: 32px; }
  .login-intro h1 { font-size: 40px; }
}
@media (max-width: 760px) {
  .portal { display: block; padding: 12px; }
  .sidebar { position: static; width: 100%; padding: 18px 14px 14px; border-radius: 22px; overflow: visible; }
  .sidebar .brand { margin: 0 4px 20px; font-size: 23px; }
  .sidebar .nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .sidebar .nav-entry { padding: 11px; font-size: 12px; gap: 9px; }
  .nav-label, .sidebar-bottom { display: none; }
  .workspace { margin-left: 0; width: 100%; }
  .topbar { padding: 12px 16px; min-height: 64px; margin-top: 12px; border-radius: 18px; }
  #breadcrumb { display: none; }
  .account { width: 100%; }
  #logout { margin-left: auto; }
  .content { padding: 26px 0 0; }
  .page-heading { gap: 18px; margin-bottom: 22px; padding: 0 4px; }
  .page-heading h1 { font-size: 30px; }
  .summary-grid { gap: 10px; margin-bottom: 18px; }
  .summary-card { padding: 16px 12px; gap: 10px; border-radius: 18px; }
  .summary-icon { width: 34px; height: 38px; border-radius: 12px; }
  .summary-icon .icon { width: 20px; height: 20px; }
  .summary-card .text-secondary { font-size: 10px; }
  .summary-card strong { font-size: 26px; }
  .summary-note { padding: 16px; }
  .summary-note strong { font-size: 12px; }
  .table-toolbar { flex-wrap: wrap; padding: 16px; }
  .search-field { max-width: none; flex-basis: 100%; }
  .table-toolbar select { flex: 1; max-width: none; min-width: 0; }
  .content-footer > span:last-child { display: none; }
  .login-shell { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .login-intro { padding: 26px; gap: 32px; border-radius: 24px; }
  .login-intro h1 { font-size: 38px; letter-spacing: -1.5px; margin: 12px 0; }
  .login-intro p { font-size: 14px; margin-bottom: 0; }
  .intro-footer { display: none; }
  .device-tags { margin-top: 22px; gap: 6px; }
  .device-tags .badge { padding: 7px 12px; font-size: 10px; }
  .login-intro .eyebrow { display: none; }
  .login-form-area { padding: 32px 26px; border-radius: 24px; }
  .pagination-footer { padding: 16px; flex-wrap: wrap; }
  .storage-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .card-header, .card-body, .card-footer { padding: 18px; }
  .dialog-header, .dialog-footer { padding: 20px; }
  .dialog-body { padding: 20px; }
}
/* Opaque surfaces retain legibility when backdrop filtering is unavailable. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass-surface: #f5f7fc; }
  .login-intro { background: #e3eafb; }
  .summary-note { background: #edf8f4; }
  dialog { background: #f5f7fc; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass-surface: #f5f7fc; --glass-blur: none; }
  .login-intro { background: #e3eafb; }
  .summary-note { background: #edf8f4; }
  dialog { background: #f5f7fc; }
  dialog::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; background: #22345899; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
