/* =========================================================
   Базовые стили
   ========================================================= */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #0f1115;
    color: #e6e6e6;
    min-height: 100vh;
}

a { color: #4a8cff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* =========================================================
   Форма входа
   ========================================================= */
.auth-box {
    max-width: 380px;
    margin: 80px auto;
    padding: 32px;
    background: #1a1d24;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.auth-box h1 { margin: 0 0 20px; font-size: 22px; }
.auth-box label {
    display: block;
    margin-bottom: 14px;
    font-size: 14px;
    color: #b6bcc7;
}
.auth-box input {
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    background: #0f1115;
    border: 1px solid #2a2f38;
    border-radius: 8px;
    color: #e6e6e6;
    font-size: 14px;
    font-family: inherit;
}
.auth-box input:focus {
    outline: none;
    border-color: #4a8cff;
}
.auth-box button {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    background: #4a8cff;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
}
.auth-box button:hover { background: #3a7ce8; }

/* =========================================================
   Сообщения
   ========================================================= */
.msg {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.msg.error   { background: #3a1d22; color: #ff8b8b; border: 1px solid #5a2a30; }
.msg.success { background: #1d3a24; color: #7dff9b; border: 1px solid #2a5a35; }

/* =========================================================
   Панель
   ========================================================= */
.panel {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}
.panel header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}
.panel h1 { font-size: 24px; margin: 0; }
.panel h2 { font-size: 18px; margin-top: 30px; margin-bottom: 12px; }

/* =========================================================
   Вкладки
   ========================================================= */
.tabs {
    display: flex;
    gap: 6px;
    margin: 20px 0 24px;
    border-bottom: 1px solid #2a2f38;
    flex-wrap: wrap;
}
.tabs a {
    padding: 10px 16px;
    color: #b6bcc7;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    transition: color .15s, border-color .15s;
}
.tabs a:hover { color: #fff; }
.tabs a.active {
    color: #4a8cff;
    border-bottom-color: #4a8cff;
}

/* =========================================================
   Карточки форм
   ========================================================= */
.card {
    background: #1a1d24;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 24px;
}
.card label {
    display: block;
    margin-bottom: 14px;
    font-size: 14px;
    color: #b6bcc7;
}
.card input[type=text],
.card input[type=number],
.card input[type=password],
.card select,
.card textarea {
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    background: #0f1115;
    border: 1px solid #2a2f38;
    border-radius: 8px;
    color: #e6e6e6;
    font-size: 14px;
    font-family: inherit;
}
.card input:focus,
.card select:focus,
.card textarea:focus {
    outline: none;
    border-color: #4a8cff;
}
.card textarea { resize: vertical; min-height: 80px; }

.card button[type=submit],
.btn-secondary,
.btn-danger {
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
}
.card button[type=submit] { background: #4a8cff; color: #fff; }
.card button[type=submit]:hover { background: #3a7ce8; }

.btn-secondary {
    background: #2a2f38;
    color: #e6e6e6;
    white-space: nowrap;
}
.btn-secondary:hover { background: #363c47; }

.btn-danger {
    background: #5a2a30;
    color: #ff8b8b;
    padding: 6px 12px;
}
.btn-danger:hover { background: #6e343c; }

.row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 720px) { .row { grid-template-columns: 1fr 1fr; } }

/* =========================================================
   Таблицы
   ========================================================= */
.tbl { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.tbl th, .tbl td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #232831;
}
.tbl th {
    color: #8a93a3;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.tbl tr:hover td { background: #161a20; }

/* =========================================================
   Подсказки
   ========================================================= */
.hint {
    font-size: 13px;
    color: #8a93a3;
    background: #0f1115;
    padding: 12px;
    border-radius: 8px;
    margin: 12px 0;
    line-height: 1.5;
}