:root {
  --primary-color: #ff6b35;
  --secondary-color: #f7931e;
  --dark-bg: #1a1a2e;
  --light-bg: #f8f9fa;
  --app-bg: #f3f5fb;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --text-color: #111827;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.12);
  --radius-md: 12px;
  --radius-lg: 16px;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}

.app-shell {
  color: var(--text-color);
  background: var(--app-bg);
  line-height: 1.5;
}

.app-shell .btn {
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease,
    color 0.2s ease, border-color 0.2s ease;
}

.app-shell .btn-primary {
  background-color: #f07a4f;
  border: 1px solid #ea6f43;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 15px rgba(146, 58, 24, 0.18);
}

.app-shell .btn-primary:hover {
  background-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-color: #ff6b35;
  color: #fff;
  filter: brightness(0.98) saturate(1.05);
}

.app-shell .btn-primary:active {
  transform: translateY(0);
  filter: brightness(0.96) saturate(1.02);
}

.app-shell .btn-outline-secondary {
  border-color: rgba(148, 163, 184, 0.5);
  color: #475569;
}

.app-shell .btn-outline-secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(255, 107, 53, 0.06);
}

.app-shell .btn:focus,
.app-shell .btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.18);
}

.app-shell .btn:active {
  box-shadow: none;
}

.app-shell .btn-outline-primary {
  border-color: rgba(255, 107, 53, 0.5);
  color: var(--primary-color);
}

