﻿/* РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’
   Modem AVR Dashboard РІР‚вЂќ Premium Dark UI
   РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ */

/* РІвЂќР‚РІвЂќР‚ Reset & Base РІвЂќР‚РІвЂќР‚ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0d1117;
  --bg2:        #161b22;
  --bg3:        #1c2230;
  --border:     rgba(255,255,255,0.07);
  --border-md:  rgba(255,255,255,0.12);
  --text:       #e6edf3;
  --text-muted: #7d8590;
  --text-dim:   #4d5562;

  --blue:       #3b82f6;
  --blue-glow:  rgba(59,130,246,0.18);
  --amber:      #f59e0b;
  --amber-glow: rgba(245,158,11,0.18);
  --green:      #22c55e;
  --green-glow: rgba(34,197,94,0.18);
  --purple:     #a855f7;
  --purple-glow:rgba(168,85,247,0.18);
  --red:        #ef4444;
  --red-glow:   rgba(239, 68, 68, 0.18);


  --sidebar-w:  260px;
  --topbar-h:   64px;
  --radius:     14px;
  --radius-sm:  10px;
  --radius-xs:  8px;

  --bg-card:    #161b22;
  --bg-secondary: #0d1117;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);

  --transition: 0.2s ease;
}

body.light-theme {
  --bg:         #f8fafc;
  --bg2:        #ffffff;
  --bg3:        #f1f5f9;
  --border:     rgba(15, 23, 42, 0.08);
  --border-md:  rgba(15, 23, 42, 0.15);
  --text:       #0f172a;
  --text-muted: #475569;
  --text-dim:   #94a3b8;

  --blue-glow:  rgba(59, 130, 246, 0.12);
  --amber-glow: rgba(245, 158, 11, 0.15);
  --green-glow: rgba(34, 197, 94, 0.12);
  --purple-glow:rgba(168, 85, 247, 0.12);
  --red-glow:   rgba(239, 68, 68, 0.12);

  --bg-card:    #ffffff;
  --bg-secondary: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #475569;

  --shadow:     0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-sm:  0 2px 8px rgba(15, 23, 42, 0.04);
}

body.light-theme .sidebar-user { background: var(--bg3); }
body.light-theme .filter-tab:hover { background: rgba(15, 23, 42, 0.04); }
body.light-theme .data-table tbody tr:hover { background: rgba(15, 23, 42, 0.015); }
body.light-theme .status-opt:hover { background: rgba(15, 23, 42, 0.05); }

html { font-size: 15px; }

body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* РІвЂќР‚РІвЂќР‚ Scrollbar РІвЂќР‚РІвЂќР‚ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ SIDEBAR РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform var(--transition);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(99,102,241,0.4);
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.brand-name b { color: var(--blue); }
.brand-sub { font-size: 0.72rem; color: var(--text-muted); }
.brand-text { display: flex; flex-direction: column; gap: 1px; }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  padding: 6px 8px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}
.nav-item i { width: 18px; text-align: center; font-size: 0.95rem; }
.nav-item span:first-of-type { flex: 1; }

.nav-item:hover:not(.disabled) {
  background: rgba(59,130,246,0.08);
  color: var(--text);
}
.nav-item.active {
  background: rgba(59,130,246,0.15);
  color: var(--blue);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 25%; bottom: 25%;
  width: 3px;
  background: var(--blue);
  border-radius: 99px;
}
.nav-item.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.nav-badge {
  font-size: 0.62rem;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 99px;
  border: 1px solid var(--border);
}

/* --- Collapsible Submenu --- */
.nav-dropdown {
  display: flex;
  flex-direction: column;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: transparent;
  border: none;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all var(--transition);
  position: relative;
}

.nav-dropdown-toggle:hover {
  background: rgba(59,130,246,0.08);
  color: var(--text);
}

.nav-dropdown-toggle i:first-of-type {
  width: 18px;
  text-align: center;
  font-size: 0.95rem;
}

.nav-dropdown-toggle span {
  flex: 1;
}

.dropdown-chevron {
  font-size: 0.72rem;
  transition: transform var(--transition);
  opacity: 0.7;
}

.nav-dropdown.open .dropdown-chevron {
  transform: rotate(90deg);
}

.nav-dropdown-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-menu .nav-item {
  padding-left: 28px;
  font-size: 0.84rem;
}

.nav-dropdown-toggle.active-parent {
  color: var(--text);
  font-weight: 600;
}

/* --- In Development Badge --- */
.badge-dev {
  font-size: 0.62rem;
  font-weight: 600;
  background: rgba(168, 85, 247, 0.08);
  color: var(--purple);
  border: 1px solid rgba(168, 85, 247, 0.25);
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
  margin-left: auto;
}

.dev-item {
  opacity: 0.6;
  cursor: not-allowed !important;
}

.dev-item:hover {
  background: transparent !important;
  color: var(--text-muted) !important;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
}

.sidebar-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.sidebar-actions .btn-icon {
  flex: 1;
  height: 38px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
}

.sidebar-actions .btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
}

body.light-theme .sidebar-actions .btn-icon {
  background: var(--bg3);
}
body.light-theme .sidebar-actions .btn-icon:hover {
  background: rgba(15, 23, 42, 0.08);
}

/* Visibility rules for Telegram Web App mode vs standard Browser */
body.in-telegram .topbar-right .btn-theme-toggle,
body.in-telegram .topbar-right .btn-refresh {
  display: none !important;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
}

.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.user-name { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.user-role { font-size: 0.68rem; color: var(--text-muted); }
.user-meta { display: flex; flex-direction: column; gap: 1px; }

/* Mobile overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 190;
  backdrop-filter: blur(2px);
}
.mobile-overlay.active { display: block; }

/* РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ MAIN РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* РІвЂќР‚РІвЂќР‚ Topbar РІвЂќР‚РІвЂќР‚ */
.topbar {
  height: var(--topbar-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
}

.topbar-burger {
  display: none;
  background: none; border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-xs);
  transition: color var(--transition);
}
.topbar-burger:hover { color: var(--text); }

.topbar-title { flex: 1; min-width: 0; padding-right: 12px; }
.topbar-title h1 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-title p {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.date-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: 99px;
}
.date-chip i { font-size: 0.75rem; }

.btn-pc-browser {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--blue);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.btn-pc-browser:hover {
  background: var(--blue-glow);
  border-color: var(--blue);
  transform: translateY(-1px);
}
.btn-pc-browser i {
  font-size: 0.75rem;
}

.btn-icon {
  width: 34px; height: 34px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  display: grid; place-items: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.85rem;
}
.btn-icon:hover { color: var(--text); border-color: var(--border-md); }
.btn-icon.spinning i { animation: spin 0.8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* РІвЂќР‚РІвЂќР‚ Page РІвЂќР‚РІвЂќР‚ */
.page { display: none; flex-direction: column; gap: 20px; padding: 24px; flex: 1; }
.page.active { display: flex; }

/* РІвЂќР‚РІвЂќР‚ AppLoader Animations РІвЂќР‚РІвЂќР‚ */
@keyframes pulse-loader {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.1); opacity: 1; }
}
@keyframes fill-bar {
  0% { left: -100%; }
  50% { left: 0%; }
  100% { left: 100%; }
}

/* РІвЂќР‚РІвЂќР‚ Beautiful Access Denied & Pending Screens РІвЂќР‚РІвЂќР‚ */
.access-denied-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  background: #0d1117;
  color: #e6edf3;
  font-family: 'Inter', sans-serif;
  text-align: center;
  padding: 30px;
  box-sizing: border-box;
}
.access-denied-card {
  max-width: 440px;
  background: rgba(22, 27, 34, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 40px 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.access-denied-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  margin-bottom: 8px;
}
.access-denied-icon-wrap.pending {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}
.access-denied-icon-wrap.blocked {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.15);
}
.access-denied-icon-wrap.unauthorized {
  background: rgba(36, 161, 222, 0.1);
  color: #24A1DE;
  border: 1px solid rgba(36, 161, 222, 0.2);
  box-shadow: 0 8px 24px rgba(36, 161, 222, 0.15);
}
.access-denied-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #e6edf3;
  margin: 0;
  letter-spacing: -0.5px;
}
.access-denied-desc {
  font-size: 0.9rem;
  color: #7d8590;
  line-height: 1.6;
  margin: 0;
}
.btn-tg-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 24px;
  background: #24A1DE;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(36, 161, 222, 0.3);
}
.btn-tg-chat:hover {
  background: #1e87bb;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(36, 161, 222, 0.4);
}

/* РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ STATS РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.stat-card:hover {
  border-color: var(--border-md);
  transform: translateY(-1px);
}

.stat-icon-wrap {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.color-blue   { background: var(--blue-glow);   color: var(--blue); }
.color-amber  { background: var(--amber-glow);  color: var(--amber); }
.color-green  { background: var(--green-glow);  color: var(--green); }
.color-purple { background: var(--purple-glow); color: var(--purple); }

.stat-body { flex: 1; min-width: 0; }
.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -1px;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-trend {
  font-size: 1.5rem;
  color: var(--border);
  flex-shrink: 0;
}

/* РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ CONTROLS РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ */
.controls-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}
.search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.82rem;
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 36px 9px 36px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--blue); }
.search-input::placeholder { color: var(--text-dim); }
.search-clear {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px;
  transition: color var(--transition);
}
.search-clear:hover { color: var(--text); }

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.filter-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  background: none;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.filter-tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.filter-tab.active {
  background: rgba(59,130,246,0.15);
  color: var(--blue);
  font-weight: 600;
}

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot-blue   { background: var(--blue); }
.dot-amber  { background: var(--amber); }
.dot-green  { background: var(--green); }

