/* TSK Admin — layout on top of Bootstrap 5.3 (light + dark via data-bs-theme). */
:root {
  --tsk-accent: #1a73e8;
  --tsk-sidebar-bg: #0b1424;
  --tsk-sidebar-fg: #c9d4e5;
  --tsk-sidebar-active: #1a73e8;
  --tsk-sidebar-w: 260px;
}
[data-bs-theme="dark"] { --tsk-sidebar-bg: #070d18; }

body { background: var(--bs-tertiary-bg); }
.tsk-shell { display: flex; min-height: 100vh; }

.tsk-sidebar {
  width: var(--tsk-sidebar-w); background: var(--tsk-sidebar-bg); color: var(--tsk-sidebar-fg);
  flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
@media (max-width: 991.98px) {
  .tsk-sidebar { position: fixed; height: 100%; z-index: 1045; }
}
.tsk-brand { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.tsk-brand img { border-radius: 50%; object-fit: contain; background: #000; }
.tsk-brand small { color: #8fa3c0 !important; }
.tsk-nav { padding: .75rem .5rem 2rem; }
.tsk-nav a, .tsk-nav-btn {
  display: flex; align-items: center; gap: .75rem; padding: .55rem .85rem; margin-bottom: 2px; border-radius: .6rem;
  color: var(--tsk-sidebar-fg); text-decoration: none; font-size: .925rem; width: 100%; border: 0; background: none; text-align: left;
}
.tsk-nav a:hover, .tsk-nav-btn:hover { background: rgba(255,255,255,.07); color: #fff; }
.tsk-nav a.active { background: var(--tsk-sidebar-active); color: #fff; }
.tsk-nav i { font-size: 1.1rem; width: 1.2rem; text-align: center; }

.tsk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tsk-topbar {
  display: flex; align-items: center; gap: .75rem; padding: .85rem 1.5rem; background: var(--bs-body-bg);
  border-bottom: 1px solid var(--bs-border-color); position: sticky; top: 0; z-index: 10;
}
.tsk-content { padding: 1.5rem; }
@media (max-width: 575.98px) { .tsk-content { padding: 1rem; } .tsk-topbar { padding: .75rem 1rem; } }

.card { border: 1px solid var(--bs-border-color-translucent); border-radius: 1rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: transparent; font-weight: 600; border-bottom-color: var(--bs-border-color-translucent); }
.tsk-stat .tsk-stat-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); }
.tsk-stat .tsk-stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.tsk-stat .tsk-stat-icon { font-size: 1.6rem; color: var(--tsk-accent); opacity: .85; }
.tsk-chart { position: relative; width: 100%; }

.table > :not(caption) > * > * { padding: .65rem .75rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--bs-secondary-color); white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.text-truncate-240 { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }

.tsk-login { min-height: 100vh; display: grid; place-items: center; padding: 1rem;
  background: radial-gradient(circle at 50% 0%, rgba(26,115,232,.25), transparent 60%), #050b18; }
.tsk-login .card { width: 100%; max-width: 420px; }

.tsk-thumb { width: 64px; height: 64px; object-fit: contain; border-radius: .75rem; background: repeating-conic-gradient(#e9ecef 0% 25%, #fff 0% 50%) 50% / 16px 16px; border: 1px solid var(--bs-border-color); }
.tsk-thumb-lg { width: 160px; height: 160px; }

/* Branding cropper */
.tsk-cropper { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1; background: repeating-conic-gradient(#dee2e6 0% 25%, #f8f9fa 0% 50%) 50% / 20px 20px; border-radius: .75rem; overflow: hidden; touch-action: none; cursor: grab; }
.tsk-cropper canvas { width: 100%; height: 100%; display: block; }

.tsk-swatch { width: 2.5rem; height: 2.5rem; padding: .2rem; }
.tsk-theme-preview { border-radius: 1rem; overflow: hidden; border: 1px solid var(--bs-border-color); max-width: 280px; }
.tsk-theme-preview .tp-toolbar { padding: .6rem; display: flex; gap: .5rem; align-items: center; }
.tsk-theme-preview .tp-address { flex: 1; height: 1.6rem; border-radius: 1rem; }
.tsk-theme-preview .tp-body { padding: 1rem; min-height: 9rem; }
.tsk-theme-preview .tp-btn { display: inline-block; padding: .35rem .9rem; border-radius: 1rem; font-size: .8rem; }

.progress { height: .9rem; }
.badge-soft-success { background: rgba(25,135,84,.15); color: #198754; }
.badge-soft-danger { background: rgba(220,53,69,.15); color: #dc3545; }
.badge-soft-warning { background: rgba(255,193,7,.2); color: #997404; }
.badge-soft-secondary { background: rgba(108,117,125,.15); color: var(--bs-secondary-color); }
.badge-soft-primary { background: rgba(13,110,253,.15); color: var(--bs-primary); }
.tsk-scroll-320 { max-height: 320px; overflow-y: auto; }
[data-bs-theme="dark"] .badge-soft-warning { color: #ffda6a; }