.app-shell .btn-outline-primary:hover {
  border-color: var(--primary-color);
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.app-shell .btn-outline-danger {
  border-color: rgba(220, 38, 38, 0.5);
  color: #dc2626;
}

.app-shell .btn-outline-danger:hover {
  border-color: #dc2626;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.app-shell .card,
.app-shell .dashboard-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}

.app-shell .card-header {
  border-bottom: 1px solid var(--border-color);
  background: var(--surface);
}

.app-shell .form-control,
.app-shell .form-select {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-shell .form-control:focus,
.app-shell .form-select:focus {
  border-color: rgba(255, 107, 53, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.12);
}

.app-shell .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.app-shell .table {
  color: var(--text-color);
}

.app-shell .table thead th {
  background: var(--surface-alt);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.app-shell .table tbody td {
  border-color: var(--border-color);
}

.app-shell .table tbody tr:hover {
  background: rgba(255, 107, 53, 0.05);
}

.app-shell .badge.bg-secondary {
  background: rgba(148, 163, 184, 0.2) !important;
  color: #475569;
}

.app-shell .alert {
  border-radius: var(--radius-md);
}

/* Zapobieganie scrollowi na stronach auth (logowanie/rejestracja) */
body.auth-page {
  overflow: hidden;
  height: 100vh;
}

body.auth-page #hero {
  min-height: auto;
  height: 100vh;
  overflow: hidden;
}

/* Navigation */
.navbar {
  background-color: rgba(26, 26, 46, 0.95) !important;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--primary-color) !important;
}

.nav-link {
  color: #fff !important;
  margin: 0 10px;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

/* Tabs */
.nav-tabs .nav-link {
  color: #6c757d !important;
  background-color: transparent;
  border: 1px solid transparent;
}

.nav-tabs .nav-link:hover {
  color: var(--primary-color) !important;
  border-color: #dee2e6 #dee2e6 #fff;
}

.nav-tabs .nav-link.active {
  color: #212529 !important;
  background-color: #fff;
  border-color: #dee2e6 #dee2e6 #fff;
}

/* Hero Section */
#hero {
  background: linear-gradient(135deg, var(--dark-bg) 0%, #16213e 100%);
  color: white;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* Animated Dots Background */
.dots-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.dot {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0;
  animation: float-up 20s linear infinite;
}

@keyframes float-up {
  0% {
    transform: translateY(100vh);
    opacity: 0;
  }
  5% {
    opacity: 0.3;
  }
  95% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-10vh);
    opacity: 0;
  }
}

/* Create a grid of dots with different properties */
.dot:nth-child(1) {
  left: 5%;
  animation-delay: 0s;
  animation-duration: 18s;
  width: 2px;
  height: 2px;
}
.dot:nth-child(2) {
  left: 82%;
  animation-delay: 0.3s;
  animation-duration: 22s;
}
.dot:nth-child(3) {
  left: 15%;
  animation-delay: 0.7s;
  animation-duration: 20s;
  width: 4px;
  height: 4px;
  opacity: 0.2;
}
.dot:nth-child(4) {
  left: 67%;
  animation-delay: 1.1s;
  animation-duration: 19s;
}
.dot:nth-child(5) {
  left: 91%;
  animation-delay: 1.4s;
  animation-duration: 21s;
  width: 2px;
  height: 2px;
}
.dot:nth-child(6) {
  left: 23%;
  animation-delay: 1.8s;
  animation-duration: 23s;
}
.dot:nth-child(7) {
  left: 44%;
  animation-delay: 2.2s;
  animation-duration: 18s;
  opacity: 0.25;
}
.dot:nth-child(8) {
  left: 76%;
  animation-delay: 2.5s;
  animation-duration: 20s;
  width: 3px;
  height: 3px;
}
.dot:nth-child(9) {
  left: 12%;
  animation-delay: 2.9s;
  animation-duration: 22s;
}
.dot:nth-child(10) {
  left: 58%;
  animation-delay: 3.3s;
  animation-duration: 19s;
  width: 2px;
  height: 2px;
}
.dot:nth-child(11) {
  left: 31%;
  animation-delay: 3.6s;
  animation-duration: 21s;
}
.dot:nth-child(12) {
  left: 88%;
  animation-delay: 4s;
  animation-duration: 20s;
  opacity: 0.35;
}
.dot:nth-child(13) {
  left: 7%;
  animation-delay: 4.4s;
  animation-duration: 18s;
  width: 4px;
  height: 4px;
}
.dot:nth-child(14) {
  left: 49%;
  animation-delay: 4.7s;
  animation-duration: 22s;
}
.dot:nth-child(15) {
  left: 73%;
  animation-delay: 5.1s;
  animation-duration: 19s;
  width: 2px;
  height: 2px;
}
.dot:nth-child(16) {
  left: 19%;
  animation-delay: 5.5s;
  animation-duration: 23s;
}
.dot:nth-child(17) {
  left: 63%;
  animation-delay: 5.8s;
  animation-duration: 20s;
  opacity: 0.2;
}
.dot:nth-child(18) {
  left: 37%;
  animation-delay: 6.2s;
  animation-duration: 21s;
  width: 3px;
  height: 3px;
}
.dot:nth-child(19) {
  left: 94%;
  animation-delay: 6.6s;
  animation-duration: 19s;
}
.dot:nth-child(20) {
  left: 3%;
  animation-delay: 6.9s;
  animation-duration: 24s;
}
.dot:nth-child(21) {
  left: 54%;
  animation-delay: 7.3s;
  animation-duration: 18s;
  width: 2px;
  height: 2px;
}
.dot:nth-child(22) {
  left: 26%;
  animation-delay: 7.7s;
  animation-duration: 20s;
}
.dot:nth-child(23) {
  left: 71%;
  animation-delay: 8s;
  animation-duration: 22s;
  opacity: 0.25;
}
.dot:nth-child(24) {
  left: 41%;
  animation-delay: 8.4s;
  animation-duration: 19s;
  width: 4px;
  height: 4px;
}
.dot:nth-child(25) {
  left: 85%;
  animation-delay: 8.8s;
  animation-duration: 21s;
}
.dot:nth-child(26) {
  left: 9%;
  animation-delay: 9.1s;
  animation-duration: 20s;
}
.dot:nth-child(27) {
  left: 61%;
  animation-delay: 9.5s;
  animation-duration: 23s;
  width: 2px;
  height: 2px;
}
.dot:nth-child(28) {
  left: 34%;
  animation-delay: 9.9s;
  animation-duration: 18s;
}
.dot:nth-child(29) {
  left: 78%;
  animation-delay: 10.2s;
  animation-duration: 22s;
  opacity: 0.3;
}
.dot:nth-child(30) {
  left: 17%;
  animation-delay: 10.6s;
  animation-duration: 19s;
  width: 3px;
  height: 3px;
}
.dot:nth-child(31) {
  left: 52%;
  animation-delay: 11s;
  animation-duration: 20s;
}
.dot:nth-child(32) {
  left: 96%;
  animation-delay: 11.3s;
  animation-duration: 21s;
  width: 2px;
  height: 2px;
}
.dot:nth-child(33) {
  left: 22%;
  animation-delay: 11.7s;
  animation-duration: 18s;
  opacity: 0.25;
}
.dot:nth-child(34) {
  left: 69%;
  animation-delay: 12.1s;
  animation-duration: 23s;
}
.dot:nth-child(35) {
  left: 38%;
  animation-delay: 12.4s;
  animation-duration: 19s;
  width: 4px;
  height: 4px;
}
.dot:nth-child(36) {
  left: 84%;
  animation-delay: 12.8s;
  animation-duration: 20s;
}
.dot:nth-child(37) {
  left: 11%;
  animation-delay: 13.2s;
  animation-duration: 22s;
  width: 3px;
  height: 3px;
}
.dot:nth-child(38) {
  left: 56%;
  animation-delay: 13.5s;
  animation-duration: 18s;
}
.dot:nth-child(39) {
  left: 29%;
  animation-delay: 13.9s;
  animation-duration: 21s;
  opacity: 0.2;
}
.dot:nth-child(40) {
  left: 75%;
  animation-delay: 14.3s;
  animation-duration: 19s;
}
.dot:nth-child(41) {
  left: 46%;
  animation-delay: 14.6s;
  animation-duration: 23s;
  width: 2px;
  height: 2px;
}
.dot:nth-child(42) {
  left: 87%;
  animation-delay: 15s;
  animation-duration: 20s;
}
.dot:nth-child(43) {
  left: 14%;
  animation-delay: 15.4s;
  animation-duration: 18s;
  opacity: 0.35;
}
.dot:nth-child(44) {
  left: 64%;
  animation-delay: 15.7s;
  animation-duration: 22s;
  width: 3px;
  height: 3px;
}
.dot:nth-child(45) {
  left: 32%;
  animation-delay: 16.1s;
  animation-duration: 19s;
}
.dot:nth-child(46) {
  left: 92%;
  animation-delay: 16.5s;
  animation-duration: 21s;
  width: 4px;
  height: 4px;
}
.dot:nth-child(47) {
  left: 6%;
  animation-delay: 16.8s;
  animation-duration: 20s;
}
.dot:nth-child(48) {
  left: 59%;
  animation-delay: 17.2s;
  animation-duration: 23s;
  opacity: 0.25;
}
.dot:nth-child(49) {
  left: 25%;
  animation-delay: 17.6s;
  animation-duration: 18s;
  width: 2px;
  height: 2px;
}
.dot:nth-child(50) {
  left: 81%;
  animation-delay: 17.9s;
  animation-duration: 22s;
}
.dot:nth-child(51) {
  left: 43%;
  animation-delay: 18.3s;
  animation-duration: 19s;
}
.dot:nth-child(52) {
  left: 72%;
  animation-delay: 18.7s;
  animation-duration: 21s;
  width: 3px;
  height: 3px;
}
.dot:nth-child(53) {
  left: 18%;
  animation-delay: 19s;
  animation-duration: 20s;
  opacity: 0.3;
}
.dot:nth-child(54) {
  left: 66%;
  animation-delay: 19.4s;
  animation-duration: 18s;
}
.dot:nth-child(55) {
  left: 35%;
  animation-delay: 19.8s;
  animation-duration: 23s;
  width: 2px;
  height: 2px;
}
.dot:nth-child(56) {
  left: 89%;
  animation-delay: 20.1s;
  animation-duration: 19s;
}
.dot:nth-child(57) {
  left: 13%;
  animation-delay: 20.5s;
  animation-duration: 22s;
  width: 4px;
  height: 4px;
}
.dot:nth-child(58) {
  left: 53%;
  animation-delay: 20.9s;
  animation-duration: 20s;
}
.dot:nth-child(59) {
  left: 77%;
  animation-delay: 21.2s;
  animation-duration: 21s;
  opacity: 0.2;
}
.dot:nth-child(60) {
  left: 21%;
  animation-delay: 21.6s;
  animation-duration: 18s;
  width: 3px;
  height: 3px;
}

/* Some dots with different colors */
.dot:nth-child(odd) {
  background: var(--primary-color);
}

.dot:nth-child(even) {
  background: var(--secondary-color);
}

.dot:nth-child(3n) {
  background: #ff4757;
}

#hero .container {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Feature Cards */
.feature-card {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

/* Stats Section */
#stats {
  background-color: var(--light-bg);
  padding: 80px 0;
}

.stat-card {
  text-align: center;
  padding: 30px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Device Section */
.device-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.device-card:hover {
  transform: scale(1.03);
}

.device-header {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 20px;
  text-align: center;
}

/* Dashboard Preview */
.dashboard-preview {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.chart-container {
  position: relative;
  height: 300px;
  margin: 20px 0;
}

/* CTA Section */
#cta {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 80px 0;
  text-align: center;
}

.btn-custom {
  background-color: white;
  color: var(--primary-color);
  padding: 15px 40px;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  border: none;
}

.btn-custom:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-primary-custom {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 15px 40px;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  border: none;
}

/* Footer */
footer {
  background-color: var(--dark-bg);
  color: white;
  padding: 40px 0 20px;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Blob Animation - removed duplicate */

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-menu {
  position: relative;
}

.user-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.user-dropdown-toggle:hover {
  background-color: var(--light-bg);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--dark-bg);
}

/* App shell (dashboard) */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  color: #fff;
  padding: 20px 18px;
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 1050;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.sidebar-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
  margin: 12px 10px 6px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #e5e7eb;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-item.active {
  background: rgba(255, 107, 53, 0.2);
  color: #fff;
}

.sidebar-item.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 12px 0;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1040;
}