/* РІвЂќР‚РІвЂќР‚ Buttons РІвЂќР‚РІвЂќР‚ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(59,130,246,0.35); }
.btn-primary:active { transform: translateY(0); }

.btn-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  background: transparent;
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.35);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-export:hover {
  background: var(--green-glow);
  border-color: var(--green);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(34,197,94,0.2);
}
.btn-export:active { transform: translateY(0); }
.btn-export.loading i { animation: spin 0.9s linear infinite; }

.btn-export.pdf {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.35);
}
.btn-export.pdf:hover {
  background: var(--red-glow);
  border-color: var(--red);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}

.btn-report-all,
.btn-report-problem {
  min-height: 40px;
  border-radius: 12px;
  letter-spacing: -0.01em;
}

.btn-report-all {
  color: var(--blue);
  border-color: rgba(59, 130, 246, 0.34);
  background: linear-gradient(135deg, rgba(59,130,246,0.11), rgba(14,165,233,0.04));
}

.btn-report-all:hover {
  background: rgba(59,130,246,0.16);
  border-color: var(--blue);
  box-shadow: 0 4px 14px rgba(59,130,246,0.18);
}

.btn-report-problem {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.38);
  background: linear-gradient(135deg, rgba(245,158,11,0.13), rgba(239,68,68,0.04));
}

.btn-report-problem:hover {
  background: rgba(245,158,11,0.18);
  border-color: #f59e0b;
  box-shadow: 0 4px 14px rgba(245,158,11,0.18);
}

.accident-card .card-actions {
  align-items: stretch !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) 42px !important;
}

.accident-card .card-actions button {
  justify-content: center !important;
  margin-left: 0 !important;
  min-height: 38px !important;
}

.accident-card .btn-archive-draft,
.accident-card .btn-compile-draft {
  grid-column: span 2;
}

.btn-delete-draft,
.btn-delete-archive {
  min-width: 38px !important;
}

@media (max-width: 560px) {
  .accident-card .card-actions {
    grid-template-columns: 1fr !important;
  }

  .accident-card .btn-archive-draft,
  .accident-card .btn-compile-draft {
    grid-column: auto;
  }
}


.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-ghost:hover { border-color: var(--border-md); color: var(--text); }

.actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.actions-group .btn-icon {
  width: 38px;
  height: 38px;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

.actions-group .btn-icon:hover {
  background: var(--bg3);
}

/* РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ TABLE РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ */
.table-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 370px);
  min-height: 280px;
  /* Р вЂќР С•Р В·Р Р†Р С•Р В»РЎРЏРЎвЂќР СР С• Р Т‘РЎР‚Р С•Р С—Р Т‘Р В°РЎС“Р Р…РЎС“ РЎРѓРЎвЂљР В°РЎвЂљРЎС“РЎРѓРЎС“ Р Р†Р С‘РЎвЂ¦Р С•Р Т‘Р С‘РЎвЂљР С‘ Р В·Р В° Р СР ВµР В¶РЎвЂ“ Р С•Р В±Р С–Р С•РЎР‚РЎвЂљР С”Р С‘ */
  position: relative;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table thead {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg3);
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

.data-table tbody tr {
  transition: background var(--transition);
}
.data-table tbody tr:hover { background: rgba(255,255,255,0.025); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* Column widths */
.col-num     { width: 72px; }
.col-num-header-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-toggle-all-sub-items {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-xs);
  background: rgba(59, 130, 246, 0.1);
  color: var(--blue);
  cursor: pointer;
  font-size: 0.68rem;
  transition: all var(--transition);
  padding: 0;
}
.btn-toggle-all-sub-items:hover {
  background: var(--blue-glow);
  border-color: var(--blue);
}
.col-location{ width: 200px; }
.col-direction{ width: 200px; }
.col-fibers  { width: 70px; }
.col-date    { width: 110px; }
.col-desc    { min-width: 260px; }
.col-status  { width: 180px; }
.col-detail  { width: 120px; }
.text-center { text-align: center !important; }
.cell-date   { font-weight: 600; color: var(--text); font-size: 0.82rem; }

.cell-num {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
}

.cell-num-with-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 42px;
}

.btn-toggle-sub-items-row {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-xs);
  background: rgba(59, 130, 246, 0.1);
  color: var(--blue);
  cursor: pointer;
  font-size: 0.68rem;
  transition: all var(--transition);
}

.btn-toggle-sub-items-row:hover {
  background: var(--blue-glow);
  border-color: var(--blue);
}

.cell-town {
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}
.cell-fibers {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(59,130,246,0.1);
  color: var(--blue);
  border: 1px solid rgba(59,130,246,0.2);
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
}

.cell-desc {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 420px;
}

/* РІвЂќР‚РІвЂќР‚ Status Select РІвЂќР‚РІвЂќР‚ */
.status-select-wrap {
  position: relative;
  display: inline-block;
}

.status-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 10px;
  border-radius: 99px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition);
  min-width: 148px;
  justify-content: space-between;
}
.status-select-btn i.chevron { font-size: 0.65rem; opacity: 0.7; transition: transform var(--transition); }
.status-select-btn.open i.chevron { transform: rotate(180deg); }

.status-select-btn.s-in_progress {
  background: var(--blue-glow);
  color: var(--blue);
  border-color: rgba(59,130,246,0.25);
}
.status-select-btn.s-needs_clarification {
  background: var(--amber-glow);
  color: var(--amber);
  border-color: rgba(245,158,11,0.25);
}
.status-select-btn.s-completed {
  background: var(--green-glow);
  color: var(--green);
  border-color: rgba(34,197,94,0.25);
}

.status-select-btn:hover { filter: brightness(1.15); }

.status-dropdown {
  position: fixed;
  min-width: 180px;
  background: var(--bg3);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.15s ease;
}
.status-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.status-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 500;
  transition: background var(--transition);
  color: var(--text);
}
.status-opt:hover { background: rgba(255,255,255,0.05); }
.status-opt .opt-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.opt-blue   { background: var(--blue); }
.opt-amber  { background: var(--amber); }
.opt-green  { background: var(--green); }

/* Loading / Empty states */
.loading-row td { padding: 48px 16px; }
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.empty-row td { padding: 60px 16px; text-align: center; }
.empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}
.empty-box i { font-size: 2rem; opacity: 0.3; }
.empty-box p { font-size: 0.88rem; }

/* Table footer */
.table-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg3);
}

/* РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ MODAL РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border-md);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal-backdrop.open .modal-box { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title-wrap { display: flex; align-items: center; gap: 10px; }
.modal-icon { color: var(--blue); font-size: 1.1rem; }
.modal-title { font-size: 1rem; font-weight: 700; }

.modal-close {
  width: 32px; height: 32px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.modal-close:hover { color: var(--text); border-color: var(--border-md); }

.modal-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  flex: 1;
}

.form-row-2 { display: grid; grid-template-columns: 1fr 100px; gap: 12px; }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.req { color: var(--blue); }

.form-field input:not([type="checkbox"]):not([type="radio"]),
.form-field select,
.form-field textarea {
  width: 100%;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-xs);
  padding: 9px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--blue); }
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-dim); }

/* Status radio group */
.status-radio-group { display: flex; gap: 8px; flex-wrap: wrap; }

.status-radio { cursor: pointer; }
.status-radio input[type="radio"] { display: none; }

.radio-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}
.chip-blue   { background: var(--blue-glow);  color: var(--blue);  border-color: rgba(59,130,246,0.2); }
.chip-amber  { background: var(--amber-glow); color: var(--amber); border-color: rgba(245,158,11,0.2); }
.chip-green  { background: var(--green-glow); color: var(--green); border-color: rgba(34,197,94,0.2); }

.status-radio input[type="radio"]:checked + .radio-chip.chip-blue   { border-color: var(--blue);  box-shadow: 0 0 0 3px var(--blue-glow); }
.status-radio input[type="radio"]:checked + .radio-chip.chip-amber  { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-glow); }
.status-radio input[type="radio"]:checked + .radio-chip.chip-green  { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-glow); }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

/* Checkbox Labels & Inputs formatting */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-muted);
  transition: color var(--transition);
  user-select: none;
  word-break: break-word;
}
.checkbox-label:hover {
  color: var(--text);
}
.checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--blue);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ TOAST РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  z-index: 9000;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text);
  box-shadow: var(--shadow);
  min-width: 240px;
  max-width: 340px;
  animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.toast.leaving { animation: toastOut 0.3s ease forwards; }
.toast i { font-size: 1rem; flex-shrink: 0; }
.toast.toast-success { border-left: 3px solid var(--green); }
.toast.toast-success i { color: var(--green); }
.toast.toast-error   { border-left: 3px solid var(--red); }
.toast.toast-error   i { color: var(--red); }
.toast.toast-info    { border-left: 3px solid var(--blue); }
.toast.toast-info    i { color: var(--blue); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(20px); }
}

/* РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ RESPONSIVE РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ */
@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
  }
  .sidebar.open { transform: translateX(0); }

  .main { margin-left: 0; }
  .topbar-burger { display: flex; }

  .page { padding: 16px; gap: 14px; }

  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .controls-bar { gap: 8px; }
  .filter-tabs { width: 100%; overflow-x: auto; }

  .stat-value { font-size: 1.5rem; }
  .table-wrap { max-height: calc(100vh - 420px); min-height: 240px; }

  .modal-box { margin: 0 8px; }
}

/* РІвЂќР‚РІвЂќР‚ Mobile: bottom-sheet modals РІвЂќР‚РІвЂќР‚ */
@media (max-width: 600px) {
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal-box {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    transform: translateY(100%);
  }
  .modal-backdrop.open .modal-box {
    transform: translateY(0);
  }
  .modal-header {
    padding: 16px 16px 12px;
  }
  .modal-body {
    padding: 16px 16px 20px;
  }
  .modal-actions {
    padding: 12px 16px 24px; /* extra bottom for home bar */
  }
  #knowledge-contact-details-modal .modal-header {
    align-items: flex-start;
  }
  
  /* Center the order modal on mobile to prevent bottom-sheet alignment */
  #order-modal.modal-backdrop {
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
  }
  #order-modal .modal-box {
    border-radius: 20px !important;
    width: 100% !important;
    max-width: 440px !important;
    margin: 16px !important;
    transform: scale(0.9) !important;
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1) !important;
  }
  #order-modal.open .modal-box {
    transform: scale(1) !important;
  }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar-title h1 { font-size: 0.88rem; }
  .date-chip { display: none; }
  .page { padding: 12px; }
  .search-wrap {
    min-width: 0;
    width: 100%;
    flex-basis: 100%;
  }
  .search-input {
    font-size: 0.82rem;
  }
  .filter-tabs {
    width: 100%;
    min-width: 0;
  }
  .filter-tab {
    flex: 1 0 auto;
    justify-content: center;
    padding: 6px 10px;
  }
  .actions-group {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .actions-group .btn-icon {
    flex-shrink: 0;
  }
  .actions-group .btn-ghost,
  .actions-group .btn-export,
  .actions-group .btn-primary {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding: 9px 8px;
    font-size: 0.8rem;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }
}

