:root {
    --surface: #16181f;
    --surface2: #80828b;
    --border: #d2d4dd;
    --accent: #ff3366;
    --accent-dim: rgba(61,220,132,0.12);
    --accent-glow: rgba(61,220,132,0.3);
    --text-muted: #6b7080;
    --text-dim: #9499a8;
    --danger: #ff5f5f;
    --danger-dim: rgba(255,95,95,0.1);
    --sidebar-w: 220px;
    --radius: 12px;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }


.modal.in {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    position: relative;
    margin: auto;
    background-color: #fff;
    box-sizing: border-box;
    box-shadow: 0px 5px 58px rgba(0, 0, 0, 0.35);
    border-radius: 28px;
}

.modal-content .close {
    color: #000;
}
.modal-backdrop.in {
  opacity: 0.8;
}

.modal-backdrop {
  background: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(6px);
}

.modal-content {
  border: none;
  border-radius: 28px;
  padding: 40px 35px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  background: linear-gradient(180deg, #ffffff, #f8f9ff);
}

.modal-header {
  border-bottom: none;
  padding-bottom: 0;
  position: relative;
}

.auth-title {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 25px;
  color: #111;
}

.auth-title span {
  display: block;
  font-weight: 400;
  margin-top: 6px;
  color: #555;
  text-transform: none;
}

.modal-header .close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff2d55, #ff4d6d);
  color: #fff;
  opacity: 1;
  text-shadow: none;
  font-size: 20px;
  transition: 0.2s ease;
  z-index: 1000;
}

.modal-header .close:hover {
  transform: rotate(90deg);
  opacity: 1;
}

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

.auth-form label {
  font-size: 14px;
  color: #777;
  margin-bottom: 6px;
  display: block;
}

.auth-form .form-control {
  border-radius: 30px;
  padding: 14px 18px;
  border: 1px solid #ddd;
  box-shadow: none;
  transition: 0.2s ease;
}

.auth-form .form-control:focus {
  border-color: #ff4d6d;
  box-shadow: 0 0 0 4px rgba(123, 108, 246, 0.15);
}

/* Центрируем кнопку */
.auth-form .btn {
  display: block;
  margin: 25px auto 15px auto;
  min-width: 180px;
  border-radius: 30px;
  padding: 6px 25px;
  font-weight: 600;
}

/* Блок ссылок */
.auth-links {
  text-align: center;
  margin-top: 20px;
}

/* Ссылка "Забыли пароль?" */
.auth-links > a {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 14px;
  color: #ff2d55;
  transition: 0.2s ease;
}

/* Нижний текст */
.auth-links p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

/* Ссылка регистрации */
.auth-links p a {
  color: #ff2d55;
  font-weight: 600;
  margin-left: 4px;
  transition: 0.2s ease;
}

/* Hover эффект */
.auth-links a:hover {
  color: #ff6a88;
  text-decoration: none;
}

.optional {
  font-weight: 400;
  font-size: 13px;
  color: #999;
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #8a8a8a;
  opacity: 0.9;
}

#account-page {
    background: #23282f;
}

.account-installation {
  padding: 250px 0 120px;
}

.account-cards .row {
    display: flex;
    flex-wrap: wrap;
}

.account-cards .col-xs-12 {
    display: flex;
}


.account-card {
    background: linear-gradient(145deg, #ffffff, #f9f9fb);
    border-radius: 18px;
    padding: 40px;
    width: 100%;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.account-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
}

.stat-value {
    color: #e63946;
    font-weight: 600;
}

.account-card img {
    max-width: 220px;
    width: 100%;
    margin: 0 auto 20px;
    display: block;
}

.device-row {
    padding: 20px;
    border-bottom: 1px solid #f2f2f2;
    transition: 0.2s ease;
}

.device-row:hover {
    background: #fafafa;
}

.device-col {
    font-size: 15px;
    color: #333;
}
.devices-list,
.account-cards {
    margin-top: 60px;
}

.devices-list h3,
.card-header h3 {
  text-transform: none;
}

.account-devices {
    padding: 80px 0 100px;
}

.devices-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.04);
}

.devices-title {
    margin-bottom: 35px;
    font-weight: 600;
}

.devices-header-row {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #999;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f1f1;
    margin-bottom: 10px;
}

.device-row {
    padding: 18px 0;
    border-bottom: 1px solid #f5f5f5;
    transition: 0.2s ease;
}

.device-row:hover {
    background: #fafafa;
}

.device-row .device-col:first-child {
    font-weight: 600;
    color: #222;
}

.device-row .device-col:nth-child(2) {
    color: #777;
    font-size: 14px;
}

.account-installation {
    margin-bottom: 60px;
}

.devices-title {
    font-weight: 700;
    font-size: 22px;
}

.device-row:hover {
    transform: translateY(-1px);
}

