* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #121316;
    color: #e3e3e3;
    min-height: 100vh;
}

header {
    background: #1a1c22;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a2d35;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: #e3e3e3;
    text-decoration: none;
}

.user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user img { border-radius: 50%; }

.logout {
    color: #ff6b6b;
    text-decoration: none;
    font-size: 14px;
}

main { padding: 32px; max-width: 1200px; margin: 0 auto; }

/* Дашборд */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.card {
    background: #1a1c22;
    border: 1px solid #2a2d35;
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
    border-color: #5865F2;
    transform: translateY(-2px);
}

.card .icon { font-size: 32px; }
.card h3 { margin: 12px 0 6px; font-size: 18px; }
.card p { color: #8a8f98; font-size: 14px; }

/* Страница входа */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box {
    background: #1a1c22;
    padding: 48px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #2a2d35;
    max-width: 400px;
}

.login-box h1 { margin-bottom: 12px; }
.login-box p { color: #8a8f98; margin-bottom: 24px; }

.discord-btn {
    display: inline-block;
    background: #5865F2;
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.discord-btn:hover { background: #4752c4; }

/* Кнопки */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary { background: #5865F2; color: white; }
.btn-primary:hover { background: #4752c4; }
.btn-secondary { background: #2a2d35; color: #e3e3e3; }
.btn-secondary:hover { background: #353842; }
.btn-danger { background: #ED4245; color: white; }
.btn-danger:hover { background: #c93a3d; }

/* Flash-сообщения */
.flash {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
.flash-success { background: #2d4a2f; color: #8fdf90; border: 1px solid #3e6b40; }
.flash-error { background: #4a2d2d; color: #ff9090; border: 1px solid #6b3e3e; }

/* Заголовок страницы */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.page-header h2 { font-size: 24px; }

/* Сетка отрядов */
.squads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.squad-card {
    background: #1a1c22;
    border: 2px solid #2a2d35;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.squad-card:hover { transform: translateY(-2px); }

.squad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2a2d35;
}

.squad-name { font-size: 18px; font-weight: 700; }
.squad-count { color: #8a8f98; font-size: 14px; }

.squad-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.squad-list li {
    background: #20222a;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: #ffd966;
    font-weight: 600;
}

.squad-list li.empty {
    color: #5a5e68;
    font-weight: 400;
    font-style: italic;
}

.squad-list.big li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-delete {
    background: transparent;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
}

.btn-delete:hover { color: #ff3b3b; }

/* Детали отряда */
.squad-detail {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.squad-info {
    background: #1a1c22;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #2a2d35;
}

.squad-info p { margin: 6px 0; }

.squad-section {
    background: #1a1c22;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #2a2d35;
}

.squad-section h3 { margin-bottom: 16px; font-size: 16px; }
.squad-section.danger { border-color: #6b3e3e; }

.inline-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.inline-form input,
.inline-form select {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    background: #20222a;
    border: 1px solid #2a2d35;
    border-radius: 8px;
    color: #e3e3e3;
    font-size: 14px;
    font-family: inherit;
}

.inline-form input:focus,
.inline-form select:focus {
    outline: none;
    border-color: #5865F2;
}

/* Модалка */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-content {
    background: #1a1c22;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid #2a2d35;
    width: 100%;
    max-width: 480px;
}

.modal-content h3 { margin-bottom: 20px; }

.modal-content label {
    display: block;
    margin-bottom: 6px;
    margin-top: 14px;
    font-size: 14px;
    color: #8a8f98;
}

.modal-content input,
.modal-content select {
    width: 100%;
    padding: 10px 14px;
    background: #20222a;
    border: 1px solid #2a2d35;
    border-radius: 8px;
    color: #e3e3e3;
    font-size: 14px;
    font-family: inherit;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: flex-end;
}

.empty-msg {
    color: #8a8f98;
    font-style: italic;
    margin-top: 20px;
}
/* Фильтры */
.filters {
    background: #1a1c22;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #2a2d35;
    margin-bottom: 24px;
}

.filters-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filters-form label {
    color: #8a8f98;
    font-size: 14px;
}

.filters-form select {
    padding: 8px 14px;
    background: #20222a;
    border: 1px solid #2a2d35;
    border-radius: 8px;
    color: #e3e3e3;
    font-size: 14px;
    font-family: inherit;
}

/* Таблица статистики */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    background: #1a1c22;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #2a2d35;
}

.stats-table th {
    background: #20222a;
    padding: 16px;
    text-align: left;
    font-size: 14px;
    color: #8a8f98;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-table td {
    padding: 16px;
    border-top: 1px solid #2a2d35;
    font-size: 15px;
}

.stats-table tr:hover {
    background: #20222a;
}

.col-grenades { color: #57F287; font-weight: 700; }
.col-kc { color: #c8c8d2; font-weight: 600; }
.col-kd { color: #ffd966; font-weight: 700; }

/* Чекбоксы дней */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #20222a;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.checkbox-item:hover { background: #252833; }

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #5865F2;
    cursor: pointer;
}

.checkbox-item span {
    font-size: 14px;
    color: #e3e3e3;
}
/* Отписки */
.subs-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.subs-day {
    background: #1a1c22;
    border: 1px solid #2a2d35;
    border-radius: 12px;
    padding: 20px;
}

.subs-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2a2d35;
}

.subs-day-header h3 { font-size: 18px; }

.subs-count {
    color: #5865F2;
    font-weight: 700;
    font-size: 14px;
}

.subs-users {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subs-users li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #20222a;
    padding: 12px 16px;
    border-radius: 8px;
}

.subs-user-info {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.subs-name {
    color: #ffd966;
    font-weight: 700;
}

.subs-reason {
    color: #8a8f98;
    font-size: 14px;
}
/* Лендинг */
.landing {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 32px;
}

.hero {
    text-align: center;
    padding: 60px 0 80px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #5865F2, #EB459E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: #8a8f98;
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn.big {
    padding: 16px 36px;
    font-size: 16px;
}

.features h2 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 40px;
}

.card.static {
    cursor: default;
}

.card.static:hover {
    transform: none;
    border-color: #2a2d35;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-nav > a {
    color: #e3e3e3;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s;
}

.header-nav > a:hover {
    background: #2a2d35;
}

footer {
    text-align: center;
    padding: 40px 0;
    color: #5a5e68;
    font-size: 14px;
    border-top: 1px solid #2a2d35;
    margin-top: 60px;
}
/* Выбор сервера */
.choose-server {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 32px;
    text-align: center;
}

.choose-server h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.servers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.server-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: #1a1c22;
    border: 2px solid #2a2d35;
    border-radius: 12px;
    text-decoration: none;
    color: #e3e3e3;
    font-size: 16px;
    font-weight: 600;
    transition: border-color 0.2s, transform 0.2s;
}

.server-item:hover {
    border-color: #5865F2;
    transform: translateY(-2px);
}

.server-icon-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #5865F2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.server-name {
    flex: 1;
    text-align: left;
}

/* Текущий сервер в шапке */
.current-server {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #20222a;
    border-radius: 8px;
    font-size: 14px;
    color: #e3e3e3;
}

.change-server {
    color: #8a8f98;
    text-decoration: none;
    font-size: 16px;
    padding: 0 4px;
}

.change-server:hover {
    color: #5865F2;
}