/* РІвЂќР‚РІвЂќР‚ Static badge & Delete action styles РІвЂќР‚РІвЂќР‚ */
.status-select-btn.static-badge {
  cursor: default !important;
  justify-content: center !important;
  pointer-events: none;
}
.status-select-btn.static-badge:hover {
  filter: none !important;
}

.col-actions {
  width: 136px;
  min-width: 136px;
  white-space: nowrap;
}

.data-table td.col-actions {
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
  vertical-align: middle;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.btn-edit-row,
.btn-edit-visit-row {
  background: none;
  border: none;
  color: var(--blue);
  cursor: pointer;
  font-size: 1rem;
  padding: 6px;
  border-radius: var(--radius-xs);
  transition: all var(--transition);
  display: inline-grid;
  place-items: center;
}
.btn-edit-row:hover,
.btn-edit-visit-row:hover {
  background: rgba(59, 130, 246, 0.15);
  transform: scale(1.1);
}
.btn-edit-row:active,
.btn-edit-visit-row:active {
  transform: scale(0.95);
}

.btn-move-up-sub-area,
.btn-move-down-sub-area {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 5px;
  border-radius: var(--radius-xs);
  transition: all var(--transition);
  display: inline-grid;
  place-items: center;
}
.btn-move-up-sub-area:hover,
.btn-move-down-sub-area:hover {
  color: var(--blue);
  background: rgba(59, 130, 246, 0.15);
  transform: scale(1.1);
}
.btn-move-up-sub-area:active,
.btn-move-down-sub-area:active {
  transform: scale(0.95);
}
.btn-move-up-sub-area:disabled,
.btn-move-down-sub-area:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-delete-row,
.btn-delete-visit-row {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 1rem;
  padding: 6px;
  border-radius: var(--radius-xs);
  transition: all var(--transition);
  display: inline-grid;
  place-items: center;
}
.btn-delete-row:hover,
.btn-delete-visit-row:hover {
  background: rgba(239, 68, 68, 0.15);
  transform: scale(1.1);
}
.btn-delete-row:active,
.btn-delete-visit-row:active {
  transform: scale(0.95);
}

.btn-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  width: 100%;
}
.btn-detail:hover {
  background: var(--border-md);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}
.btn-detail:active {
  transform: translateY(0);
}
.btn-detail i {
  font-size: 0.85rem;
}
.btn-detail.empty {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dim);
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* РІвЂќР‚РІвЂќР‚ Print Styles (Ink saver & Clean table layout) РІвЂќР‚РІвЂќР‚ */
@media print {
  .sidebar,
  .topbar,
  .stats-row,
  .controls-bar,
  .table-footer,
  .toast-container,
  .modal-backdrop,
  .col-detail,
  .col-actions {
    display: none !important;
  }
  .main {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .table-section {
    border: none !important;
  }
  .data-table {
    font-size: 10pt !important;
  }
  .data-table th {
    background: #f1f5f9 !important;
    color: #000 !important;
    border-bottom: 2px solid #cbd5e1 !important;
  }
  .data-table td {
    border-bottom: 1px solid #cbd5e1 !important;
    color: #000 !important;
  }
}

/* РІвЂќР‚РІвЂќР‚ Telegram WebApp Shifts to avoid overlapping native header buttons РІвЂќР‚РІвЂќР‚ */
body.in-telegram .topbar {
  padding-right: 96px;
}

@media (max-width: 480px) {
  body.in-telegram .topbar {
    padding-right: 86px;
  }
}

/* РІвЂќР‚РІвЂќР‚ Delivery Radio Options РІвЂќР‚РІвЂќР‚ */
.delivery-radio input[type="radio"]:checked + .delivery-chip {
  background: var(--blue-glow) !important;
  border-color: var(--blue) !important;
  color: var(--blue) !important;
  box-shadow: 0 0 0 2px var(--blue-glow);
}

/* РІвЂќР‚РІвЂќР‚ Select & Form elements РІвЂќР‚РІвЂќР‚ */
.select-editable-wrap {
  width: 100%;
}
.select-editable-wrap select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.select-editable-wrap select:focus {
  border-color: var(--blue);
}

/* РІвЂќР‚РІвЂќР‚ Secondary Button РІвЂќР‚РІвЂќР‚ */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-secondary:hover {
  background: var(--border-md);
  border-color: var(--border-md);
  color: var(--text);
}

/* РІвЂќР‚РІвЂќР‚ Custom Select Dropdown РІвЂќР‚РІвЂќР‚ */
.custom-select-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.custom-select-element {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 250px;
  min-width: 180px;
  padding: 8px 36px 8px 12px !important;
  border-radius: var(--radius-sm);
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  transition: all var(--transition);
}
.custom-select-element:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-glow);
}
.custom-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.75rem;
  pointer-events: none;
  transition: color var(--transition);
}
.custom-select-container:hover .custom-select-arrow {
  color: var(--text);
}

/* РІвЂќР‚РІвЂќР‚ Custom User Dropdown (Coords page) РІвЂќР‚РІвЂќР‚ */
.cu-dropdown {
  position: relative;
}
.cu-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  min-width: 190px;
  max-width: 260px;
}
.cu-dropdown-btn:hover {
  border-color: var(--blue);
  background: var(--bg3, var(--bg2));
}
.cu-dropdown-btn[aria-expanded="true"] {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-glow);
}
.cu-dropdown-avatar {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}
.cu-dropdown-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.cu-dropdown-chevron {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.cu-dropdown-btn[aria-expanded="true"] .cu-dropdown-chevron {
  transform: rotate(180deg);
}
.cu-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 9999;
  background: var(--bg2);
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  min-width: 240px;
  max-width: 320px;
  overflow: hidden;
  animation: cu-panel-in 0.15s ease;
}
.cu-dropdown-panel.open {
  display: block;
}
@keyframes cu-panel-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cu-dropdown-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3, var(--bg2));
}
.cu-dropdown-search-wrap .fa-magnifying-glass {
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
}
.cu-dropdown-search {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
}
.cu-dropdown-search::placeholder {
  color: var(--text-muted);
}
.cu-dropdown-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
}
.cu-dropdown-list::-webkit-scrollbar { width: 4px; }
.cu-dropdown-list::-webkit-scrollbar-track { background: transparent; }
.cu-dropdown-list::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 4px; }
.cu-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  color: var(--text);
  font-size: 0.87rem;
  font-family: inherit;
}
.cu-dropdown-item:hover {
  background: var(--bg3, rgba(255,255,255,0.05));
}
.cu-dropdown-item.active {
  background: color-mix(in srgb, var(--blue) 18%, transparent);
  color: var(--blue);
  font-weight: 600;
}
.cu-dropdown-item-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, #5e60ce 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0;
}
.cu-dropdown-item-avatar.own {
  background: linear-gradient(135deg, #2dd36f 0%, #0ea5e9 100%);
}
.cu-dropdown-item-info {
  flex: 1;
  min-width: 0;
}
.cu-dropdown-item-name {
  font-size: 0.87rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cu-dropdown-item-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.cu-dropdown-item-badge {
  background: var(--blue);
  color: #fff;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.cu-dropdown-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.83rem;
  padding: 16px 0;
}


.saved-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.saved-card:hover {
  border-color: var(--border-md);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.saved-card-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.saved-card-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.saved-card-header-actions {
  display: flex;
  gap: 6px;
  margin-top: -2px;
}
.btn-card-action {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.82rem;
}
.btn-card-action:hover {
  background: var(--bg3);
  border-color: var(--border-md);
  color: var(--text);
}
.btn-card-action.btn-delete-coords:hover {
  background: var(--red-glow);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--red) !important;
}
.saved-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.saved-card-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.saved-card-body {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.saved-meta-item {
  line-height: 1.45;
}
.saved-meta-item strong {
  color: var(--text);
  font-weight: 600;
}
.saved-card-footer {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: auto;
  flex-wrap: wrap;
}
.saved-card-footer .btn-primary,
.saved-card-footer .btn-secondary {
  flex: 1;
  min-width: 90px;
  text-decoration: none;
  justify-content: center;
}
.btn-share-telegram {
  background-color: #24A1DE !important;
  color: #ffffff !important;
  border-color: #24A1DE !important;
  transition: all 0.2s ease-in-out;
}
.btn-share-telegram:hover, .btn-share-telegram:active {
  background-color: #1e87bb !important;
  border-color: #1e87bb !important;
  opacity: 0.9;
}

/* РІвЂќР‚РІвЂќР‚ Small Buttons РІвЂќР‚РІвЂќР‚ */
.btn-sm {
  padding: 8px 14px !important;
  font-size: 0.82rem !important;
  gap: 6px !important;
  border-radius: var(--radius-sm) !important;
}

/* РІвЂќР‚РІвЂќР‚ Archive Collapsible Tree РІвЂќР‚РІвЂќР‚ */
.tree-year {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tree-year-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.tree-year-header:hover {
  background: rgba(255,255,255,0.04);
}
.tree-year-header i.chevron {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform var(--transition);
}
.tree-year.collapsed .tree-year-header i.chevron {
  transform: rotate(-90deg);
}
.tree-months-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 20px;
  margin-top: 2px;
  transition: max-height var(--transition), opacity var(--transition);
  overflow: hidden;
}
.tree-year.collapsed .tree-months-container {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}
.tree-month-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--transition);
}
.tree-month-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.03);
}
.tree-month-link.active {
  color: var(--blue);
  background: var(--blue-glow);
  font-weight: 600;
}

/* РІвЂќР‚РІвЂќР‚ Archive Accident Item РІвЂќР‚РІвЂќР‚ */
.archive-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition);
}
.archive-card:hover {
  border-color: var(--border-md);
}
.archive-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.archive-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.archive-card-body {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}
.archive-card-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 4px;
}

.archive-content,
.archive-list,
.archive-row-card {
  min-width: 0;
}

.archive-list {
  overflow-x: hidden !important;
}

.archive-row-card {
  width: 100%;
}

.archive-row-card h4,
.archive-row-card span {
  min-width: 0;
}

.archive-row-card .btn-sm {
  justify-content: center;
}

