:root{
  --bg:#0c0f14; --panel:#0f1218; --hair:#1a2130; --border:#202a3a;
  --text:#e6ebf3; --muted:#9fb0c4; --btn:#1c212a; --btnb:#2a3240;
  --accent:#63a5ff;
}
.theme-light{
  --bg:#f5f7fb; --panel:#fff; --hair:#eef2f8; --border:#e5eaf3;
  --text:#1c2230; --muted:#5d6678; --btn:#fff; --btnb:#e5eaf3;
  --accent:#355eea;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--text);font:14px/1.45 Inter,system-ui,Segoe UI,Roboto,Ubuntu,sans-serif}

/* layout */
.layout{display:grid;grid-template-columns:260px 1fr;min-height:100vh}
.sidebar{background:var(--panel);border-right:1px solid var(--border);padding:12px}
.content{padding:16px}

/* sidebar (старые стили ещё можно юзать в контенте) */
.server-select select{width:100%;height:36px;border-radius:8px;border:1px solid var(--btnb);background:var(--btn);color:var(--text);padding:0 10px;margin-bottom:10px}
.theme-switch{display:flex;gap:8px;margin-bottom:12px}
.section-title{color:var(--muted);font-size:12px;margin:12px 0 6px}
.nav{display:grid;gap:8px}
.nav-item{display:flex;align-items:center;height:34px;padding:0 12px;border:1px solid var(--btnb);background:var(--btn);border-radius:8px;color:var(--text);text-decoration:none;transition:all 0.2s ease}
.nav-item:hover{filter:brightness(1.06);transform:translateY(-1px);box-shadow:0 2px 8px rgba(0,0,0,0.15)}
.btn {
    /* display:block; */
    background-color: transparent;
    text-align: unset;
    padding: 0;
    border: 0;
}
.btn.small{height:32px}
.btn.icon{width:40px;padding:0}
.btn.active{outline:2px solid var(--accent)}
.btn:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,0.15)}
.input{height:40px;border-radius:8px;border:1px solid var(--btnb);background:#11151c;color:var(--text);padding:0 12px;transition:all 0.2s ease}
.input.small{height:32px}
.input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 2px rgba(99,165,255,0.2)}

/* ===== НОВЫЙ САЙДБАР В СТИЛЕ СКРИНА ===== */

/* Заголовки блоков: "Поисковик", "Управление" */
.sidebar-section-title{
  margin-top:18px;
  margin-bottom:6px;
  padding:0 4px;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:0.05em;
  color:var(--muted);
}

/* Группа пунктов (Пользователи, Данные серверов и т.п.) */
.sidebar-group{
  margin-bottom:6px;
}

.sidebar-group-header{
  width:100%;
  border:none;
  outline:none;
  background:#17171f;
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 10px;
  border-radius:4px;
  cursor:pointer;
  font-size:13px;
}

.sidebar-caret{
  font-size:10px;
  opacity:.7;
  transform:rotate(-90deg);
  transition:transform .15s ease;
}

.sidebar-group.open .sidebar-caret{
  transform:rotate(0deg);
}

.sidebar-icon{
  margin-right:8px;
  font-size:14px;
}

.sidebar-icon.small{
  font-size:13px;
}

.sidebar-subnav{
  margin-top:4px;
  margin-bottom:4px;
}

.sidebar-nav-single{
  display:block;
  margin-bottom:6px;
}

/* Ссылки в сайдбаре */
.sidebar-link{
  display:flex;
  align-items:center;
  padding:7px 10px;
  margin-bottom:4px;
  border-radius:4px;
  text-decoration:none;
  font-size:13px;
  color:var(--text);
  background:transparent;
  transition:background .12s ease,color .12s ease,transform .12s ease;
}

.sidebar-link span:last-child{
  white-space:nowrap;
}

.sidebar-link:hover{
  background:#1f1f2a;
  transform:translateY(-1px);
}

.sidebar-link.active{
  background:#ff4da6;
  color:#fff;
}

/* cards */
.card{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:16px;margin-bottom:16px;transition:all 0.3s ease;box-shadow:0 2px 8px rgba(0,0,0,0.1)}
.card:hover{box-shadow:0 4px 16px rgba(0,0,0,0.15);transform:translateY(-2px)}
.card-title{font-size:16px;margin-bottom:8px;font-weight:600}
.toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.searchbar{display:flex;gap:8px}
.btn-group{display:flex;gap:8px}
.right{margin-left:auto}