/* account new *****/

 /* ── LAYOUT ── */
  .layout {
    display: flex;
    flex: 1;
    min-height: 0;
  }

  /* ── SIDEBAR ── */
  .sidebar {
    width: var(--sidebar-w);
    border-right: 1px solid var(--border);
    padding: 28px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
  }
  .sidebar-section-label {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 16px 20px 6px;
    font-family: 'Space Mono', monospace;
  }
  .ar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 0;
    transition: background .15s, color .15s;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 400;
    border-left: 3px solid transparent;
    user-select: none;
  }
  .ar-nav-item:hover { background: var(--surface2); color: var(--text); }
  .ar-nav-item.active {
    background: var(--accent-dim);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 500;
  }
  .ar-nav-icon {
    width: 18px; height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
  }
  .ar-nav-item.active .ar-nav-icon { opacity: 1; }

  /* ── MAIN CONTENT ── */
  .main {
    flex: 1;
    padding: 32px 36px;
    overflow-y: auto;
  }
  .page-title {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
  }
  .page-heading {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 28px;
    letter-spacing: -0.02em;
  }

  /* ── PANEL ── */
  .section { display: none; }
  .section.active { display: block; }

  /* ── STATS ── */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
  }
  .stat-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
    transition: border-color .2s;
  }
  .stat-card:hover { border-color: var(--accent); }
  .stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0;
    transition: opacity .2s;
  }
  .stat-card:hover::before { opacity: 1; }
  .stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 10px;
  }
  .stat-value {
    font-size: 38px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
  }
  .stat-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
  }

  .ar-progress-bar-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 28px;
  }
  .ar-progress-bar-wrap .ar-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
  }
  .ar-progress-bar-wrap .ar-label { font-size: 13px; color: var(--text-dim); }
  .ar-progress-bar-wrap .frac {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: var(--accent);
  }
  .ar-progress-track {
    height: 6px;
    background: var(--surface2);
    border-radius: 99px;
    overflow: hidden;
  }
  .ar-progress-fill {
    height: 100%;
    width: 40%;
    background: var(--accent);
    border-radius: 99px;
    box-shadow: 0 0 8px var(--accent-glow);
    transition: width .6s cubic-bezier(.4,0,.2,1);
  }

  .ar-btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent);
    color: #0e0f14;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    font-family: 'DM Sans', sans-serif;
    text-decoration: none;
  }
  .ar-btn-primary:hover { opacity: .88; transform: translateY(-1px); }
  .ar-btn-primary:active { transform: translateY(0); }

  /* ── QR ── */
  .qr-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
  }
  .qr-card img {
    width: 160px; height: 160px;
    border-radius: 8px;
    image-rendering: pixelated;
    filter: invert(1) sepia(1) saturate(0) hue-rotate(0deg) brightness(0.9) contrast(1.1);
  }
  .qr-hint {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    max-width: 200px;
  }

  /* ── DEVICES TABLE ── */
  .table-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .table-wrap table { width: 100%; border-collapse: collapse; }

  .table-wrap th {
    padding: 12px 20px;
    text-align: left;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 400;
  }
  .table-wrap td {
    padding: 14px 20px;
    font-size: 14px;
    color: var(--text);
    border-top: 1px solid var(--border);
  }
  .table-wrap tr:hover td { background: var(--surface2); }
  .device-badge {
    display: inline-flex; align-items: center; gap: 6px;

    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 12px;
    color: var(--text-dim);
  }
  .btn-reset {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all .2s;
    font-family: 'DM Sans', sans-serif;
  }
  .btn-reset:hover { background: var(--danger-dim); border-color: var(--danger); color: var(--danger); }

  /* ── MODAL ── */
  .ar-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
  }
  .ar-modal-backdrop.show { display: flex; }
  .ar-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    max-width: 380px;
    width: 90%;
    animation: modalIn .2s ease;
  }
  @keyframes modalIn {
    from { opacity: 0; transform: scale(.95) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
  }
  .ar-modal h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
  }
  .ar-modal p { font-size: 14px; color: var(--text-dim); margin-bottom: 24px; line-height: 1.55; }
  .ar-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
  .ar-btn-cancel {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: all .15s;
  }
  .ar-btn-cancel:hover { border-color: var(--text-dim); color: var(--text); }
  .ar-btn-confirm {
    background: var(--danger);
    border: none;
    color: #fff;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: opacity .15s;
  }
  .ar-btn-confirm:hover { opacity: .85; }
  
  .layout {
    padding-top: 300px;
  }

  .as-nav-flex {
    display: flex;
    align-items: center;
  }
  .navbar-lang-switcher {
    margin-left: 20px;
  }
  #as-language-switch {
    display: none;
  }
  .as-language-article {
    max-height: 0px;
    overflow: hidden;
    transition: max-height 0.3s linear;
  }
  .as-language-switch > label {
    text-transform: uppercase;
    padding: 14px 5px;
    line-height: 20px;
    color: #ff3366;
  }

  #as-language-switch:checked ~ .as-language-article {
    max-height: 200px;
  }
  .as-language-article > ul > li {
    font-weight: 700; 
    padding:  5px;
  }

  /* ── RESPONSIVE ── */
@media only screen and (max-width: 767px) {

  .sidebar { width: 60px; padding: 16px 0; }
  .ar-nav-item { padding: 12px 20px; justify-content: center; }
  .ar-nav-item span { display: none; }
  .sidebar-section-label { display: none; }
  .main { padding: 20px 18px; }


  .as-language-switch > label  {
    padding: 10px 15px;
  }
  .as-language-article > ul > li {
    padding: 10px  15px;
  }

}