/* РІвЂќР‚РІвЂќР‚ Report Actions Bar РІвЂќР‚РІвЂќР‚ */
.report-actions-bar {
  position: fixed;
  bottom: 0;
  right: 0;
  left: var(--sidebar-w);
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 15px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 90;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  transition: left var(--transition);
}
.report-actions-bar .badge-amber {
  background: var(--amber-glow);
  color: var(--amber);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(245, 158, 11, 0.2);
  white-space: nowrap;
}
.report-actions-bar .btn-group {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

@media (max-width: 768px) {
  .archive-container {
    flex-direction: column !important;
    gap: 14px !important;
    min-height: 0 !important;
  }
  .archive-sidebar {
    width: 100% !important;
    max-height: 240px;
  }
  .archive-content {
    width: 100% !important;
    padding: 14px !important;
  }
  .archive-content-header {
    align-items: flex-start !important;
    font-size: 1rem !important;
    line-height: 1.3 !important;
  }
  .archive-content-header span {
    min-width: 0;
    white-space: normal;
  }
  .archive-row-card {
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 12px !important;
    overflow: hidden !important;
  }
  .archive-row-card > div:first-child {
    width: 100%;
  }
  .archive-row-card > div:first-child > div:first-child {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 4px !important;
  }
  .archive-row-card h4 {
    width: 100%;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.25 !important;
  }
  .archive-row-card > div:first-child > div:nth-child(2) {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .archive-row-card > div:first-child > div:nth-child(2) span {
    white-space: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }
  .archive-row-card > div:last-child {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    gap: 8px !important;
    flex-shrink: 1 !important;
    align-items: stretch !important;
  }
  .archive-row-card > div:last-child .btn-sm {
    width: 100% !important;
    min-width: 0 !important;
    padding: 8px 10px !important;
    white-space: normal !important;
    text-align: center;
  }
  .archive-row-card > div:last-child .btn-delete-archive {
    grid-column: auto;
  }
  .archive-row-card > div:last-child .btn-compile-archive {
    grid-column: span 2;
  }
  .report-actions-bar {
    left: 0 !important;
    padding: 12px 16px !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }
  .report-actions-bar .status-indicator-wrap {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
  .report-actions-bar .badge-amber {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    white-space: normal !important;
  }
  .report-actions-bar .btn-group {
    margin-left: 0 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .report-actions-bar .btn-group button {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.78rem !important;
    padding: 8px 6px !important;
    white-space: nowrap !important;
  }
  .report-actions-bar .btn-group #btn-compile-menu {
    grid-column: span 2 !important;
    white-space: normal !important;
  }
}

@media (max-width: 430px) {
  .archive-row-card > div:last-child {
    grid-template-columns: 1fr !important;
  }
  .archive-row-card > div:last-child .btn-compile-archive {
    grid-column: auto;
  }
}

/* РІвЂќР‚РІвЂќР‚ GPS Map Buttons РІвЂќР‚РІвЂќР‚ */
.btn-gps-map {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--blue);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-gps-map:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--blue);
  color: var(--blue);
}

.btn-gps-map-v:hover {
  background: #2563eb !important;
  transform: translateY(-1px);
}

/* РІвЂќР‚РІвЂќР‚ Textarea Height Adjustments РІвЂќР‚РІвЂќР‚ */
#rep-notes, #arch-f-notes {
  min-height: 140px;
  resize: vertical;
}

/* РІвЂќР‚РІвЂќР‚ Archive / Saved Details Read-only View Mode РІвЂќР‚РІвЂќР‚ */
#archive-detail-view-container .view-card {
  transition: all var(--transition);
}
#archive-detail-view-container .view-card:hover {
  border-color: var(--border-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.badge-photo-chk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.badge-photo-chk.checked {
  background: rgba(16,185,129,0.08);
  color: var(--green);
  border-color: rgba(16,185,129,0.2);
}
.badge-photo-chk.unchecked {
  background: rgba(255,255,255,0.02);
  color: var(--text-dim);
  border-color: var(--border);
  opacity: 0.5;
}

.view-work-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  transition: all var(--transition);
}
.view-work-item.completed {
  border-color: rgba(16,185,129,0.25);
  background: rgba(16,185,129,0.02);
}
.view-work-item.completed i {
  color: var(--green);
}
.view-work-item.pending {
  opacity: 0.5;
}
.view-work-item.pending i {
  color: var(--text-dim);
}


/* Custom Checkboxes and Switches */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--bg3);
  border: 1px solid var(--border-md);
  border-radius: 6px;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin: 0;
}
input[type="checkbox"]::before {
  content: "";
  width: 11px;
  height: 11px;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em white;
  background-color: white;
  transform-origin: center;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
input[type="checkbox"]:checked {
  background: var(--blue);
  border-color: var(--blue);
}
input[type="checkbox"]:checked::before {
  transform: scale(1);
}
input[type="checkbox"]:hover {
  border-color: var(--blue);
}
input[type="checkbox"].toggle-switch {
  width: 40px;
  height: 22px;
  border-radius: 22px;
  position: relative;
}
input[type="checkbox"].toggle-switch::before {
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  clip-path: none;
  box-shadow: none;
  transform: none;
}
input[type="checkbox"].toggle-switch:checked::before {
  background: #fff;
  transform: translateX(18px);
}
input[type="checkbox"].toggle-switch:hover {
  border-color: var(--border-md);
}

/* Premium Fuel Vehicle Card */
.fuel-vehicle-card {
  display: grid !important;
  grid-template-columns: 1fr auto 40px !important;
  align-items: center !important;
  gap: 10px !important;
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 10px 12px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  position: relative !important;
  min-height: 84px !important;
  box-sizing: border-box !important;
}

.fuel-vehicle-card:hover {
  border-color: var(--border-md) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

/* Styled checkbox on the card */
.fuel-vehicle-card input[type="checkbox"].fuel-vehicle-check {
  margin: 0 0 0 16px !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}
.fuel-vehicle-card input[type="checkbox"].fuel-vehicle-check::before {
  width: 15px !important;
  height: 15px !important;
}


/* Middle info container */
.fuel-vehicle-card .vehicle-info {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-align: left !important;
}

.fuel-vehicle-card .vehicle-title {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  overflow: hidden !important;
  flex-wrap: nowrap !important;
}

.fuel-vehicle-card .vehicle-brand {
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  color: var(--text) !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex-shrink: 0 !important;
  width: 100% !important;
}

.fuel-vehicle-card .vehicle-comment {
  font-size: 0.72rem !important;
  color: var(--blue) !important;
  background: rgba(29, 78, 216, 0.08) !important;
  border: 1px solid rgba(29, 78, 216, 0.15) !important;
  border-radius: 6px !important;
  padding: 2px 8px !important;
  font-weight: 600 !important;
  display: inline-block !important;
  margin-top: 4px !important;
  font-style: normal !important;
  white-space: nowrap !important;
}
.fuel-vehicle-card .vehicle-comment.empty {
  visibility: hidden !important;
  display: inline-block !important;
  margin-top: 4px !important;
  padding: 2px 8px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: transparent !important;
  font-size: 0.72rem !important;
  height: 20px !important;
  box-sizing: border-box !important;
}

/* Beautiful Ukrainian License Plates */
.ua-plate {
  display: inline-flex !important;
  align-items: center !important;
  background: #ffffff !important;
  border: 1px solid #000000 !important;
  border-radius: 5px !important;
  height: 20px !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.75rem !important;
  color: #000000 !important;
  overflow: hidden !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15) !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
  margin-top: 0px !important;
  white-space: nowrap !important;
}
.ua-flag-strip {
  display: flex !important;
  flex-direction: column !important;
  width: 18px !important;
  height: 100% !important;
  position: relative !important;
  flex-shrink: 0 !important;
  border-right: 1px solid #000000 !important;
}
.ua-flag-blue {
  background: #00bfff !important; /* cyan blue */
  height: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1px 0 0 0 !important;
  overflow: hidden !important;
}
.ua-flag-yellow {
  background: #ffd800 !important; /* yellow */
  height: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.ua-text {
  font-size: 7px !important;
  color: #000000 !important; /* black UA text */
  font-weight: 900 !important;
  line-height: 1 !important;
  font-family: 'Inter', sans-serif !important;
  letter-spacing: -0.3px !important;
}
.plate-number {
  padding: 0 8px !important;
  letter-spacing: 0.5px !important;
  line-height: 18px !important;
  text-transform: uppercase !important;
  font-weight: 800 !important;
  color: #000000 !important;
  font-size: 0.8rem !important;
  white-space: nowrap !important;
  display: inline-block !important;
}

/* Liter controller on the right */
.liters-control {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 20px !important;
  padding: 0 !important;
  overflow: hidden !important;
  width: 90px !important;
  height: 28px !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
  box-sizing: border-box !important;
}
.liters-control:focus-within {
  border-color: var(--blue) !important;
}
.fuel-change-btn {
  background: none !important;
  border: none !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  width: 26px !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  padding: 0 !important;
  transition: background 0.15s ease, color 0.15s ease !important;
}
.fuel-change-btn:hover {
  background: var(--bg3) !important;
  color: var(--text) !important;
}
.fuel-liters-input {
  width: 38px !important;
  height: 100% !important;
  text-align: center !important;
  background: transparent !important;
  border: none !important;
  border-left: 1px solid var(--border) !important;
  border-right: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 0 !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  -moz-appearance: textfield !important;
}
.fuel-liters-input::-webkit-outer-spin-button,
.fuel-liters-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

/* Adapt columns automatically based on container size to prevent cards from squishing on small screens */
#fuel-vehicles-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 12px !important;
}

#page-fuel-request .table-section {
  min-height: 0;
}

#page-fuel-request .controls-bar .search-wrap {
  min-width: min(240px, 100%);
}

#page-fuel-request .controls-bar .actions-group {
  flex-wrap: wrap;
}

