/* ==== Оформление админ-панели OKO ==== */

.admin-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}

.admin-title {
    font-size: 26px;
    font-weight: bold;
    color: #1c3d5a;
    margin: 10px 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-title .material-icons {
    color: #6fa8ff;
    font-size: 30px;
}

/* --- Карточки статистики --- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: linear-gradient(160deg, #ffffff 0%, #eef5ff 100%);
    border: 1px solid #d4e3ff;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(80, 120, 200, 0.10);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(80, 120, 200, 0.18);
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #2f66c4;
}

.stat-card .stat-label {
    margin-top: 4px;
    font-size: 13px;
    color: #557;
}

/* --- Панель кнопок (навигация раздела) --- */
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.admin-nav a.p_button {
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(80, 120, 200, 0.12);
    gap: 8px;
}

.admin-nav a.p_button .material-icons {
    font-size: 18px;
    color: #6fa8ff;
    margin-right: 6px;
    vertical-align: -4px;
}

.admin-nav a.p_button:hover .material-icons { color: #2f66c4; }

.admin-nav a.p_button.active {
    background-color: #6fa8ff;
    color: #ffffff;
}

.admin-nav a.p_button.active .material-icons { color: #ffffff; }

/* --- Поисковая строка --- */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.search-bar input[type="text"] {
    flex: 1;
    max-width: 420px;
    padding: 9px 14px;
    border: 1px solid #c4d6f5;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-bar input[type="text"]:focus {
    border-color: #6fa8ff;
    box-shadow: 0 0 0 3px rgba(111, 168, 255, 0.25);
}

.search-bar button {
    padding: 9px 20px;
    background: linear-gradient(180deg, #8dbaff 0%, #6fa8ff 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.search-bar button:hover {
    filter: brightness(1.08);
}

/* --- Таблицы --- */
table.original.admin-table {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(80, 120, 200, 0.12);
    margin-bottom: 18px;
}

table.original.admin-table > thead > tr > th {
    background: linear-gradient(180deg, #89b2ff 0%, #74a1f0 100%);
    color: #ffffff;
    padding: 11px 12px;
    font-weight: bold;
    text-align: left;
    white-space: nowrap;
}

table.original.admin-table > tbody > tr > td {
    padding: 10px 12px;
    vertical-align: top;
}

table.original.admin-table > tbody > tr:nth-child(even) > td {
    background-color: #f4f8ff;
}

/* --- Бейджи --- */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.badge.on {
    background-color: #d8f5dc;
    color: #1e7c34;
    border: 1px solid #b2e6bc;
}

.badge.off {
    background-color: #fde2e2;
    color: #b02a2a;
    border: 1px solid #f5bcbc;
}

.badge.group {
    background-color: #e2edff;
    color: #2f66c4;
    border: 1px solid #bcd4ff;
}

.badge.inn {
    background-color: #fff3d6;
    color: #946a00;
    border: 1px solid #ffe29a;
}

/* --- Мини-кнопки --- */
.btn-mini {
    display: inline-block;
    padding: 4px 12px;
    margin: 2px;
    background-color: #ffffff;
    border: 1px solid #c4d6f5;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-mini:hover {
    background-color: #e2edff;
    border-color: #6fa8ff;
}

.btn-mini.danger:hover {
    background-color: #fde2e2;
    border-color: #d97b7b;
}

.btn-mini.primary {
    background: linear-gradient(180deg, #8dbaff 0%, #6fa8ff 100%);
    color: #ffffff;
    border: none;
}

.btn-mini.primary:hover {
    filter: brightness(1.08);
}

/* --- Формы внутри карточек --- */
.inline-form {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin: 2px 0;
}

.inline-form input[type="text"],
.inline-form select {
    padding: 5px 10px;
    border: 1px solid #c4d6f5;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
}

.inline-form input[type="text"]:focus,
.inline-form select:focus {
    border-color: #6fa8ff;
}

/* --- Секции прав пользователя --- */
.perm-section b {
    display: block;
    color: #1c3d5a;
    margin-bottom: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

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

.user-head .user-name {
    font-size: 16px;
}

.user-head .dates {
    font-size: 12px;
    color: #667;
    white-space: nowrap;
}

/* --- Пагинация --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
    font-size: 14px;
    color: #557;
}

.pagination a {
    color: #2f66c4;
    text-decoration: none;
    padding: 5px 14px;
    border: 1px solid #c4d6f5;
    border-radius: 999px;
    transition: background-color 0.15s ease;
}

.pagination a:hover {
    background-color: #e2edff;
}

.empty-row td {
    text-align: center;
    color: #889;
    font-style: italic;
    padding: 18px !important;
}
