/*
    ══════════════════════════════════════════════════════════════════
      HavicRP  |  havic_website
      Ten System został stworzony przez: The_Trawnik dla Serwera HavicRP!
      Autor: The_Trawnik  |  https://thetrawnik.dev
      KOPIOWANIE / RESELL TYCH PLIKÓW / DUMPOWANIE JEST SUROWO ZAKAZANE!
    ══════════════════════════════════════════════════════════════════
*/

.panel-body { overflow: hidden; height: 100vh; }
.hidden { display: none !important; }

.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; }
.login-card {
    width: 100%;
    max-width: 380px;
    padding: 38px 32px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--border);
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.login-card img { width: 110px; filter: drop-shadow(0 10px 30px rgba(37, 99, 255, 0.5)); }
.login-card h1 { font-family: 'Rajdhani', sans-serif; font-size: 34px; letter-spacing: 2px; }
.login-card h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-card p { color: var(--muted); margin-top: -10px; font-size: 14px; }
.login-card label { width: 100%; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); }
.login-card label i { color: var(--accent-2); }
.login-card input { flex: 1; padding: 13px 0; background: none; border: none; outline: none; color: var(--text); font: inherit; }
.login-card .btn { width: 100%; justify-content: center; }
.login-err { color: #f87171; font-size: 13px; min-height: 16px; }
.login-card .back { color: var(--muted); font-size: 13px; }
.login-card .back:hover { color: var(--text); }

.app { display: grid; grid-template-columns: 250px 1fr; height: 100vh; }
.side { display: flex; flex-direction: column; padding: 22px 16px; background: rgba(5, 10, 26, 0.85); border-right: 1px solid var(--border); }
.side-logo { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; font-family: 'Rajdhani', sans-serif; font-size: 22px; letter-spacing: 1px; }
.side-logo img { width: 40px; }
.side-logo b { color: var(--accent-2); }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-nav button, .side-out {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: none;
    background: none;
    color: var(--muted);
    font: 600 14px 'Inter', sans-serif;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s;
}
.side-nav button i, .side-out i { width: 18px; text-align: center; }
.side-nav button:hover, .side-out:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.side-nav button.active { background: rgba(37, 99, 255, 0.18); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.side-nav em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; }
.side-nav em:empty { display: none; }
.side-out:hover { color: #f87171; }

.main { overflow-y: auto; padding: 30px 34px 60px; }
.main h2 { font-size: 26px; margin-bottom: 20px; }
.tab { display: none; }
.tab.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tab-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.tab-head h2 { margin: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.card, .box { padding: 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--border); }
.card { display: flex; flex-direction: column; gap: 6px; }
.card i { color: var(--accent-2); font-size: 20px; margin-bottom: 6px; }
.card b { font-size: 30px; font-family: 'Rajdhani', sans-serif; }
.card span { color: var(--muted); font-size: 13px; }
.box h3 { font-size: 16px; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; }
.box h3 i { color: var(--accent-2); }
.help { list-style: none; display: flex; flex-direction: column; gap: 8px; color: #b8c3e3; font-size: 14px; }
.help li::before { content: '\203A'; color: var(--accent-2); margin-right: 10px; font-weight: 800; }
code { font-family: ui-monospace, monospace; font-size: 12.5px; padding: 2px 7px; border-radius: 6px; background: rgba(37, 99, 255, 0.16); color: #bfdbfe; }

.seg { display: flex; padding: 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); }
.seg button { padding: 8px 14px; border: none; border-radius: 9px; background: none; color: var(--muted); font: 600 13px 'Inter', sans-serif; cursor: pointer; }
.seg button.active { background: var(--accent); color: #fff; }

.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-width: 280px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); }
.search i { color: var(--muted); }
.search input { flex: 1; padding: 11px 0; background: none; border: none; outline: none; color: var(--text); font: inherit; font-size: 14px; }

select, .announce textarea, .modal textarea {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(10, 18, 42, 0.9);
    border: 1px solid var(--border);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
}
select:focus, .announce textarea:focus, .modal textarea:focus { border-color: var(--accent); }
select option { background: #0a1124; }

.list { display: flex; flex-direction: column; gap: 10px; }
.app-row { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.app-row:hover { border-color: rgba(92, 184, 255, 0.4); transform: translateX(3px); }
.app-row .type { min-width: 92px; text-align: center; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; padding: 5px 10px; border-radius: 8px; background: rgba(37, 99, 255, 0.18); color: #93c5fd; }
.app-row .who { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.app-row .who b { font-size: 15px; }
.app-row .who span, .app-row time { color: var(--muted); font-size: 12.5px; }
.empty { padding: 40px; text-align: center; color: var(--muted); border-radius: 14px; border: 1px dashed var(--border); }

.table-wrap { overflow-x: auto; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; padding: 13px 14px; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
td small { display: block; color: var(--muted); font-size: 11px; font-family: ui-monospace, monospace; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td select { padding: 6px 8px; font-size: 13px; }

.switch { position: relative; width: 40px; height: 22px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.1); cursor: pointer; transition: background 0.2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }

.mini { padding: 7px 12px; border-radius: 9px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.04); color: var(--text); font: 600 12.5px 'Inter', sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.mini:hover { border-color: var(--accent-2); }
.mini.ok { background: rgba(34, 197, 94, 0.16); border-color: rgba(34, 197, 94, 0.35); color: #4ade80; }
.mini.bad { background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.35); color: #f87171; }

.logs { display: flex; flex-direction: column; gap: 8px; }
.log { padding: 12px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: start; font-size: 13.5px; }
.log .cat { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; padding: 4px 8px; border-radius: 7px; background: rgba(92, 184, 255, 0.12); color: var(--accent-2); text-align: center; }
.log b { display: block; margin-bottom: 3px; }
.log p { color: #b8c3e3; white-space: pre-wrap; word-break: break-word; }
.log time { color: var(--muted); font-size: 12px; white-space: nowrap; }

.announce { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.announce p { color: var(--muted); font-size: 14px; }
.announce textarea, .modal textarea { width: 100%; resize: vertical; }
.row-end { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; }

.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(2, 4, 12, 0.75); backdrop-filter: blur(6px); }
.modal-card { position: relative; width: 100%; max-width: 720px; max-height: 88vh; overflow-y: auto; padding: 28px; border-radius: var(--radius); background: #0a1430; border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.modal-x { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 10px; border: none; background: rgba(255, 255, 255, 0.06); color: var(--text); cursor: pointer; }
.modal-x:hover { background: rgba(239, 68, 68, 0.25); }
.modal h3 { font-size: 22px; margin-bottom: 4px; padding-right: 40px; }
.modal .meta { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.modal .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.modal .grid2 div { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); font-size: 13px; }
.modal .grid2 span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.modal h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--accent-2); margin: 16px 0 8px; }
.modal .text { padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); color: #c7d2f0; font-size: 14px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

@media (max-width: 860px) {
    .panel-body { overflow: auto; height: auto; }
    .app { grid-template-columns: 1fr; height: auto; }
    .side { position: sticky; top: 0; z-index: 10; padding: 12px; }
    .side-logo { padding: 0 4px 10px; }
    .side-nav { flex-direction: row; overflow-x: auto; flex: none; }
    .side-nav button { white-space: nowrap; padding: 10px 12px; }
    .side-out { position: absolute; top: 10px; right: 12px; padding: 8px 12px; }
    .main { padding: 20px 16px 50px; overflow: visible; }
    .search { min-width: 0; width: 100%; }
    .log { grid-template-columns: 1fr; gap: 6px; }
    .log .cat { justify-self: start; }
}