/* chips */
.chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.chip{background:#161b24;border:1px solid var(--btnb);color:var(--text);padding:6px 12px;border-radius:999px;transition:all 0.2s ease}
.chip:hover{transform:translateY(-1px);box-shadow:0 2px 8px rgba(0,0,0,0.15)}
.chip .x{margin-left:6px;cursor:pointer;opacity:0.7;transition:opacity 0.2s ease}
.chip .x:hover{opacity:1}

/* table */
.table-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.muted{color:var(--muted)}
.pager{display:flex;gap:8px;align-items:center}
.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:12px;max-height:70vh;box-shadow:0 2px 8px rgba(0,0,0,0.1)}
table{width:100%;border-collapse:separate;border-spacing:0;min-width:980px}
thead th{position:sticky;top:0;background:var(--panel);border-bottom:1px solid var(--hair);text-align:left;padding:12px 16px;font-weight:600}
tbody td{border-bottom:1px solid var(--hair);padding:12px 16px;vertical-align:top;white-space:nowrap;max-width:460px;overflow:hidden;text-overflow:ellipsis;transition:all 0.2s ease}
tbody tr:hover td{background:rgba(255,255,255,.08);transform:scale(1.01)}
.small{font-size:12px;color:var(--muted)}
.badge-serial{display:inline-block;background:rgba(0,204,255,.12);border:1px solid rgba(0,204,255,.35);border-radius:8px;padding:4px 8px;font-size:11px;color:#71ebff;font-weight:600;user-select:all}

.profile-header{display:flex;align-items:center;gap:20px;}
.profile-main{display:flex;align-items:center;gap:16px;}
.avatar img{width:72px;height:72px;border-radius:50%;border:2px solid var(--border);transition:all 0.3s ease}
.avatar img:hover{transform:scale(1.05);box-shadow:0 4px 16px rgba(0,0,0,0.2)}
.profile-table td:first-child{color:var(--muted);width:200px;}
.link-player{color:#6bb9ff;text-decoration:none;transition:all 0.2s ease}
.link-player:hover{text-decoration:underline;color:var(--accent)}


/* === ROSE fixes (append-only) === */

/* 1) No rounding anywhere important */
.server-select select,
.nav-item,
.btn,
.input,
.card,
.chip,
.table-wrap {
  border-radius: 0 !important;
}

/* Keep avatar round if you want; comment next line to square it */
/* .avatar img { border-radius: 0 !important; } */

/* 2) SERIAL as plain text */
.badge-serial,
td.serial,
.serial {
  background: none !important;
  border: none !important;
  color: var(--text) !important;
  font-weight: 400 !important;
  font-size: 13px !important;
  padding: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  cursor: default !important;
}

/* ===== Кнопка выбора сервера (в стиле Amazing Online, фиолетовая версия) ===== */
.admin-navigation-server-select {
  position: relative;
  width: 240px;
  margin: 10px auto;
}

.admin-navigation-server-select-button {
  width: 100%;
  padding: 12px 46px 12px 30px;
  background: linear-gradient(93.48deg, #71368a -9.4%, #5b2c70 83.1%);
  border-radius: 4px;
  color: #fff;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  user-select: none;
  text-shadow: 0 0 2px rgba(0,0,0,0.5);
  box-shadow: 0 2px 8px rgba(113,54,138,0.3);
}

.admin-navigation-server-select-button:hover {
  background: linear-gradient(93.48deg, #8540a3 -9.4%, #71368a 83.1%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(113,54,138,0.4);
}

.admin-navigation-server-select-button::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%) rotate(-90deg);
  background: url("./assets/arrow-bold-white.svg") center no-repeat;
  background-size: contain;
  filter: invert(1);
  transition: transform 0.3s ease;
}

.admin-navigation-server-select-button.opened::before {
  transform: translateY(-50%) rotate(90deg);
}

/* ===== Выпадающее меню ===== */
.admin-navigation-server-select-spoiler {
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  background: #1e2127;
  border-radius: 4px;
  overflow: hidden;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.admin-navigation-server-select-spoiler.hidden {
  display: none;
}

.admin-navigation-server-select-spoiler-item {
  padding: 12px 46px 12px 30px;
  cursor: pointer;
  font-size: 15px;
  color: #fff;
  transition: all 0.2s ease;
  position: relative;
}

.admin-navigation-server-select-spoiler-item:hover {
  background: #2b2f36;
  transform: translateX(4px);
}

.admin-navigation-server-select-spoiler-item.selected {
  background: #71368a;
  color: #fff;
}

/* === Переключатель Dark / Light в стиле панели === */
.theme-switch {
  display: flex;
  width: 240px;
  margin: 8px auto;
  border: 1px solid #2f3138;
  border-radius: 4px;
  overflow: hidden;
  background: #1e1f25;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.theme-btn {
  flex: 1;
  background: #1e1f25;
  color: #e0e0e0;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 0;
  border: none;
  border-right: 1px solid #2f3138;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.theme-btn:last-child {
  border-right: none;
}

.theme-btn:hover {
  background: #2b2f36;
  color: #fff;
  transform: translateY(-1px);
}

.theme-btn.active {
  background: #2b2f36;
  color: #fff;
}

.theme-btn.active::before {
  content: "✓ ";
  color: #fff;
}

.theme-btn:focus {
  outline: none;
}

.admin-local-search {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-shadow: 0 10px 13px #1126920d;
  border-radius: 10px;
  margin-top: 36px;
  margin-bottom: 24px;
  background: #1c1e23;
  transition: all 0.3s ease;
}

.admin-local-search:hover {
  box-shadow: 0 12px 20px #1126921a;
}

.admin-local-search-title {
  width: 100%;
  padding: 20px 0 12px 24px;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
}

.admin-local-search-fields {
  padding: 16px 24px 20px;
}

.admin-local-search-fields-inputs.extended {
  flex-direction: column;
  align-items: normal;
}

.admin-local-search-fields-inputs-fields {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 12px;
}

.admin-local-search-fields-inputs-input {
  width: 100%;
  max-width: 608px;
  height: 44px;
  background: #1c1e23;
  border: 1px dashed #3b3e44;
  border-radius: 8px;
  color: #fff;
  padding-left: 16px;
  font-size: 15px;
  transition: all 0.3s ease;
}

.admin-local-search-fields-inputs-input:focus {
  border-color: var(--accent);
  border-style: solid;
  box-shadow: 0 0 0 2px rgba(99,165,255,0.2);
}

.admin-local-search-fields-inputs-buttons {
  display: flex;
  flex-direction: row;
  margin-left: 8px;
}

.admin-local-search-fields-inputs-btn:hover {
  background: #2a2d34;
  transform: translateY(-1px);
}

.admin-local-search-fields-inputs-btn {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #1c1e23;
  border: 1px solid #3b3e44;
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-local-search-params {
  display: flex;
  flex-direction: row;
}

.admin-local-search-fields-inputs-field-selector-select-button {
  background: #1c1e23;
  border: 1px solid #3b3e44;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  height: 40px;
  padding: 0 18px;
  margin-right: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-local-search-fields-inputs-field-selector-select-button:hover {
  background: #2a2d34;
  transform: translateY(-1px);
}

/* dropdown */
.admin-local-search-fields-inputs-field-selector-select-spoiler {
  position: absolute;
  background: #1c1e23;
  border: 1px solid #3b3e44;
  border-radius: 6px;
  margin-top: 4px;
  width: 180px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  z-index: 5;
  transition: all 0.3s ease;
}

.admin-local-search-fields-inputs-field-selector-select-spoiler-item {
  padding: 10px 12px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-local-search-fields-inputs-field-selector-select-spoiler-item:hover {
  background: #34373e;
  transform: translateX(4px);
}

.hidden {
  display: none;
}

.admin-local-search-fields-inputs-btn:active,
.admin-local-search-fields-inputs-field-selector-select-button:active {
  background: #181a1f;
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.table {
  table-layout: fixed !important;
}

/* Точная ширина колонок */
.table th:nth-child(1), .table td:nth-child(1) { width: 8%; }
.table th:nth-child(2), .table td:nth-child(2) { width: 9%; }
.table th:nth-child(3), .table td:nth-child(3) { width: 10%; }
.table th:nth-child(4), .table td:nth-child(4) { width: 37%; }
.table th:nth-child(5), .table td:nth-child(5) { width: 8%; }
.table th:nth-child(6), .table td:nth-child(6) { width: 9%; }
.table th:nth-child(7), .table td:nth-child(7) { width: 19%; }

/* Serial — в одну строку, без переноса и без троеточий */
.table td:nth-child(7) {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  max-width: none !important;
}

/* Игрок — обрезаем если слишком длинный, чтобы не мешал */
.table td:nth-child(2) {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 150px !important;
}

.table th,
.table td {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.table th:last-child,
.table td:last-child {
  border-right: none;
}

.table th {
  background: var(--hair);
  color: var(--muted);
  font-weight: 600;
}

.table tr:hover td {
  background: rgba(255,255,255,0.08);
}

/* Мелкие визуальные элементы */
.muted {
  color: var(--muted);
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

/* Поле ввода — на всю ширину */
.fast-input {
  width: 100%;
  margin-bottom: 15px;
}

/* Разделение между поиском и списком */
.fast-separator {
  height: 1px;
  background: var(--hair);
  margin-bottom: 10px;
  opacity: 0.5;
}

/* Лист аккаунтов */
.fast-list {
  margin-top: 10px;
}

/* Элемент списка */
.fast-item {
  display: flex;
  align-items: center;
  padding: 14px 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
  transition: all 0.3s ease;
}

.fast-item:hover {
  background: var(--hair);
  transform: translateX(4px);
}

/* Имя игрока */
.fast-name {
  flex: 1;
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}

/* Стрелка */
.fast-arrow {
  font-size: 24px;
  opacity: 0.5;
  margin-left: 10px;
  transition: all 0.2s ease;
}

.fast-item:hover .fast-arrow {
  opacity: 1;
  transform: translateX(2px);
}

/* Пустое состояние */
.fast-empty {
  padding: 20px;
  text-align: center;
  opacity: 0.6;
  font-style: italic;
}

/* Онлайн-статус */
.fast-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 12px;
  transition: all 0.3s ease;
}

/* Мигающий онлайн */
.fast-status.on {
  background: #4cff4c;
  box-shadow: 0 0 6px #4cff4c;
  animation: pulseOnline 1.2s infinite ease-in-out;
}

@keyframes pulseOnline {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
  100% { transform: scale(1); opacity: 1; }
}

/* Оффлайн */
.fast-status.off {
  background: #777;
  opacity: .5;
}

.dropdown {
    position: absolute;
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 5px 0;
    border-radius: 6px;
    margin-top: 3px;
    z-index: 20;
    display: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.dropdown div {
    padding: 10px 16px;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s ease;
}

.dropdown div:hover {
    background: var(--hair);
    transform: translateX(4px);
}

.fast-tag {
  display: inline-block;
  background: #222a;
  padding: 4px 10px;
  border-radius: 6px;
  margin-left: 8px;
  font-size: 12px;
  color: var(--text);
  transition: all 0.2s ease;
}

.fast-item:hover .fast-tag {
  background: #333c;
}

.popup-overlay {
    position: fixed;
    top:0; left:0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.55);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
    backdrop-filter: blur(4px);
}

.popup {
    background: var(--panel);
    padding:28px;
    width:450px;
    border-radius:12px;
    box-shadow:0 0 35px rgba(0,0,0,.5);
    transition: all 0.3s ease;
    animation: popupAppear 0.3s ease;
}

@keyframes popupAppear {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.popup-title {
    font-size:20px;
    margin-bottom:18px;
    font-weight:600;
}

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

.popup-item {
    padding:12px;
    border-bottom:1px solid var(--border);
    cursor:pointer;
    transition: all 0.2s ease;
}

.popup-item:hover {
    background: var(--hair);
    transform: translateX(4px);
}

.popup-name {
    font-size:16px;
    font-weight:bold;
}

.popup-meta {
    font-size:13px;
    opacity:.75;
}

.popup-close {
    margin-top:18px;
    width:100%;
    padding:10px;
    background:var(--btnb);
    color:var(--text);
    border-radius:6px;
    transition: all 0.2s ease;
    font-weight:500;
}

.popup-close:hover {
    background:var(--accent);
    color:white;
    transform: translateY(-1px);
}

.profile-menu-btn {
  font-size: 20px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text);
  border-radius: 6px;
  transition: all 0.3s ease;
}
.profile-menu-btn:hover {
  background: var(--hair);
  transform: scale(1.05);
}

.profile-menu {
  position: absolute;
  top: 55px;
  right: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 220px;
  display: none;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  animation: menuAppear 0.2s ease;
}

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

.profile-menu-item {
  padding: 12px 16px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s ease;
}
.profile-menu-item:hover {
  background: var(--hair);
  transform: translateX(4px);
}
.clickable {
  cursor: pointer;
}

/* Smooth transitions for all interactive elements */
* {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.table-assets th:nth-child(1),
.table-assets td:nth-child(1) { width: 10%; }

.table-assets th:nth-child(2),
.table-assets td:nth-child(2) { width: 35%; }

.table-assets th:nth-child(3),
.table-assets td:nth-child(3) { width: 25%; }

.table-assets th:nth-child(4),
.table-assets td:nth-child(4) { width: 30%; }