/* -------------------------------------------------------
   EcoBike Admin – refreshed Apple-inspired design system
   ------------------------------------------------------- */

:root {
  /* Brand palette */
  --brand-primary: #0dba7d;
  --brand-primary-dark: #01895b;
  --brand-primary-light: #5fdeab;
  --brand-primary-muted: #e3f7ed;
  --brand-primary-soft: rgba(13, 186, 125, 0.12);

  /* Accents */
  --accent-blue: #1c73e8;
  --accent-blue-dark: #1557aa;
  --accent-amber: #ffb347;

  /* Neutral scale */
  --neutral-50: #f5f7f5;
  --neutral-100: #ebf3ee;
  --neutral-200: #d9e6dd;
  --neutral-300: #c3d6cb;
  --neutral-500: #5b6b63;
  --neutral-700: #2f3c35;

  /* Effects */
  --border-radius: 16px;
  --border-radius-lg: 22px;
  --border-soft: 1px solid var(--neutral-200);
  --shadow-soft: 0 12px 30px rgba(18, 74, 48, 0.14);
  --shadow-strong: 0 24px 48px rgba(12, 58, 38, 0.18);
  --backdrop-blur: blur(18px);

  --font-sf:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto,
    sans-serif;
}

/* -------------------
   Language Switcher
   ------------------- */

.language-switcher {
  position: relative;
  display: inline-block;
}

.language-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  min-width: 120px;
}

.language-button:hover {
  background: #f5f5f5;
  border-color: #007bff;
}

.language-button .flag {
  font-size: 1.2rem;
}

.language-button .language-name {
  flex: 1;
  text-align: left;
}

.language-button .arrow {
  font-size: 0.8rem;
  transition: transform 0.2s;
  color: #666;
}

.language-button .arrow.open {
  transform: rotate(180deg);
}

.language-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 4px;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
  text-align: left;
}

.language-option:hover {
  background: #f5f5f5;
}

.language-option.active {
  background: #e3f2fd;
  color: #007bff;
}

.language-option:first-child {
  border-radius: 6px 6px 0 0;
}

.language-option:last-child {
  border-radius: 0 0 6px 6px;
}

.language-option .flag {
  font-size: 1.2rem;
}

.language-option .language-name {
  flex: 1;
}

body {
  font-family: var(--font-sf);
  margin: 0;
  padding: 0;
  background: linear-gradient(
    160deg,
    var(--neutral-50) 0%,
    var(--brand-primary-muted) 60%,
    #eef8f2 100%
  );
  color: var(--neutral-700);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0 0 16px;
  font-weight: 600;
  color: var(--neutral-700);
}

h1 {
  font-size: 34px;
  letter-spacing: -0.4px;
}
h2 {
  font-size: 28px;
  letter-spacing: -0.2px;
}
h3 {
  font-size: 22px;
}

p {
  font-size: 17px;
  margin: 0 0 16px;
  color: var(--neutral-500);
}

/* -----------------
   Sidebar navigation
   ----------------- */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 280px;
  background: linear-gradient(
    170deg,
    rgba(9, 121, 70, 0.97) 0%,
    rgba(2, 78, 55, 0.98) 100%
  );
  color: white;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
  box-shadow: var(--shadow-strong);
  z-index: 1000;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 20% 20%,
    rgba(95, 222, 171, 0.28),
    transparent 55%
  );
  pointer-events: none;
}

.sidebar.collapsed {
  width: 72px;
}

.sidebar-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(20px);
  padding: 1.6rem 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 1;
}

.sidebar-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin: 0;
}