.sidebar.active + .sidebar-overlay,
.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.main-content {
  margin-left: 260px;
  min-height: 100vh;
  background: var(--app-bg);
  padding: 0;
}

.top-nav {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: #111827;
  align-items: center;
  justify-content: center;
}

.menu-toggle i {
  font-size: 1.4rem;
}

.breadcrumb {
  margin: 0;
  padding: 0;
  background: transparent;
  font-size: 0.9rem;
}

.app-shell .breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  line-height: 1.2;
}

.app-shell .breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: rgba(100, 116, 139, 0.6);
  padding: 0 6px 0 4px;
}

.app-shell .breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.app-shell .breadcrumb-item a:hover {
  color: var(--primary-color);
}

.app-shell .breadcrumb-item.active {
  color: var(--text-color);
  font-weight: 600;
  padding-bottom: 2px;
  background-image: linear-gradient(
    to right,
    rgba(255, 107, 53, 0.35),
    rgba(255, 107, 53, 0.05)
  );
  background-size: calc(100% - 10px) 2px;
  background-repeat: no-repeat;
  background-position: left 10px bottom;
}

.dashboard-content {
  padding: 22px 24px 32px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.dashboard-content .stat-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.18), rgba(247, 147, 30, 0.12));
  color: var(--primary-color);
  font-size: 1.25rem;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.stat-change {
  font-size: 0.9rem;
  font-weight: 600;
}

