/*
    UP-MS v24 CSS-only restore.
    НЕТ JS. Этот файл не трогает ссылки, не скрывает серверы, не перестраивает DOM.
    Цель: вернуть работу "Мои сервера", "Инфо сервера", "Листинг", оставив тёмный стиль.
*/

:root{
    --upms-bg:#070910;
    --upms-card:#0d1320;
    --upms-card2:#121a28;
    --upms-line:rgba(255,255,255,.12);
    --upms-line2:rgba(255,255,255,.07);
    --upms-row1:rgba(255,255,255,.07);
    --upms-row2:rgba(255,255,255,.035);
    --upms-text:#f7f9ff;
    --upms-muted:#aeb8cc;
    --upms-red:#ef2334;
    --upms-red2:#ff505e;
    --upms-orange:#ff8c45;
    --upms-gold:#ffd35b;
    --upms-green:#18bf7d;
}

html,body{
    background:var(--upms-bg)!important;
    color:var(--upms-text)!important;
    overflow-x:hidden!important;
}

.upms-content-card,
.container,
.container-fluid{
    color:var(--upms-text)!important;
}

.upms-content-card *,
.container *,
.container-fluid *{
    box-sizing:border-box!important;
    text-shadow:none!important;
}

/* Важное: никаких display:none для форм/таблиц/серверов */
form,
table,
tbody,
thead,
tr,
td,
th,
.form-group,
.table-responsive,
.panel,
.well,
.alert,
a,
button{
    visibility:visible!important;
    pointer-events:auto!important;
}

/* Тёмные системные блоки */
.alert,
.well,
.panel,
.panel-body,
.thumbnail,
.jumbotron,
.bg-warning,
.bg-info,
.bg-light,
.bg-white{
    background:linear-gradient(135deg,rgba(17,23,37,.98),rgba(7,10,18,.98))!important;
    color:var(--upms-text)!important;
    border:1px solid var(--upms-line)!important;
    box-shadow:none!important;
}

.alert *,
.well *,
.panel *,
.panel-body *,
.thumbnail *,
.jumbotron *{
    color:var(--upms-text)!important;
}

.text-muted,
.help-block{
    color:var(--upms-muted)!important;
}

/* Формы */
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]),
select,
textarea{
    max-width:100%!important;
    min-height:44px!important;
    padding:11px 13px!important;
    border-radius:14px!important;
    border:1px solid rgba(255,255,255,.14)!important;
    background:#060b14!important;
    color:#fff!important;
    outline:none!important;
    box-shadow:none!important;
}

textarea{
    min-height:92px!important;
    resize:vertical!important;
}

option{
    color:#111!important;
    background:#fff!important;
}

/* Кнопки */
.btn,
button,
input[type=submit],
input[type=button]{
    border:0!important;
    border-radius:13px!important;
    background:linear-gradient(135deg,var(--upms-red),var(--upms-red2))!important;
    color:#fff!important;
    font-weight:900!important;
    box-shadow:none!important;
}

.btn-success{
    background:linear-gradient(135deg,#0f8f5a,#20c67d)!important;
}

.btn-warning{
    background:linear-gradient(135deg,var(--upms-gold),var(--upms-orange))!important;
    color:#211608!important;
}

.btn-default,
.btn-secondary{
    background:#171f2d!important;
    border:1px solid var(--upms-line)!important;
}

/* Таблицы */
.table-responsive{
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch!important;
}

table{
    width:100%!important;
    border-collapse:separate!important;
    border-spacing:0 10px!important;
    background:transparent!important;
}

th{
    padding:10px 12px!important;
    border:0!important;
    background:transparent!important;
    color:#b9c4d9!important;
    font-size:12px!important;
    font-weight:900!important;
    text-transform:uppercase!important;
    letter-spacing:.4px!important;
    white-space:nowrap!important;
}

td{
    padding:12px 14px!important;
    border:0!important;
    background:linear-gradient(90deg,var(--upms-row1),var(--upms-row2))!important;
    color:#fff!important;
    font-size:14px!important;
    line-height:1.25!important;
    font-weight:800!important;
    vertical-align:middle!important;
}

tr td:first-child{
    border-radius:15px 0 0 15px!important;
}

tr td:last-child{
    border-radius:0 15px 15px 0!important;
}

/* Кнопки в таблицах компактнее, но без JS */
table a.btn,
table button.btn,
table .btn{
    min-height:32px!important;
    height:32px!important;
    padding:0 10px!important;
    border-radius:11px!important;
    font-size:11px!important;
    line-height:32px!important;
    white-space:nowrap!important;
}

/* Меню ЛК */
.list-group,
ul.list-group,
.nav,
.nav-pills,
.nav-tabs{
    overflow:hidden!important;
    border:1px solid var(--upms-line)!important;
    border-radius:22px!important;
    background:linear-gradient(135deg,#121827,#080c15)!important;
}

.list-group-item,
a.list-group-item,
.nav>li>a{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    min-height:54px!important;
    padding:12px 15px!important;
    border:0!important;
    border-bottom:1px solid var(--upms-line2)!important;
    border-radius:0!important;
    background:rgba(255,255,255,.03)!important;
    color:#fff!important;
    font-size:15px!important;
    font-weight:900!important;
    line-height:1.15!important;
}

.list-group-item.active,
a.list-group-item.active,
.nav>li.active>a{
    background:linear-gradient(135deg,var(--upms-red),var(--upms-orange))!important;
    color:#fff!important;
    box-shadow:inset 4px 0 0 var(--upms-gold)!important;
}

.pagination,
ul.pagination{
    display:flex!important;
    gap:8px!important;
    margin:14px 0 0!important;
    padding:0!important;
}

.pagination li,
ul.pagination li{
    list-style:none!important;
}

.pagination a,
.pagination span,
ul.pagination a,
ul.pagination span{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:38px!important;
    height:38px!important;
    border-radius:12px!important;
    border:1px solid var(--upms-line)!important;
    background:#151d2d!important;
    color:#fff!important;
    font-weight:1000!important;
}

/* Мобильный режим */
@media(max-width:920px){
    table,
    thead,
    tbody,
    tr,
    th,
    td{
        display:block!important;
        width:100%!important;
    }

    thead{
        display:none!important;
    }

    tr{
        margin-bottom:12px!important;
        padding:12px!important;
        border:1px solid var(--upms-line)!important;
        border-radius:18px!important;
        background:rgba(255,255,255,.045)!important;
    }

    td{
        border-radius:0!important;
        background:transparent!important;
        padding:8px 10px!important;
    }
}
