:root {
  --wt-primary: #4f46e5;
  --wt-primary-dark: #4338ca;
  --wt-bg: #f1f5f9;
  --wt-sidebar-bg: #0f172a;
  --wt-sidebar-width: 248px;
}

body {
  background: var(--wt-bg);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.wt-layout {
  display: flex;
  min-height: 100vh;
}

.wt-sidebar {
  width: var(--wt-sidebar-width);
  background: var(--wt-sidebar-bg);
  color: #cbd5e1;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 1040;
}

.wt-brand {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.wt-brand a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.wt-brand .dot {
  color: #22c55e;
}

.wt-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem 0.75rem;
}

.wt-nav .nav-section {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 0.9rem 0.75rem 0.35rem;
}

.wt-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #94a3b8;
  text-decoration: none;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}

.wt-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.wt-nav a.active {
  background: var(--wt-primary);
  color: #fff;
}

.wt-nav a .icon {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.wt-main {
  flex: 1;
  margin-left: var(--wt-sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wt-topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.85rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.wt-content {
  padding: 1.5rem;
  flex: 1;
}

@media (min-width: 992px) {
  .wt-content {
    padding: 1.75rem 2rem 2rem;
  }
}

.wt-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.wt-card .wt-card-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid #eef2f7;
  font-weight: 600;
  color: #1e293b;
}

.wt-card .wt-card-body {
  padding: 1.5rem;
}

.wt-stat {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wt-stat .wt-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.wt-stat .wt-stat-label {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.15rem;
}

.wt-stat .wt-stat-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-online { background: #22c55e; }
.status-idle { background: #f59e0b; }
.status-away { background: #f97316; }
.status-locked { background: #ef4444; }
.status-offline { background: #94a3b8; }
.status-on_break { background: #3b82f6; }

.favicon {
  border-radius: 3px;
  vertical-align: -2px;
}

.wt-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom-width: 1px;
  white-space: nowrap;
  padding: 0.9rem 1.5rem;
}

.wt-table td {
  font-size: 0.88rem;
  vertical-align: middle;
  padding: 0.9rem 1.5rem;
}

.wt-card .list-group-item {
  padding: 0.9rem 1.5rem;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--wt-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 0.75rem;
}

.min-w-0 { min-width: 0; }

.text-muted-sm { font-size: 0.8rem; color: #94a3b8; }

.wt-avatar-menu .dropdown-toggle::after {
  display: none;
}

.wt-avatar-menu .avatar {
  cursor: pointer;
}

.wt-progress { height: 6px; background: #eef2f7; border-radius: 99px; overflow: hidden; }
.wt-progress .wt-progress-bar { border-radius: 99px; }

.auth-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: #f1f5f9;
}

.auth-shell {
  width: 100%;
  max-width: 900px;
  background: #fff;
  border-radius: 1.1rem;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  display: flex;
  min-height: 560px;
}

.auth-side {
  flex: 1 1 44%;
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 60%, #6d28d9 100%);
  color: #fff;
  padding: 2.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-side .auth-side-title {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.auth-side .auth-side-lead {
  color: #c7d2fe;
  font-size: 0.92rem;
  margin-top: 0.6rem;
}

.auth-perks {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

.auth-perk {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: #e0e7ff;
}

.auth-perk i {
  color: #22c55e;
  margin-top: 0.15rem;
}

.auth-form-side {
  flex: 1 1 56%;
  padding: 2.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-logo {
  margin-bottom: 1.5rem;
}

.auth-logo a {
  color: #0f172a;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.3rem;
}

@media (max-width: 820px) {
  .auth-side { display: none; }
  .auth-shell { max-width: 440px; }
  .auth-form-side { padding: 2.25rem 2rem; }
}

@media (max-width: 768px) {
  .wt-sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .wt-sidebar.open { transform: translateX(0); }
  .wt-main { margin-left: 0; }
}

/* ---------------------------------------------------------------------------
   Design tokens
--------------------------------------------------------------------------- */
:root {
  --wt-primary: #4f46e5;
  --wt-primary-dark: #4338ca;
  --wt-primary-soft: #eef2ff;

  --wt-green: #16a34a;
  --wt-green-soft: #ecfdf5;
  --wt-blue: #2563eb;
  --wt-blue-soft: #eff6ff;
  --wt-amber: #d97706;
  --wt-amber-soft: #fef3c7;
  --wt-red: #dc2626;
  --wt-red-soft: #fef2f2;
  --wt-purple: #7c3aed;
  --wt-purple-soft: #f5f3ff;

  --wt-bg: #f6f7fb;
  --wt-surface: #ffffff;
  --wt-border: #e6e8ef;
  --wt-border-soft: #eef1f6;

  --wt-text: #0f172a;
  --wt-text-body: #334155;
  --wt-muted: #64748b;
  --wt-faint: #94a3b8;

  --wt-radius: 14px;
  --wt-radius-sm: 10px;
  --wt-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.04);
}

body {
  background: var(--wt-bg);
  color: var(--wt-text-body);
}

.wt-card {
  border-color: var(--wt-border);
  border-radius: var(--wt-radius);
  box-shadow: var(--wt-shadow);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.wt-card .wt-card-header {
  padding: 1.05rem 1.35rem;
  color: var(--wt-text);
  font-weight: 600;
}

.wt-card .wt-card-body {
  padding: 1.35rem;
}

/* ---------------------------------------------------------------------------
   Stat cards
--------------------------------------------------------------------------- */
.wt-stat-card {
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--wt-radius);
  box-shadow: var(--wt-shadow);
  padding: 1.15rem 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wt-stat-card:hover {
  border-color: #d4d8e3;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06), 0 6px 16px rgba(15, 23, 42, 0.06);
}

.wt-stat-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.wt-stat-card-icon.icon-indigo { background: var(--wt-primary-soft); color: var(--wt-primary); }
.wt-stat-card-icon.icon-green  { background: var(--wt-green-soft); color: var(--wt-green); }
.wt-stat-card-icon.icon-blue   { background: var(--wt-blue-soft); color: var(--wt-blue); }
.wt-stat-card-icon.icon-amber  { background: var(--wt-amber-soft); color: var(--wt-amber); }
.wt-stat-card-icon.icon-red    { background: var(--wt-red-soft); color: var(--wt-red); }
.wt-stat-card-icon.icon-purple { background: var(--wt-purple-soft); color: var(--wt-purple); }

.wt-stat-card-label {
  font-size: 0.78rem;
  color: var(--wt-muted);
  margin-bottom: 0.15rem;
  white-space: nowrap;
}

.wt-stat-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wt-text);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.wt-stat-card-sub {
  font-size: 0.76rem;
  color: var(--wt-faint);
  margin-top: 0.2rem;
}

/* ---------------------------------------------------------------------------
   Buttons
--------------------------------------------------------------------------- */
.btn-wt {
  background: var(--wt-primary);
  color: #fff;
  border: 1px solid var(--wt-primary);
  font-weight: 600;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-wt:hover,
.btn-wt:focus {
  background: var(--wt-primary-dark);
  border-color: var(--wt-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
}

.btn-wt-ghost {
  background: #fff;
  color: var(--wt-text-body);
  border: 1px solid var(--wt-border);
  font-weight: 500;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-wt-ghost:hover {
  background: var(--wt-bg);
  color: var(--wt-text);
  border-color: #d4d8e3;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

/* ---------------------------------------------------------------------------
   Dashboard productivity / legend
--------------------------------------------------------------------------- */
.wt-legend-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.86rem;
}

.wt-legend-label { color: var(--wt-text-body); }

.wt-legend-value {
  margin-left: auto;
  font-weight: 600;
  color: var(--wt-text);
}

.wt-legend-pct {
  width: 3.2rem;
  text-align: right;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--wt-muted);
}

.wt-blocked-strip {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--wt-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
}

/* ---------------------------------------------------------------------------
   Page headers inside content
--------------------------------------------------------------------------- */
.wt-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.wt-page-head h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--wt-text);
  margin: 0;
  letter-spacing: -0.01em;
}

.wt-page-head .wt-page-head-sub {
  font-size: 0.84rem;
  color: var(--wt-muted);
  margin-top: 0.2rem;
}

/* ---------------------------------------------------------------------------
   Topbar
--------------------------------------------------------------------------- */
.wt-topbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom-color: var(--wt-border);
}

.wt-topbar-title {
  font-weight: 600;
  color: var(--wt-text);
}

.wt-topbar .wt-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--wt-muted);
}

/* ---------------------------------------------------------------------------
   Empty states
--------------------------------------------------------------------------- */
.wt-empty {
  text-align: center;
  color: var(--wt-muted);
  padding: 3rem 1rem;
}

.wt-empty i {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.6rem;
  color: var(--wt-faint);
}

.wt-empty .wt-empty-title {
  font-weight: 600;
  color: var(--wt-text-body);
  margin-bottom: 0.15rem;
}

.wt-empty .wt-empty-sub {
  font-size: 0.84rem;
  color: var(--wt-faint);
}

/* ---------------------------------------------------------------------------
   Pagination
--------------------------------------------------------------------------- */
.wt-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.35rem;
  border-top: 1px solid var(--wt-border-soft);
}

.wt-pagination-info {
  font-size: 0.82rem;
  color: var(--wt-muted);
}

.wt-pagination-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wt-page-btn {
  min-width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.55rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--wt-text-body);
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.wt-page-btn:hover:not(.disabled):not(.active) {
  background: var(--wt-bg);
  color: var(--wt-text);
  border-color: #d4d8e3;
}

.wt-page-btn.active {
  background: var(--wt-primary);
  border-color: var(--wt-primary);
  color: #fff;
  cursor: default;
}

.wt-page-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.wt-page-ellipsis {
  padding: 0 0.25rem;
  color: var(--wt-faint);
}

.wt-pagination-nav li {
  margin: 0;
}