.sidebar-subtitle {
  margin: -4px 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.collapse-btn {
  align-self: flex-end;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.collapse-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(2px);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0 2rem;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 1.4rem;
  padding: 0 1.1rem;
}

.section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 0.6rem;
  color: rgba(255, 255, 255, 0.55);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.nav-list li a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-list li a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.nav-list li.active a {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.nav-icon {
  width: 26px;
  text-align: center;
  font-size: 1.25rem;
}

.nav-label {
  font-size: 0.95rem;
  font-weight: 500;
}

.sidebar-footer {
  padding: 1.2rem 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.logout-btn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ----------------
   Main content area
   ---------------- */

.main-content {
  margin-left: 280px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
  overflow: hidden;
}

.main-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2.4rem;
  margin: 1.8rem 2.4rem 0;
  border-radius: var(--border-radius-lg);
  border: var(--border-soft);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: var(--backdrop-blur);
  box-shadow: var(--shadow-soft);
}

.main-header h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--neutral-700);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  background: var(--brand-primary-muted);
  border: 1px solid rgba(13, 186, 125, 0.25);
  color: var(--brand-primary-dark);
  font-size: 0.92rem;
  font-weight: 600;
}

.content-wrapper {
  flex: 1;
  padding: 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: 0;
  overflow-y: auto;
}

.page,
.container {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  width: 100%;
}

.page.wide,
.container.wide {
  gap: 2.4rem;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--neutral-700);
}

.page-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--neutral-500);
  letter-spacing: 0.2px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ---------------
   Card components
   --------------- */

.card {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--border-radius);
  padding: 28px;
  border: var(--border-soft);
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  backdrop-filter: blur(14px);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
}

.card.card-muted {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--neutral-500);
}

.card.card-muted strong {
  color: var(--neutral-700);
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 28px;
}

.metric-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.metric-value {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--neutral-700);
}

.metric-label {
  font-size: 0.95rem;
  color: var(--neutral-500);
}

/* -----------
   Buttons
   ----------- */

.btn,
button {
  font-family: var(--font-sf);
  font-size: 16px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary,
.btn-refresh {
  background: linear-gradient(
    135deg,
    var(--brand-primary) 0%,
    var(--brand-primary-dark) 100%
  );
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(13, 186, 125, 0.24);
}

.btn-primary:hover,
.btn-refresh:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(13, 186, 125, 0.28);
}

.btn-secondary {
  background: var(--brand-primary-muted);
  color: var(--brand-primary-dark);
  border: 1px solid rgba(13, 186, 125, 0.3);
}

.btn-secondary:hover {
  background: rgba(13, 186, 125, 0.18);
}

.btn-danger {
  background: linear-gradient(135deg, #ff4f44 0%, #d9212a 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(255, 79, 68, 0.22);
}

.btn-success {
  background: linear-gradient(
    135deg,
    var(--brand-primary) 0%,
    var(--brand-primary-dark) 100%
  );
  color: white;
}

/* -------
   Forms
   ------- */

input,
textarea,
select {
  font-family: var(--font-sf);
  font-size: 16px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--neutral-200);
  background: rgba(255, 255, 255, 0.95);
  transition:
    border 0.2s ease,
    box-shadow 0.2s ease;
  width: 100%;
  margin-bottom: 18px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(13, 186, 125, 0.22);
}

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.92);
  border: var(--border-soft);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
}

.filters-bar input,
.filters-bar select {
  margin-bottom: 0;
  min-width: 200px;
  flex: 1 1 200px;
}

.filters-bar__spacer {
  margin-left: auto;
  font-size: 0.95rem;
  color: var(--neutral-500);
}

.filters-bar__spacer b {
  color: var(--neutral-700);
}

/* -------
   Tables
   ------- */

.table-shell {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 20px;
  border: var(--border-soft);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.table-shell table {
  background: transparent;
  box-shadow: none;
  border: none;
  min-width: 960px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: var(--border-soft);
}

th {
  background: var(--neutral-100);
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  color: var(--neutral-700);
  border-bottom: 1px solid var(--neutral-200);
}

td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--neutral-200);
  color: var(--neutral-500);
}

tr:hover {
  background: rgba(13, 186, 125, 0.05);
}

/* Status chips */
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.status-active,
.status-charged {
  background: rgba(13, 186, 125, 0.12);
  color: var(--brand-primary-dark);
}

.status-inactive,
.status-discharged {
  background: rgba(255, 179, 71, 0.16);
  color: #ba7300;
}

.status-error {
  background: rgba(255, 79, 68, 0.18);
  color: #c92026;
}

/* ---------
   Auth page
   --------- */