@media (max-width: 990px) {
  #page-fuel-request .table-section {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 16px !important;
  }
}
@media (max-width: 680px) {
  #page-fuel-request .controls-bar {
    align-items: stretch;
  }
  #page-fuel-request .controls-bar .actions-group {
    grid-template-columns: 1fr !important;
  }
  #page-fuel-request .card {
    padding: 14px !important;
  }
  #page-fuel-request .form-field[style*="max-width"] {
    max-width: none !important;
  }
  #page-fuel-request .form-row-2 {
    grid-template-columns: 1fr !important;
  }
  #page-fuel-request .card > div:first-child {
    align-items: flex-start !important;
    flex-direction: column;
  }
  #btn-fuel-add-custom {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }
  .fuel-vehicle-card {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    min-height: 0 !important;
  }
  .fuel-vehicle-card input[type="checkbox"].fuel-vehicle-check {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    margin: 0 !important;
  }
  .fuel-vehicle-card .vehicle-info {
    padding-right: 42px !important;
  }
  .fuel-vehicle-card .vehicle-title {
    flex-wrap: wrap !important;
  }
  .fuel-vehicle-card .vehicle-brand,
  .fuel-vehicle-card .vehicle-comment {
    white-space: normal !important;
  }
  .liters-control {
    width: 100% !important;
    height: 34px !important;
    margin-left: 0 !important;
    border-radius: var(--radius-sm) !important;
  }
  .fuel-change-btn {
    width: 40px !important;
  }
  .fuel-liters-input {
    flex: 1 !important;
    width: auto !important;
  }
}

/* Worker Cards for Maintenance and Money Requests */
.maint-worker-card, .money-worker-card {
  display: grid !important;
  grid-template-columns: 1fr auto 40px !important;
  align-items: center !important;
  gap: 10px !important;
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 10px 12px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  position: relative !important;
  min-height: 84px !important;
  box-sizing: border-box !important;
}
.maint-worker-card:hover, .money-worker-card:hover {
  border-color: var(--border-md) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}
.maint-worker-card input[type="checkbox"].worker-check, 
.money-worker-card input[type="checkbox"].worker-check {
  margin: 0 0 0 16px !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}
.maint-worker-card input[type="checkbox"].worker-check::before, 
.money-worker-card input[type="checkbox"].worker-check::before {
  width: 15px !important;
  height: 15px !important;
}
.worker-details-inputs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.worker-details-inputs input {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 4px 8px !important;
  border-radius: var(--radius-xs) !important;
  font-size: 0.78rem !important;
  outline: none !important;
}
.worker-details-inputs input:focus {
  border-color: var(--blue) !important;
}

/* Material Item Row */
.material-item-row {
  display: grid;
  grid-template-columns: 1fr 100px 80px 42px;
  gap: 10px;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}
.material-item-row input {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 6px 10px !important;
  border-radius: var(--radius-xs) !important;
  font-size: 0.85rem !important;
  width: 100%;
  box-sizing: border-box;
}
.material-item-row input:focus {
  border-color: var(--blue) !important;
}

/* Duty row item */
.duty-row-item {
  display: grid;
  grid-template-columns: 120px 1fr 1fr 42px;
  gap: 10px;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}
.duty-row-item input, .duty-row-item select {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 6px 10px !important;
  border-radius: var(--radius-xs) !important;
  font-size: 0.85rem !important;
  width: 100%;
  box-sizing: border-box;
}
.duty-row-item input:focus, .duty-row-item select:focus {
  border-color: var(--blue) !important;
}

@media (max-width: 600px) {
  .duty-worker-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    position: relative;
    padding-bottom: 45px !important;
  }
  .duty-worker-row select,
  .duty-worker-row input {
    width: 100% !important;
    min-width: 0 !important;
  }
  .btn-delete-duty-worker {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 100px !important;
    justify-content: center;
  }
}



/* РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ SUB-ITEMS & TAGS РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ */

/* Sub-item row visual styling */
.sub-item-row {
  background: rgba(59, 130, 246, 0.03) !important;
  border-left: 3px solid rgba(59, 130, 246, 0.25);
}
.sub-item-row:hover {
  background: rgba(59, 130, 246, 0.06) !important;
}
.sub-item-row .cell-num {
  padding-left: 20px;
}

/* Sub-item town РІР‚вЂќ slightly smaller font */
.sub-item-town {
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
}

/* Tag: "Р вЂ™ Р Т‘РЎвЂ“Р В»РЎРЏР Р…Р С”Р В°РЎвЂ¦" РІР‚вЂќ shown in visits table for transferred visits */
.tag-in-area {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(168, 85, 247, 0.12);
  color: var(--purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.tag-in-area i { font-size: 0.65rem; }

/* Tag: "Р вЂ™Р С‘РЎвЂ”Р В·Р Т‘" РІР‚вЂќ shown in areas table for areas linked to a visit */
.tag-from-visit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.tag-from-visit i { font-size: 0.65rem; }

/* Tag: "Р СџРЎвЂ“Р Т‘Р Р†Р С‘РЎвЂ”Р В·Р Т‘" / "Р СџРЎвЂ“Р Т‘Р Т‘РЎвЂ“Р В»РЎРЏР Р…Р С”Р В°" */
.tag-sub-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  flex-shrink: 0;
}
.tag-sub-item i { font-size: 0.62rem; }

.meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.tag-date,
.tag-work-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.64rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg3);
}

.tag-work-type.danger {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
}

.data-table tbody tr.row-accident {
  background: rgba(239, 68, 68, 0.055) !important;
}

.data-table tbody tr.row-accident:hover {
  background: rgba(239, 68, 68, 0.085) !important;
}

body.light-theme .data-table tbody tr.row-accident {
  background: rgba(239, 68, 68, 0.075) !important;
}

.month-row td {
  background: rgba(59, 130, 246, 0.08) !important;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.02em;
  padding: 8px 16px !important;
}

body.light-theme .month-row td {
  background: rgba(59, 130, 246, 0.06) !important;
}

/* Button: "Р вЂќР С•Р Т‘Р В°РЎвЂљР С‘ Р С—РЎвЂ“Р Т‘Р Р†Р С‘РЎвЂ”Р В·Р Т‘ / Р С—РЎвЂ“Р Т‘Р Т‘РЎвЂ“Р В»РЎРЏР Р…Р С”РЎС“" (+ in action column) */
.btn-add-sub-visit,
.btn-add-sub-area {
  width: 32px;
  height: 32px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--blue);
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.88rem;
}
.btn-add-sub-visit:hover,
.btn-add-sub-area:hover {
  background: var(--blue-glow);
  border-color: var(--blue);
  transform: scale(1.1);
}

.btn-toggle-sub-items {
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-toggle-sub-items.is-collapsed {
  color: var(--blue);
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.1);
}

/* --- Date Pickers Theme Integration --- */
input[type="date"] {
  color-scheme: dark;
}

body.light-theme input[type="date"] {
  color-scheme: light;
}

/* App grid layout for two-column pages */
.app-grid-layout {
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .app-grid-layout {
    grid-template-columns: 1fr !important;
    padding: 10px !important;
    gap: 16px !important;
  }
}

/* Fuel Presets Carousel Styling */
.fuel-presets-section {
  padding: 0 20px;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .fuel-presets-section {
    padding: 0 10px !important;
  }
}

#fuel-presets-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) rgba(0,0,0,0.1);
  padding: 6px 2px;
  -webkit-overflow-scrolling: touch; /* smooth momentum scrolling on iOS */
}

#fuel-presets-list::-webkit-scrollbar {
  height: 6px;
}

#fuel-presets-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 99px;
}

#fuel-presets-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}

#fuel-presets-list::-webkit-scrollbar-thumb:hover {
  background: var(--blue);
}

.preset-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-width: 240px;
  max-width: 270px;
  flex-shrink: 0; /* CRITICAL: Prevent cards from shrinking on mobile horizontal scroll */
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; /* CRITICAL: relative container for absolute children */
  display: flex;
  flex-direction: column;
  gap: 6px;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.preset-card:hover {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 0 10px rgba(59, 130, 246, 0.08);
}

.preset-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 22px; /* make space for delete button */
}

.preset-card-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.preset-card-info {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

.preset-card-info i {
  color: var(--blue);
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.preset-card-vehicles-list {
  font-size: 0.72rem;
  color: var(--text-dim);
  padding-left: 0px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preset-vehicle-item {
  display: flex;
  align-items: center;
  line-height: 1.2;
}

.delete-preset-btn {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  border: none !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-muted) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.75rem !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  z-index: 5 !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
}

.delete-preset-btn:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  color: var(--red) !important;
}


/* РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’
   USERS MANAGEMENT PAGE
   РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ */

/* Pending badge in sidebar nav */
.users-pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--amber);
  color: #000;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  margin-left: auto;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(245,158,11,0); }
}

/* Color-red stat icon wrap */
.stat-icon-wrap.color-red {
  background: var(--red-glow);
  color: var(--red);
}

/* Users grid */
.users-grid-section {
  padding: 0;
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 0 0 32px;
}

/* User card */
.user-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.user-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.user-card.status-approved::before { background: var(--green); }
.user-card.status-pending::before  { background: var(--amber); }
.user-card.status-blocked::before  { background: var(--red); }

.user-card:hover {
  border-color: var(--border-md);
  box-shadow: var(--shadow);
}