.stat-change.positive {
  color: #16a34a;
}

.stat-change.negative {
  color: #dc2626;
}

.chart-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(148, 163, 184, 0.2);
  height: 100%;
}

.chart-title {
  font-size: 1rem;
  margin: 0;
}

.chart-container {
  position: relative;
  height: 320px;
}

.chart-container--tall {
  height: 420px;
}

.chart-container--prediction {
  height: 260px;
}

@media (max-width: 768px) {
  .chart-container--tall {
    height: 320px;
  }

  .chart-container--prediction {
    height: 220px;
  }
}

.chart-card--auto {
  height: auto;
}

.prediction-table {
  overflow-x: auto;
}

.prediction-table table {
  min-width: 640px;
}

.device-list .device-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.device-info {
  display: flex;
  gap: 12px;
  align-items: center;
}

.device-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  display: grid;
  place-items: center;
  color: var(--primary-color);
}

.device-details h6 {
  margin: 0;
  font-size: 1rem;
}

.device-details p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.device-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #475569;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: #9ca3af;
}

.status-dot.online {
  background: #16a34a;
}

.status-dot.offline {
  background: #dc2626;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-dark {
  border-radius: var(--radius-md);
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .top-nav {
    padding: 0 16px;
  }

  .menu-toggle {
    display: inline-flex;
    margin-right: 12px;
  }
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  min-width: 200px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.dropdown-item:hover {
  background-color: var(--surface-alt);
  color: var(--primary-color);
}

.dropdown-item i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 8px 0;
}

/* ============================================
   AUTH PAGES - LOGIN & REGISTER
   ============================================ */

.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  width: 100%;
  max-width: 1200px;
}

