:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-accent: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-yellow: #facc15;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --radius: 12px;
  --transition: 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: relative;
  transition: var(--transition);
}
.sidebar.collapsed {
  width: 70px;
}
.sidebar .logo {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 32px;
}
.sidebar .menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--text-secondary);
  transition: var(--transition);
}
.sidebar .menu-item:hover,
.sidebar .menu-item.active {
  background: var(--bg-accent);
  color: var(--text-primary);
}
.sidebar .menu-icon {
  width: 18px;
  height: 18px;
}
.sidebar.collapsed .label {
  display: none;
}
.sidebar.collapsed .menu-item {
  justify-content: center;
}
.sidebar .divider {
  height: 1px;
  background: var(--bg-accent);
  margin: 20px 0;
}

.main {
  flex: 1;
  padding: 32px;
  background: var(--bg-primary);
  overflow-x: hidden;
}

.header {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
}

.card {
  background: var(--bg-secondary);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.card-title {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.card-value {
  font-size: 20px;
  font-weight: bold;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.table-wrapper {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
thead {
  background: var(--bg-accent);
}
th, td {
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--bg-accent);
}
tbody tr:hover {
  background: rgba(255,255,255,0.03);
}
td.green {
  color: var(--accent-green);
}
td.red {
  color: var(--accent-red);
}

.button {
  background: var(--accent-blue);
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}
.button:hover {
  background: #2563eb;
}
.button.green { background: var(--accent-green); }
.button.red   { background: var(--accent-red); }
.button.gray  { background: var(--bg-accent); color: var(--text-secondary); }

.input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: none;
  background: var(--bg-accent);
  color: var(--text-primary);
  margin-bottom: 12px;
}

.label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

select {
  background: var(--bg-accent);
  color: var(--text-primary);
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 12px;
}

.tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}
.tab {
  padding: 10px 18px;
  background: var(--bg-accent);
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.tab.active,
.tab:hover {
  background: var(--accent-blue);
  color: white;
}

.switch-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.switch {
  position: relative;
  width: 38px;
  height: 20px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: var(--bg-accent);
  transition: .4s;
  border-radius: 20px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--accent-green);
}
input:checked + .slider:before {
  transform: translateX(18px);
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.status-green  { background: var(--accent-green); }
.status-yellow { background: var(--accent-yellow); }
.status-red    { background: var(--accent-red); }

.icon-colored.blue    { color: #3b82f6; }
.icon-colored.green   { color: #10b981; }
.icon-colored.red     { color: #ef4444; }
.icon-colored.purple  { color: #8b5cf6; }
.icon-colored.orange  { color: #f97316; }
.icon-colored.cyan    { color: #06b6d4; }
.icon-colored.gray    { color: #64748b; }
.icon-colored.pink    { color: #ec4899; }

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main {
    padding: 16px;
  }
}