/* Card header row */
.user-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* Avatar circle */
.user-card-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.user-card.status-approved .user-card-avatar { background: linear-gradient(135deg, #22c55e, #16a34a); }
.user-card.status-pending  .user-card-avatar { background: linear-gradient(135deg, #f59e0b, #d97706); }
.user-card.status-blocked  .user-card-avatar { background: linear-gradient(135deg, #ef4444, #dc2626); filter: grayscale(0.4); }

/* Card meta */
.user-card-meta {
  flex: 1;
  min-width: 0;
}
.user-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.user-card-username {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.user-card-phone {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Badges row */
.user-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.user-badge.badge-status-approved {
  background: rgba(34,197,94,0.15);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.2);
}
.user-badge.badge-status-pending {
  background: rgba(245,158,11,0.15);
  color: var(--amber);
  border: 1px solid rgba(245,158,11,0.2);
}
.user-badge.badge-status-blocked {
  background: rgba(239,68,68,0.15);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.2);
}
.user-badge.badge-role-admin {
  background: rgba(168,85,247,0.15);
  color: var(--purple);
  border: 1px solid rgba(168,85,247,0.2);
}
.user-badge.badge-role-moderator {
  background: rgba(59,130,246,0.15);
  color: var(--blue);
  border: 1px solid rgba(59,130,246,0.2);
}
.user-badge.badge-role-operator,
.user-badge.badge-role-user {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Date info */
.user-card-date {
  font-size: 0.74rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Card actions */
.user-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.user-card-actions .btn-action {
  flex: 1 1 110px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-action.btn-approve {
  background: rgba(34,197,94,0.12);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.2);
}
.btn-action.btn-approve:hover {
  background: rgba(34,197,94,0.22);
}
.btn-action.btn-block {
  background: rgba(239,68,68,0.1);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.18);
}
.btn-action.btn-block:hover {
  background: rgba(239,68,68,0.22);
}
.btn-action.btn-unblock {
  background: rgba(245,158,11,0.1);
  color: var(--amber);
  border: 1px solid rgba(245,158,11,0.18);
}
.btn-action.btn-unblock:hover {
  background: rgba(245,158,11,0.22);
}
.btn-action.btn-moderator {
  background: rgba(59,130,246,0.1);
  color: var(--blue);
  border: 1px solid rgba(59,130,246,0.18);
}
.btn-action.btn-moderator:hover {
  background: rgba(59,130,246,0.22);
}
.btn-action.btn-delete-user {
  flex: 0 0 auto;
  width: 36px;
  min-width: 36px;
  background: rgba(239,68,68,0.07);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.12);
  opacity: 0.7;
  padding: 7px 0;
}
.btn-action.btn-delete-user:hover {
  opacity: 1;
  background: rgba(239,68,68,0.18);
}
.btn-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-action.btn-protected {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.btn-action.btn-tg-chat {
  flex: 0 0 auto;
  width: 36px;
  min-width: 36px;
  background: rgba(36,161,222,0.07);
  color: #24a1de;
  border: 1px solid rgba(36,161,222,0.12);
  opacity: 0.7;
  padding: 7px 0;
}
.btn-action.btn-tg-chat:hover {
  opacity: 1;
  background: rgba(36,161,222,0.18);
}
.btn-action.btn-user-activity {
  flex: 0 0 auto;
  width: 36px;
  min-width: 36px;
  background: rgba(168, 85, 247, 0.08);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.16);
  opacity: 0.7;
  padding: 7px 0;
}
.btn-action.btn-user-activity:hover {
  opacity: 1;
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}


/* Empty state */
.users-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text-muted);
  text-align: center;
}
.users-empty i {
  font-size: 2.5rem;
  opacity: 0.3;
}
.users-empty p {
  font-size: 0.9rem;
  opacity: 0.6;
}

/* Loading spinner inside grid */
.users-grid .loading-spinner {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 20px;
  color: var(--text-muted);
}

/* Mobile: 1 column */
@media (max-width: 640px) {
  .users-grid {
    grid-template-columns: 1fr;
  }
  .user-card-actions .btn-action {
    font-size: 0.7rem;
    padding: 6px 8px;
  }
}

/* Light theme adjustments */
body.light-theme .user-card {
  background: var(--bg2);
  border-color: var(--border);
}
body.light-theme .user-card-name {
  color: var(--text);
}

/* СЂСџвЂњР‰ Dashboard & Analytics Styles */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
  width: 100%;
}

.dashboard-grid .card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 380px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.dashboard-grid .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-md);
}

.dashboard-grid .card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.chart-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 280px;
  width: 100%;
}

/* РІС™в„ўРїС‘РЏ System Status Panel details */
.status-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.status-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.status-label-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-value-text {
  font-weight: 700;
  color: var(--text);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .dashboard-grid .card {
    min-height: 340px;
    padding: 16px;
    grid-column: span 1 !important;
  }
  .chart-container {
    height: 240px;
  }
}

/* Custom media query section */
@media (max-width: 480px) {
  .dashboard-grid {
    gap: 10px;
  }
}

/* СЂСџвЂњВ± Responsive Dashboard and Explorer layout */
@media (max-width: 768px) {
  .dash-explorer-container {
    flex-direction: column !important;
    padding: 10px !important;
    gap: 16px !important;
  }
  
  .dash-explorer-sidebar {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border) !important;
    padding-right: 0 !important;
    padding-bottom: 16px !important;
    max-height: 250px !important;
  }
  
  #dash-accidents-list {
    max-height: none !important;
    overflow-y: visible !important;
  }
  
  .archive-row-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 12px 14px !important;
  }
  
  .archive-row-card div:last-child {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: flex-start !important;
  }
  
  .archive-row-card div:last-child button {
    flex: 1 1 calc(50% - 6px) !important;
    justify-content: center !important;
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
  }
}

@media (max-width: 400px) {
  .archive-row-card div:last-child button {
    flex: 1 1 100% !important;
  }
}

/* Suggestion badges for accident cause templates */
.suggestion-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--bg3);
  border: 1px solid var(--border-md);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.suggestion-badge:hover {
  background: var(--blue-glow);
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-1px);
}

.suggestion-badge:active {
  transform: translateY(0);
}


/* РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’
   KNOWLEDGE BASE (Р вЂќР С›Р вЂ™Р вЂ Р вЂќР СњР ВР С™) STYLES
   РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ */

.knowledge-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 15px;
}

/* Contacts Cards Grid */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

/* Individual Contact Card РІР‚вЂќ Modern Centered Design */
.kb-contact-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.08), 0 2px 6px -2px rgba(0, 0, 0, 0.04);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 240px;
}

.kb-contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: linear-gradient(135deg, var(--blue), #6366f1);
  opacity: 0.12;
  transition: opacity 0.3s;
}

.kb-contact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 16px 32px -8px rgba(59, 130, 246, 0.15), 0 6px 12px -4px rgba(0, 0, 0, 0.08);
}

.kb-contact-card:hover::before {
  opacity: 0.2;
}

.kb-contact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.kb-contact-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-align: center;
  word-break: break-word;
}

.kb-contact-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.25s;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: var(--bg2);
  border-radius: 10px;
  padding: 4px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.kb-contact-card:hover .kb-contact-actions {
  opacity: 1;
}

.btn-card-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 5px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-card-action:hover {
  color: var(--text);
  background: var(--bg3);
}

.btn-card-action.delete:hover {
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
}

/* Contact Details */
.kb-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85rem;
  width: fit-content;
  transition: color var(--transition);
}

.kb-phone-link:hover {
  text-decoration: none;
  color: var(--blue-hover, #2563eb);
}

.kb-tag {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.2s;
}

[data-theme="light"] .kb-tag {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.15);
  color: var(--blue);
}

.kb-contact-notes {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  white-space: pre-wrap;
}

/* Bookmark/Links Category Container */
.kb-category-container {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kb-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-md);
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.kb-category-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kb-category-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.kb-lock-icon {
  color: var(--amber);
  font-size: 0.85rem;
}

.kb-category-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Category cards list */
.kb-cards-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

/* Bookmark cards */
.kb-bookmark-card {
  display: flex;
  position: relative;
  background: var(--bg3);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--transition);
  min-height: 80px;
  text-decoration: none !important;
}

.kb-bookmark-card:hover {
  transform: translateY(-1px);
  border-color: var(--blue);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.kb-bookmark-content {
  flex: 1;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.kb-bookmark-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kb-bookmark-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kb-bookmark-url-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--blue);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kb-bookmark-url-wrap i {
  font-size: 0.7rem;
}

.kb-bookmark-icon-side {
  width: 48px;
  background: rgba(59, 130, 246, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 1.25rem;
  flex-shrink: 0;
  border-right: 1px solid var(--border-md);
}

.kb-bookmark-card:hover .kb-bookmark-icon-side {
  background: rgba(59, 130, 246, 0.1);
}

/* Category Empty State */
.kb-empty-category {
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  border: 1px dashed var(--border-md);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .kb-empty-category {
  background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 480px) {
  .contacts-grid, .kb-cards-list {
    grid-template-columns: 1fr;
  }
  .kb-bookmark-card {
    min-height: auto;
  }
}

/* РІвЂќР‚РІвЂќР‚ IFRAME BOOKMARK CARD РІвЂќР‚РІвЂќР‚ */
.kb-bookmark-card--iframe {
  border-color: rgba(139, 92, 246, 0.3);
}

.kb-bookmark-card--iframe:hover {
  border-color: #8b5cf6;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.kb-bookmark-card--iframe .kb-bookmark-icon-side {
  background: rgba(139, 92, 246, 0.08);
  color: #8b5cf6;
  border-right-color: rgba(139, 92, 246, 0.2);
}

.kb-bookmark-card--iframe:hover .kb-bookmark-icon-side {
  background: rgba(139, 92, 246, 0.15);
}

.kb-bookmark-card--iframe .kb-bookmark-url-wrap {
  color: #8b5cf6;
  font-weight: 500;
}

/* РІвЂќР‚РІвЂќР‚ DRAG AND DROP РІвЂќР‚РІвЂќР‚ */
/* Р С™Р В°РЎР‚РЎвЂљР С”Р В° РЎвЂ°Р С• РЎвЂљРЎРЏР С–Р Р…РЎС“РЎвЂљРЎРЉ */
.kb-card-dragging {
  opacity: 0.4;
  cursor: grabbing !important;
  outline: 2px dashed var(--accent, #6366f1);
  outline-offset: 2px;
}

/* Р вЂ”Р С•Р Р…Р В° РЎРѓР С”Р С‘Р Т‘Р В°Р Р…Р Р…РЎРЏ Р С—РЎР‚Р С‘ Р Р…Р В°Р Р†Р ВµР Т‘Р ВµР Р…Р Р…РЎвЂ“ */
.kb-drop-zone-active {
  outline: 2px dashed rgba(99, 102, 241, 0.5);
  outline-offset: 3px;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 8px;
  transition: background 0.15s, outline 0.15s;
}

/* Р вЂєРЎвЂ“Р Р…РЎвЂ“РЎРЏ-placeholder Р СРЎвЂ“Р В¶ Р С”Р В°РЎР‚РЎвЂљР С”Р В°Р СР С‘ */
.kb-drop-placeholder {
  height: 3px;
  background: var(--accent, #6366f1);
  border-radius: 2px;
  margin: 2px 0;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
  animation: kb-placeholder-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes kb-placeholder-pulse {
  from { opacity: 0.7; }
  to   { opacity: 1; }
}

/* Drag handle РІР‚вЂќ Р С—Р С•Р С”Р В°Р В·РЎС“РЎвЂќР СР С• Р Т‘Р В»РЎРЏ Р В°Р Т‘Р СРЎвЂ“Р Р…РЎвЂ“Р Р† Р С—РЎР‚Р С‘ hover */
.kb-bookmark-card[draggable="true"],
.kb-contact-card[draggable="true"] {
  cursor: grab;
  overflow: visible;
}

.kb-bookmark-card[draggable="true"]:active,
.kb-contact-card[draggable="true"]:active {
  cursor: grabbing;
}

/* Р СњР ВµР Р†Р ВµР В»Р С‘Р С”Р С‘Р в„– drag-handle РЎвЂ“Р Р…Р Т‘Р С‘Р С”Р В°РЎвЂљР С•РЎР‚ РЎС“ Р В»РЎвЂ“Р Р†Р С•Р СРЎС“ Р Р†Р ВµРЎР‚РЎвЂ¦Р Р…РЎРЉР С•Р СРЎС“ Р С”РЎС“РЎвЂљРЎвЂ“ */
.kb-bookmark-card[draggable="true"]::after,
.kb-contact-card[draggable="true"]::after {
  content: 'РІВ С—';
  position: absolute;
  top: 4px;
  left: 5px;
  font-size: 13px;
  color: var(--text-muted, #666);
  opacity: 0;
  transition: opacity 0.15s;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

.kb-bookmark-card[draggable="true"]:hover::after,
.kb-contact-card[draggable="true"]:hover::after {
  opacity: 0.5;
}

/* РІвЂќР‚РІвЂќР‚ IFRAME VIEWER PAGE РІвЂќР‚РІвЂќР‚ */

#page-iframe-viewer {
  padding: 0 !important;
  gap: 0 !important;
  height: calc(100vh - var(--topbar-h));
  overflow: hidden;
}

#page-iframe-viewer.active {
  flex-direction: column;
}

.iframe-viewer-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border-md);
  min-height: 44px;
  flex-shrink: 0;
  z-index: 10;
}

.iframe-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  padding: 5px 10px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.iframe-back-btn:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.iframe-viewer-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.iframe-viewer-title span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.iframe-open-external {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  border: 1px solid var(--border-md);
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition);
  flex-shrink: 0;
}

.iframe-open-external:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.08);
}

.iframe-viewer-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.iframe-viewer-body iframe {
  flex: 1;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block;
}

/* Mobile: compact topbar */
@media (max-width: 600px) {
  .iframe-back-btn span {
    display: none;
  }
  .iframe-back-btn {
    padding: 6px 8px;
  }
  .iframe-viewer-topbar {
    padding: 6px 10px;
    min-height: 40px;
  }
}

.kb-phone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg2);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  margin-top: 4px;
}
.btn-copy-phone {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-copy-phone:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}
.details-value-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.9rem;
}