.login-container {
  max-width: 420px;
  margin: 8vh auto;
  padding: 44px 40px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 28px;
  border: var(--border-soft);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(20px);
}

.login-container h1 {
  text-align: center;
  margin-bottom: 28px;
  color: var(--neutral-700);
}

.login-error {
  background: rgba(255, 79, 68, 0.12);
  color: #c92026;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 79, 68, 0.2);
  text-align: center;
  font-size: 15px;
  margin-bottom: 18px;
}

/* --------
   Loading
   -------- */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
}

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(13, 186, 125, 0.18);
  border-top: 3px solid var(--brand-primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ---------
   Animations
   --------- */

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in {
  animation: slideIn 0.28s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* -------------
   Responsiveness
   ------------- */

@media (max-width: 1200px) {
  .sidebar {
    width: 240px;
  }
  .main-content {
    margin-left: 240px;
  }
}

@media (max-width: 992px) {
  .sidebar {
    width: 72px;
  }
  .sidebar-header {
    align-items: center;
  }
  .sidebar-nav {
    padding-inline: 0.6rem;
  }
  .main-content {
    margin-left: 72px;
  }
  .main-header {
    margin: 1.6rem 1.6rem 0;
    padding: 1rem 1.6rem;
  }
  .content-wrapper {
    padding: 1.6rem;
  }
  .dashboard-cards {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    width: 240px;
    transform: translateX(-260px);
  }
  .sidebar.collapsed {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .content-wrapper {
    padding: 1.2rem 1rem;
  }
  .main-header {
    margin: 1.2rem 0 0;
    border-radius: var(--border-radius);
  }
  .dashboard-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-header {
    align-items: stretch;
  }
  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filters-bar__spacer {
    margin-left: 0;
  }
  .table-shell table {
    min-width: 720px;
  }
}

/* Современные стили для админки станций */

.stations-container {
  padding: 24px;
  background: #f8fafc;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Шапка */
.stations-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.stations-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

/* Кнопки */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: #3b82f6;
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background: #6b7280;
  color: white;
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.btn-secondary:hover {
  background: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-secondary:hover {
  background: #4b5563;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-success {
  background: #10b981;
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-warning {
  background: #f59e0b;
  color: white;
}

.btn-warning:hover {
  background: #d97706;
}

/* Фильтры и поиск */
.stations-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select {
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Контент */
.stations-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Список станций */
.stations-list {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 24px;
}

.stations-grid {
  display: grid;
  gap: 16px;
}

/* Карточка станции */
.station-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.station-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.station-card.selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px #3b82f6, 0 4px 12px rgba(59, 130, 246, 0.2);
}

.station-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.station-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-active {
  background: #d1fae5;
  color: #065f46;
}

.status-maintenance {
  background: #fef3c7;
  color: #92400e;
}

.status-offline {
  background: #fee2e2;
  color: #991b1b;
}

.status-full {
  background: #f3f4f6;
  color: #374151;
}

.station-info {
  margin-bottom: 16px;
}

.station-info .address {
  color: #6b7280;
  font-size: 14px;
  margin: 0 0 4px 0;
}

.station-info .city {
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

/* Статистика станции */
.station-stats {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
}

.stat-value.available {
  color: #10b981;
}

.stat-value.occupied {
  color: #f59e0b;
}

/* Превью ячеек */
.station-cells-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 16px;
}

.cell-preview {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.cell-preview.cell-empty {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
}

.cell-preview.cell-occupied {
  background: #10b981;
}

.cell-preview.cell-charging {
  background: #3b82f6;
}

.cell-preview.cell-maintenance {
  background: #ef4444;
}

.cell-preview.cell-reserved {
  background: #f59e0b;
}

/* Детали станции */
.station-details {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 24px;
  position: sticky;
  top: 24px;
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.details-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

/* Информация о станции */
.station-info-detailed {
  margin-bottom: 24px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item .label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item .value {
  font-size: 14px;
  color: #1e293b;
  font-weight: 500;
}

.info-item .value.status-active {
  color: #10b981;
}

.info-item .value.status-maintenance {
  color: #f59e0b;
}

.info-item .value.status-offline {
  color: #ef4444;
}

/* Особенности станции */
.station-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
}

.feature label {
  font-size: 14px;
  color: #374151;
  cursor: pointer;
}

/* Управление станцией */
.station-control {
  margin-bottom: 24px;
}

.station-control h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 16px 0;
}

.control-panel {
  background: #f8fafc;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid #e5e7eb;
}

.control-group {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.control-group label {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.cell-select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.command-status {
  margin-bottom: 12px;
}

.command-status strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #374151;
}

.command-info {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 14px;
}

.command-type {
  background: #3b82f6;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.command-cell {
  color: #6b7280;
}

.command-id {
  color: #9ca3af;
  font-size: 12px;
}

.no-command {
  color: #6b7280;
  font-size: 14px;
}

/* Ячейки станции */
.station-cells h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 16px 0;
}

.cells-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.cell-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cell-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.cell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cell-number {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.cell-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.cell-status.empty {
  background: #f3f4f6;
  color: #6b7280;
}

.cell-status.occupied {
  background: #d1fae5;
  color: #065f46;
}

.cell-status.charging {
  background: #dbeafe;
  color: #1e40af;
}

.cell-status.maintenance {
  background: #fee2e2;
  color: #991b1b;
}

.cell-status.reserved {
  background: #fef3c7;
  color: #92400e;
}

.cell-battery {
  margin-top: 12px;
}

.battery-id {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
  word-break: break-all;
}

.battery-level {
  display: flex;
  align-items: center;
  gap: 8px;
}

.battery-level-bar {
  flex: 1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.battery-level-fill {
  height: 100%;
  background: #10b981;
  transition: width 0.3s ease;
}

.battery-level-text {
  font-size: 12px;
  color: #374151;
  font-weight: 500;
  min-width: 30px;
}

.cell-last-used {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 8px;
}

/* История команд */
.command-history {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.command-history h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 16px 0;
}

.history-list {
  max-height: 300px;
  overflow-y: auto;
}

.history-entry {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
}

.history-time {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
  font-weight: 500;
}

.history-details {
  font-size: 12px;
}

.history-before,
.history-after {
  margin-bottom: 8px;
  padding: 8px;
  background: white;
  border-radius: 4px;
  border-left: 3px solid #e5e7eb;
}

.history-before {
  border-left-color: #f59e0b;
}

.history-after {
  border-left-color: #10b981;
}

/* Модальные окна */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e5e7eb;
}

/* Формы */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

/* Детали ячейки в модальном окне */
.cell-details-modal .modal-content {
  max-width: 400px;
}

.cell-status-section,
.battery-info-section,
.cell-actions {
  margin-bottom: 24px;
}

.cell-status-section h3,
.battery-info-section h3,
.cell-actions h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 12px 0;
}

.status-display {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.status-display.empty {
  background: #f3f4f6;
  color: #6b7280;
}

.status-display.occupied {
  background: #d1fae5;
  color: #065f46;
}

.status-display.charging {
  background: #dbeafe;
  color: #1e40af;
}

.status-display.maintenance {
  background: #fee2e2;
  color: #991b1b;
}

.status-display.reserved {
  background: #fef3c7;
  color: #92400e;
}

.battery-details {
  background: #f8fafc;
  border-radius: 6px;
  padding: 12px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.detail-row:last-child {
  margin-bottom: 0;
}

.detail-row .label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.detail-row .value {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Адаптивность */
@media (max-width: 1024px) {
  .stations-content {
    grid-template-columns: 1fr;
  }
  
  .station-details {
    position: static;
  }
}

@media (max-width: 768px) {
  .stations-container {
    padding: 16px;
  }
  
  .stations-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .stations-filters {
    flex-direction: column;
  }
  
  .search-input {
    min-width: auto;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .station-features {
    grid-template-columns: 1fr;
  }
  
  .cells-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    width: 95%;
    margin: 16px;
  }
  
  .control-group {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Загрузка */
.loading {
  text-align: center;
  padding: 40px;
  color: #6b7280;
  font-size: 16px;
}

/* Скроллбары */
.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
