/* CS 1.6 Monitoring - style like servers-monitoring.ru */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: Tahoma, Arial, Helvetica, sans-serif;
    font-size: 13px;
    background: #1a1a1a;
    color: #ddd;
    line-height: 1.4;
}
a { color: #6cf; text-decoration: none; }
a:hover { color: #9df; text-decoration: underline; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 8px; }

/* Top navigation */
.topnav {
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.topnav a {
    display: inline-block;
    padding: 5px 12px;
    background: #2a2a2a;
    border-radius: 3px;
    color: #ccc;
    font-size: 12px;
}
.topnav a:hover, .topnav a.active {
    background: #f80;
    color: #000;
    text-decoration: none;
}
.topnav .right { margin-left: auto; }

/* Header stats */
.header {
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 10px;
}
.header h1 { font-size: 16px; color: #fff; margin-bottom: 4px; }
.header h1 span { color: #f80; }
.stats { font-size: 12px; color: #aaa; }
.stats b { color: #0f0; }

/* TOP paid slots - grid like original */
.top-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 6px;
    margin-bottom: 10px;
}
.top-slot {
    background: linear-gradient(135deg, #2a1f00, #1a1500);
    border: 1px solid #f80;
    border-radius: 4px;
    padding: 8px 10px;
    min-height: 58px;
    font-size: 12px;
}
.top-slot.empty {
    background: #1a1a1a;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
}
.top-slot.empty a { color: #6cf; font-size: 12px; }
.top-slot .tname {
    font-weight: bold;
    color: #f80;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top-slot .tname a { color: #f80; }
.top-slot .tname a:hover { color: #fa0; }
.top-slot .tinfo { font-size: 11px; color: #aaa; line-height: 1.35; }
.top-slot .tinfo .addr { color: #8cf; font-family: monospace; font-size: 10px; }

/* Modes menu - two rows */
.modes {
    background: #222;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 7px 8px;
    margin-bottom: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.modes a {
    display: inline-block;
    padding: 4px 10px;
    background: #333;
    border-radius: 3px;
    color: #ccc;
    font-size: 12px;
}
.modes a:hover, .modes a.active {
    background: #f80;
    color: #000;
    text-decoration: none;
}

/* Search */
.search {
    background: #222;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 10px;
}
.search form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.search input[type=text], .search input[type=number] {
    padding: 5px 8px;
    background: #111;
    border: 1px solid #444;
    color: #eee;
    border-radius: 3px;
    width: 130px;
    font-size: 12px;
}
.search button {
    padding: 5px 14px;
    background: #f80;
    border: none;
    color: #000;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
}
.search button:hover { background: #fa0; }

/* Table */
.table-wrap { overflow-x: auto; }
table.servers {
    width: 100%;
    border-collapse: collapse;
    background: #1e1e1e;
    border: 1px solid #333;
}
table.servers th {
    background: #2a2a2a;
    color: #f80;
    padding: 7px 6px;
    text-align: left;
    font-size: 12px;
    border-bottom: 1px solid #444;
    white-space: nowrap;
}
table.servers td {
    padding: 5px 6px;
    border-bottom: 1px solid #2a2a2a;
    vertical-align: middle;
    font-size: 12px;
}
table.servers tr:hover td { background: #252525; }
table.servers .name a { color: #fff; font-weight: bold; }
table.servers .name a:hover { color: #f80; }
table.servers .addr { color: #8cf; font-family: monospace; font-size: 11px; }
table.servers .map a { color: #8c8; }
table.servers .players { white-space: nowrap; }
table.servers .top-row { background: #2a2200 !important; }
table.servers .top-row td { border-bottom-color: #443300; }
table.servers .country { width: 28px; text-align: center; }

/* Server page */
.server-card {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 12px;
}
.server-card h2 { color: #f80; margin-bottom: 12px; font-size: 17px; }
.info-grid { display: grid; grid-template-columns: 120px 1fr; gap: 5px 10px; font-size: 13px; }
.info-grid .label { color: #888; }
.players-table { width: 100%; margin-top: 12px; border-collapse: collapse; }
.players-table th, .players-table td { padding: 5px 8px; border-bottom: 1px solid #333; text-align: left; font-size: 12px; }
.players-table th { background: #2a2a2a; color: #f80; }

/* Forms */
.form-box {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 18px;
    max-width: 480px;
}
.form-box label { display: block; margin: 10px 0 4px; color: #aaa; font-size: 12px; }
.form-box input[type=text], .form-box input[type=password], .form-box textarea {
    width: 100%; padding: 8px; background: #111; border: 1px solid #444; color: #eee; border-radius: 3px;
}
.form-box button {
    margin-top: 14px; padding: 8px 20px; background: #f80; border: none; color: #000;
    font-weight: bold; border-radius: 3px; cursor: pointer;
}
.msg { padding: 10px; border-radius: 3px; margin-bottom: 10px; font-size: 13px; }
.msg.ok { background: #1a3a1a; border: 1px solid #0a0; color: #0f0; }
.msg.err { background: #3a1a1a; border: 1px solid #a00; color: #f66; }

/* Pay box */
.pay-box {
    background: #1a2200;
    border: 1px solid #f80;
    border-radius: 4px;
    padding: 14px;
    margin-top: 16px;
}
.pay-box h3 { color: #f80; margin-bottom: 8px; font-size: 15px; }
.pay-prices { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.pay-prices label {
    background: #222; border: 1px solid #444; padding: 8px 12px;
    border-radius: 4px; cursor: pointer; min-width: 130px; font-size: 12px;
}
.pay-prices input { margin-right: 5px; }
.pay-info {
    background: #111; border: 1px solid #333; padding: 10px;
    border-radius: 4px; margin: 10px 0; white-space: pre-wrap;
    font-family: monospace; font-size: 12px; color: #0f0;
}
.pay-box input[type=text] {
    width: 100%; max-width: 300px; padding: 7px;
    background: #111; border: 1px solid #444; color: #eee; border-radius: 3px;
}
.pay-box button {
    margin-top: 10px; padding: 9px 22px; background: #f80;
    border: none; color: #000; font-weight: bold; border-radius: 3px; cursor: pointer;
}

/* Footer */
.footer {
    margin-top: 16px; padding: 10px; text-align: center; color: #666; font-size: 11px;
    border-top: 1px solid #333;
}

/* Pagination */
.pages { margin: 10px 0; text-align: center; }
.pages a, .pages span {
    display: inline-block; padding: 3px 9px; margin: 0 2px;
    background: #333; border-radius: 3px; color: #ccc; font-size: 12px;
}
.pages a:hover { background: #f80; color: #000; text-decoration: none; }
.pages .cur { background: #f80; color: #000; }

@media (max-width: 700px) {
    .search input { width: 100%; }
    table.servers .map { display: none; }
    .top-slots { grid-template-columns: 1fr 1fr; }
    .info-grid { grid-template-columns: 100px 1fr; }
}