/* Multi-select Checklist Styles */
.restricted-checkboxes-list {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 180px;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.restricted-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}
.restricted-checkbox-item input {
  cursor: pointer;
  accent-color: var(--blue);
}
.restricted-group-title {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px;
  letter-spacing: 0.05em;
}

/* Contact Avatar Styles */
.kb-contact-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 18px 12px;
  flex-grow: 1;
  gap: 0;
  position: relative;
  z-index: 1;
}
.kb-contact-avatar-wrap {
  flex-shrink: 0;
  margin-bottom: 12px;
}
.kb-contact-avatar-placeholder, .kb-contact-avatar-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  object-fit: cover;
  border: 3px solid var(--bg2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.3s, box-shadow 0.3s;
}
.kb-contact-card:hover .kb-contact-avatar-placeholder,
.kb-contact-card:hover .kb-contact-avatar-img {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(59,130,246,0.2);
}
.kb-contact-main-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.kb-contact-phones {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  align-items: center;
}
.kb-phone-row {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}
.kb-contact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 4px;
}
.kb-contact-meta-buttons {
  display: flex;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.02);
}
[data-theme="dark"] .kb-contact-meta-buttons,
body:not(.light-theme) .kb-contact-meta-buttons {
  background: rgba(255,255,255,0.02);
}
.btn-kb-notion {
  font-size: 0.78rem;
  font-weight: 500;
  color: #fff;
  background: #111;
  border: 1px solid #222;
  border-radius: 10px;
  padding: 7px 12px;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  flex: 1;
}
.btn-kb-notion:hover {
  background: #2c2c2c;
}
.btn-kb-view-details {
  flex: 1;
  margin-top: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue);
  background: transparent;
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 10px;
  padding: 7px 12px;
  cursor: pointer;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-kb-view-details:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* Mobile responsiveness for contact cards */
@media (max-width: 600px) {
  .contacts-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
  .kb-contact-card {
    min-height: 200px;
  }
  .kb-contact-body {
    padding: 16px 12px 10px;
  }
  .kb-contact-avatar-placeholder, .kb-contact-avatar-img {
    width: 52px;
    height: 52px;
    font-size: 1.1rem;
  }
  .kb-contact-name {
    font-size: 0.85rem;
  }
  .kb-phone-link {
    font-size: 0.82rem;
  }
  .kb-contact-meta-buttons {
    padding: 10px 12px;
  }
  .btn-kb-view-details,
  .btn-kb-notion {
    font-size: 0.72rem;
    padding: 6px 8px;
  }
}

/* СЂСџвЂњВ± Table Accordion styling for mobile/tablet screens */
@media (max-width: 1024px) {
  /* Hide non-essential columns on mobile */
  #data-table th.col-direction,
  #data-table th.col-fibers,
  #data-table th.col-date,
  #data-table th.col-desc,
  #data-table th.col-detail,
  #data-table td:nth-child(3), /* Direction */
  #data-table td:nth-child(4), /* Fibers */
  #data-table td:nth-child(5), /* Start date */
  #data-table td:nth-child(6), /* End date */
  #data-table td:nth-child(7), /* Description */
  #data-table td:nth-child(9)  /* Details (Notion) */ {
    display: none !important;
  }

  /* Make header span correctly when columns are hidden */
  #data-table th {
    font-size: 0.78rem;
    padding: 10px 8px;
  }
  #data-table td {
    font-size: 0.85rem;
    padding: 10px 8px;
  }

  /* In mobile mode, row clicks are indicator for accordion */
  #data-table tr.main-row {
    cursor: pointer;
  }
  
  #data-table tr.main-row:hover {
    background-color: var(--bg3);
  }

  /* Hide excessive buttons from main row actions */
  #data-table tr.main-row .col-actions button:not(.btn-edit-row) {
    display: none !important;
  }
  #data-table tr.main-row .col-actions .row-actions {
    justify-content: center;
  }

  /* Show chevron on mobile */
  .mobile-chevron {
    display: inline-block !important;
    transition: transform 0.2s ease;
  }
  tr.main-row.expanded .mobile-chevron {
    transform: rotate(90deg);
  }
  
  /* Details box container styling */
  .mobile-details-box {
    background: var(--bg2);
    border-radius: 8px;
    padding: 12px 14px;
    margin: 4px 0;
    border: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
  }
  
  .mobile-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    font-size: 0.82rem;
  }
  
  .details-grid-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  
  .details-grid-item strong {
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .details-grid-item span {
    color: var(--text);
    font-weight: 500;
  }
  
  .details-desc-item {
    font-size: 0.82rem;
    border-top: 1px solid var(--border);
    padding-top: 8px;
  }
  
  .details-desc-item strong {
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .details-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
  }
  
  .mobile-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
  }
  
  .mobile-action-btn:hover {
    background: var(--bg2);
    border-color: var(--blue);
  }
  
  .mobile-action-btn.text-danger-btn {
    color: var(--red) !important;
    border-color: rgba(239, 68, 68, 0.2);
  }
  .mobile-action-btn.text-danger-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--red);
  }
}

@media (min-width: 1025px) {
  #data-table tr.details-row {
    display: none !important;
  }
}

/* СЂСџР‹РЃ Icon picker grid styling */
.kb-icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  margin-top: 6px;
  background: var(--bg3);
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 120px;
  overflow-y: auto;
}
.kb-icon-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  border: 1px solid transparent;
  color: var(--text-muted);
  transition: all var(--transition);
  font-size: 1.1rem;
}
.kb-icon-item:hover {
  background: var(--bg2);
  color: var(--text);
  border-color: var(--border-md);
}
.kb-icon-item.active {
  background: var(--blue-glow);
  color: var(--blue);
  border-color: var(--blue);
}

/* РІвЂќР‚РІвЂќР‚ Custom Dropdown Mobile РІвЂќР‚РІвЂќР‚ */
@media (max-width: 768px) {
  /* Coords controls bar wraps on small screens */
  .coords-folder-select-wrap {
    width: 100%;
    order: -1; /* show above search */
  }
  .cu-dropdown, .cu-dropdown-btn {
    width: 100%;
    max-width: 100%;
  }
  /* Panel opens full-width on mobile */
  .cu-dropdown-panel {
    left: 0;
    right: 0;
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .cu-dropdown-btn {
    min-width: 0;
    padding: 8px 10px;
    font-size: 0.84rem;
  }
  .cu-dropdown-item-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  .cu-dropdown-item-name {
    font-size: 0.83rem;
  }
  .cu-dropdown-list {
    max-height: 220px;
  }
}

/* РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚
   SAVED COORDS COLOR PICKER & CARD CUSTOMIZATION
   РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚РІвЂќР‚ */
#coords-color-picker input[type="radio"]:checked + span {
  border-color: var(--bg2) !important;
  box-shadow: 0 0 0 2px var(--blue);
}

.saved-card.color-slate {
  background: rgba(71, 85, 105, 0.15);
  border-color: rgba(71, 85, 105, 0.4);
}
.saved-card.color-emerald {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
}
.saved-card.color-indigo {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
}
.saved-card.color-violet {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
}
.saved-card.color-amber {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
}
.saved-card.color-rose {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
}

.btn-card-action.btn-pin-coords:hover {
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-card-action.btn-pin-coords .btn-pin-active {
  color: #ef4444;
  transform: rotate(45deg);
  display: inline-block;
  transition: transform 0.2s ease-in-out;
}
.btn-card-action.btn-copy-to-user:hover {
  color: var(--blue) !important;
}

/* РІвЂќР‚РІвЂќР‚ Mobile responsiveness adjustments for coordinates page РІвЂќР‚РІвЂќР‚ */
@media (max-width: 480px) {
  .saved-card {
    padding: 16px;
    gap: 12px;
  }
  .saved-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-bottom: 10px;
  }
  .saved-card-header-actions {
    justify-content: flex-end;
    margin-top: 4px;
  }
  .saved-card-title {
    font-size: 0.95rem;
  }
  .saved-card-body {
    font-size: 0.83rem;
    gap: 6px;
  }
  .saved-card-footer {
    padding-top: 10px;
    gap: 6px;
  }
  .saved-card-footer .btn-primary,
  .saved-card-footer .btn-secondary {
    padding: 6px 8px;
    font-size: 0.78rem;
    min-width: 70px;
  }
  .btn-pc-browser span {
    display: none;
  }
  .btn-pc-browser {
    padding: 6px 8px;
  }
}




/* РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’
   TIMESHEET PAGE
   РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ */

.timesheet-page-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  padding: 16px;
  align-items: start;
}

@media (max-width: 768px) {
  .timesheet-page-grid {
    grid-template-columns: 1fr;
  }
}

.timesheet-info-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  background: var(--bg3, rgba(255,255,255,0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted, #94A3B8);
  font-size: 0.88rem;
  line-height: 1.5;
}

.timesheet-info-box p {
  margin: 0;
  color: var(--text-muted, #94A3B8);
}

.timesheet-info-box b {
  color: var(--text, #F1F5F9);
}

.timesheet-info-icon {
  font-size: 1.4rem;
  color: var(--blue, #60A5FA);
  flex-shrink: 0;
  margin-top: 2px;
}

/* User activity modal responsiveness */
.user-activity-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 480px) {
  .user-activity-stats-grid {
    grid-template-columns: 1fr;
  }
  .modal-box {
    padding: 16px !important;
  }
  #user-activity-chart {
    padding: 10px 8px 6px 8px !important;
    gap: 4px !important;
  }
  #user-activity-chart span {
    font-size: 0.6rem !important;
  }
}

/* Fullscreen stats modal on mobile screens */
@media (max-width: 600px) {
  #user-activity-modal.modal-backdrop {
    align-items: stretch !important;
    padding: 0 !important;
  }
  #user-activity-modal .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
  }
  #user-activity-modal .modal-body {
    padding: 8px 0 !important;
  }
  #user-activity-list {
    max-height: calc(100vh - 320px) !important;
  }
}

/* Center stats modal on desktop */
@media (min-width: 601px) {
  #user-activity-modal.modal-backdrop {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
  }
  #user-activity-modal .modal-box {
    margin: auto !important;
  }
}

/* Premium Stats Modal Enhancements */
.activity-stat-card {
  background: var(--bg3, rgba(30, 41, 59, 0.5));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.activity-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.1);
}

.activity-stat-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  flex-shrink: 0;
}

.activity-stat-card-content {
  flex: 1;
  min-width: 0;
}

.activity-stat-card-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.activity-stat-card-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 1px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Timeline design */
.activity-timeline {
  position: relative;
  padding-left: 20px;
  margin-left: 10px;
  border-left: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.activity-timeline-node {
  position: relative;
}

.activity-timeline-icon-wrapper {
  position: absolute;
  left: -32px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg2);
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  z-index: 2;
  font-size: 0.75rem;
  border-color: #a855f7;
  color: #a855f7 !important;
}

.activity-chart-bar-glow:hover {
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.4));
  transform: scaleY(1.05) !important;
}





/* РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ DASHBOARD GROUPED STATS РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ */
.stats-groups-container {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
}
.stats-group-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stats-group-box.accidents-group {
  flex: 2;
}
.stats-group-box.areas-group {
  flex: 4;
}
.stats-group-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 4px;
}
.stats-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.stats-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 1200px) {
  .stats-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 900px) {
  .stats-groups-container {
    flex-direction: column;
    gap: 15px;
  }
}
@media (max-width: 600px) {
  .stats-grid-2 {
    grid-template-columns: 1fr;
  }
  .stats-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’
   ORDERS SECTION
   РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’РІвЂўС’ */

.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

@media (max-width: 640px) {
  .orders-grid {
    grid-template-columns: 1fr;
  }
}

/* Order Card */
.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.order-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 16px 16px 0 0;
}

.order-card:hover {
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-2px);
}

.order-card-name {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  padding-right: 60px; /* space for edit/delete buttons */
}

.order-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
  border-left: 2px solid var(--border);
  padding-left: 10px;
}

/* Action buttons row РІР‚вЂќ phone + address */
.order-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.order-btn-phone,
.order-btn-address {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  white-space: nowrap;
  padding: 10px 4px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.order-btn-phone {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.order-btn-phone:hover,
.order-btn-phone:active {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.5);
  transform: scale(1.03);
}

.order-btn-address {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.order-btn-address:hover,
.order-btn-address:active {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.5);
  transform: scale(1.03);
}


.order-btn-gmaps {
  background: rgba(234, 67, 53, 0.12);
  color: #ea4335;
  border: 1px solid rgba(234, 67, 53, 0.25);
}

.order-btn-gmaps:hover,
.order-btn-gmaps:active {
  background: rgba(234, 67, 53, 0.22);
  border-color: rgba(234, 67, 53, 0.5);
  transform: scale(1.03);
}
/* Edit / Delete mini-buttons top-right */
.order-card-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
}

.order-ctrl-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.2s;
  touch-action: manipulation;
}

.order-ctrl-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.order-ctrl-btn.delete:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

/* Modal slide-up animation */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* btn-primary default style fallback */
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.97);
}

.order-card-info-fields {
  margin: 10px 0 14px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
}

.info-field-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.info-field-item i {
  color: var(--primary);
  width: 14px;
  text-align: center;
  font-size: 0.95rem;
}

.order-card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: -6px;
  margin-bottom: 10px;
}

/* Completed Order Card Styling */
.order-card.completed {
  border-color: rgba(34, 197, 94, 0.55);
  background: linear-gradient(145deg, rgba(34,197,94,0.08) 0%, var(--bg-card) 60%);
  opacity: 0.88;
}

.order-card.completed::before {
  background: linear-gradient(90deg, #22c55e, #10b981);
  opacity: 1;
}

.order-card.completed:hover {
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.75);
  opacity: 1;
}

.order-ctrl-btn.toggle-complete {
  color: var(--text-secondary);
}

.order-card.completed .order-ctrl-btn.toggle-complete {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.08);
}

.order-ctrl-btn.toggle-complete:hover {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.08);
}

/* РІвЂўС’РІвЂўС’РІвЂўС’ Orders Filter Tabs РІвЂўС’РІвЂўС’РІвЂўС’ */
.orders-filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 5px;
}

.orders-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.orders-tab:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-primary);
}

.orders-tab.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 3px 12px rgba(99, 102, 241, 0.35);
}

.orders-tab#tab-completed.active {
  background: linear-gradient(135deg, #22c55e, #10b981);
  box-shadow: 0 3px 12px rgba(34, 197, 94, 0.35);
}

.orders-tab#tab-all.active {
  background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: 0 3px 12px rgba(100, 116, 139, 0.35);
}

/* === Map Button === */
.btn-map-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1.5px solid rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.08);
  color: #6366f1;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-map-toggle:hover {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.7);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.22);
}

/* === Orders Map Modal === */
.orders-map-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: stretch;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.orders-map-inner {
  background: var(--bg-main);
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  overflow: hidden;
}
@media (min-width: 600px) {
  .orders-map-inner {
    margin: 20px;
    border-radius: 20px;
    max-height: calc(100vh - 40px);
  }
}
.orders-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
}
.orders-map-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 0;
}
.orders-leaflet-map {
  flex: 1;
  min-height: 340px;
  z-index: 1;
}
.orders-map-card-panel {
  width: 280px;
  overflow-y: auto;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  flex-shrink: 0;
  animation: slideInRight 0.2s ease;
}
@keyframes slideInRight {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.map-card-panel-inner {
  padding: 16px;
}
.orders-map-status {
  padding: 8px 16px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 34px;
}

/* Map popup order mini-card */
.map-popup-card {
  font-family: 'Inter', sans-serif;
  min-width: 180px;
}
.map-popup-card h4 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
}
.map-popup-card p {
  margin: 3px 0;
  font-size: 0.78rem;
  color: #475569;
}
.map-popup-open-btn {
  margin-top: 8px;
  width: 100%;
  padding: 6px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

/* Side panel order card in map */
.map-side-order-card {
  border-radius: 12px;
  border: 1.5px solid var(--border);
  padding: 14px;
  background: var(--bg-main);
}
.map-side-order-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px;
}
.map-side-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.map-side-field i { color: #6366f1; margin-top: 2px; flex-shrink: 0; }
.map-side-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.map-side-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: 'Inter', sans-serif;
  transition: all 0.18s;
  text-decoration: none;
}
.map-side-btn-phone {
  background: rgba(34,197,94,0.12);
  color: #16a34a;
  border: 1.5px solid rgba(34,197,94,0.3);
}
.map-side-btn-waze {
  background: rgba(99,102,241,0.1);
  color: #6366f1;
  border: 1.5px solid rgba(99,102,241,0.3);
}
.map-side-btn-close {
  background: rgba(100,116,139,0.1);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.map-close-panel-btn {
  width: 100%;
  margin-top: 10px;
  padding: 7px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

/* === Map Loading Overlay === */
.orders-map-loading {
  position: absolute;
  inset: 0;
  z-index: 500;
  background: rgba(var(--bg-main-rgb, 15,15,30), 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}
.orders-map-loading.hidden {
  opacity: 0;
  pointer-events: none;
}
.map-loading-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px 24px;
  text-align: center;
  max-width: 280px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  animation: slideUp 0.25s ease;
}
.map-loading-spinner {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.map-spin-arc {
  transform-origin: center;
  animation: mapSpin 1.1s linear infinite;
}
@keyframes mapSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.map-loading-pin-icon {
  position: absolute;
  font-size: 1.5rem;
  color: #6366f1;
  animation: mapPinPulse 1.1s ease-in-out infinite;
}
@keyframes mapPinPulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.18); opacity: 0.8; }
}
.map-loading-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.map-loading-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0 0 16px;
  min-height: 1.2em;
  transition: all 0.2s;
}
.map-loading-bar-wrap {
  height: 6px;
  background: rgba(99,102,241,0.12);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 14px;
}
.map-loading-bar {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(99,102,241,0.5);
}
.map-loading-hint {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin: 0;
  opacity: 0.6;
}