/* Info Section - Left Side */
.auth-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
}

@media (max-width: 991.98px) {
  .auth-info {
    display: none;
  }
  .auth-wrapper {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.auth-title {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 15px;
}

.auth-title i {
  color: var(--primary-color);
  font-size: 3.5rem;
}

.auth-description {
  font-size: 1.1rem;
  opacity: 0.85;
  line-height: 1.8;
  margin-bottom: 30px;
}

.auth-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.auth-feature {
  padding: 15px;
  background: rgba(255, 107, 53, 0.1);
  border-left: 3px solid var(--primary-color);
  border-radius: 5px;
  transition: all 0.3s ease;
}

.auth-feature:hover {
  background: rgba(255, 107, 53, 0.15);
  transform: translateX(5px);
}

.auth-feature i {
  color: var(--primary-color);
  font-size: 1.5rem;
  display: block;
  margin-bottom: 10px;
}

.auth-feature h5 {
  color: white;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Form Section - Right Side */
.auth-form-wrapper {
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 991.98px) {
  .auth-form-wrapper {
    padding: 20px;
  }
}

.auth-form-container {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.95);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  overflow: visible;
}

.auth-form-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-form-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  display: block;
  margin-bottom: 15px;
}

.auth-form-title {
  font-weight: bold;
  color: var(--dark-bg);
  margin: 0;
  font-size: 1.75rem;
}

.auth-form-subtitle {
  color: #666;
  font-size: 0.95rem;
  margin-top: 5px;
}

.auth-form-content {
  margin-bottom: 25px;
  position: relative;
}

/* Zapobieganie scrollowi przy wtyczkach do pól formularza (np. 1Password) */
.auth-form-content input {
  position: relative;
}

.auth-form-content .form-group {
  position: relative;
  overflow: visible;
}

.auth-divider {
  border-color: #e0e0e0;
  margin: 25px 0;
}

.auth-footer {
  text-align: center;
}

.auth-footer-text {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.auth-footer-link {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.auth-footer-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 107, 53, 0.3);
  color: white;
  text-decoration: none;
}

.auth-footer-link:active {
  transform: translateY(0);
}

/* Form Styles */
.auth-form-content form {
  width: 100%;
}

.auth-form-content .form-group {
  margin-bottom: 20px;
}

.auth-form-content label {
  display: block;
  margin-bottom: 8px;
  color: var(--dark-bg);
  font-weight: 500;
  font-size: 0.95rem;
}

.auth-form-content input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.auth-form-content input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
  background-color: rgba(255, 107, 53, 0.02);
}

.auth-form-content input::placeholder {
  color: #999;
}

.auth-form-content button {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-form-content button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 107, 53, 0.3);
}

.auth-form-content button:active {
  transform: translateY(0);
}

/* Dashboard Styles */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-title {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.75rem;
}

.dashboard-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.18), rgba(247, 147, 30, 0.12));
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 1;
}

/* Specific colors for stat cards based on icon context if needed, 
   but for now we use generic primary or adjust via inline style or specific classes */

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    line-height: 1.2;
    z-index: 1;
    white-space: nowrap;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1;
}

.dashboard-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: none;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.dashboard-card .card-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-card .card-title {
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    font-size: 1.1rem;
}

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

/* Modern Table Overrides */
.table-modern thead th {
    background: var(--surface-alt);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
    padding: 1rem;
    border-top: none;
}

.table-modern tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

/* Alert list */
.alert-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.alert-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.alert-item:last-child {
    border-bottom: none;
}

.alert-item:hover {
    background-color: var(--surface-alt);
}

.alert-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.alert-icon-wrapper.critical {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.alert-icon-wrapper.warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

/* Shortcuts Grid */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.shortcut-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: #475569;
    transition: all 0.2s;
    text-align: center;
}

.shortcut-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(255, 107, 53, 0.06);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.shortcut-btn i {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.shortcut-btn span {
    font-weight: 600;
    font-size: 0.85rem;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    transition: all 0.2s ease;
    background: #f8f9fa;
    cursor: pointer;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary-color, #ff6b35);
    background: rgba(255, 107, 53, 0.05);
}
.upload-icon {
    font-size: 3rem;
    color: #adb5bd;
    transition: color 0.2s;
}
.upload-zone:hover .upload-icon {
    color: var(--primary-color, #ff6b35);
}
