/* =====================================================================
   Shark Check  —  Navy Dark Theme
   ===================================================================== */

/* ------------------------------ Tokens ------------------------------ */
:root {
    --bg:      #010d1c;
    --bg-1:    #031524;
    --bg-2:    #051e36;

    --surface:       rgba(255,255,255,0.03);
    --surface-hover: rgba(59,130,246,0.07);
    --border:        rgba(255,255,255,0.075);
    --border-hover:  rgba(59,130,246,0.4);

    --blue:       #3b82f6;
    --blue-dark:  #2563eb;
    --blue-deep:  #1d4ed8;
    --blue-glow:  rgba(59,130,246,0.18);

    --text:     #cdd9ed;
    --text-dim: #5d7a99;
    --text-mute:#2d4a62;

    --success: #34d399;
    --danger:  #f87171;

    --radius:    10px;
    --radius-sm: 7px;
    --shadow:    0 1px 3px rgba(0,0,0,0.6), 0 4px 14px rgba(0,0,0,0.35);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);

    --grad-accent: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --font: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Legacy aliases used in some inline styles */
    --accent:             #3b82f6;
    --accent-2:           #2563eb;
    --accent-3:           #1d4ed8;
    --accent-glow:        rgba(59,130,246,0.18);
    --surface-border:     rgba(255,255,255,0.075);
    --surface-border-hover: rgba(59,130,246,0.4);
    --surface-strong:     rgba(255,255,255,0.055);
}

/* --------------------------- Keyframes ----------------------------- */
@keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}
@keyframes floaty {
    0%, 100% { transform: translateY(0);  }
    50%       { transform: translateY(-5px); }
}

/* ------------------------------ Base ------------------------------- */
* { box-sizing: border-box; }

html, body, h1, h2, h3, h4, h5, h6, p,
form, input, button, a, textarea, select,
td, th, label, span, div {
    margin: 0; padding: 0;
    font-family: var(--font);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1 { font-size: 2rem;   font-weight: 800; letter-spacing: -0.025em; color: var(--text); }
h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; }
h3 { font-weight: 600; }
h4 { font-weight: 600; }

p  { color: var(--text-dim); line-height: 1.6; }

a  { text-decoration: none; color: var(--blue); transition: color 0.15s; }
a:hover { color: #60a5fa; }

html, body { height: 100%; }

body {
    min-height: 100%;
    background: var(--bg);
    background-image: linear-gradient(180deg,
        #031d38 0%,
        #02152c 20%,
        #010d1c 60%,
        #010a17 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

@media (max-width: 900px) {
    html {
        background: var(--bg);
        background-image: linear-gradient(180deg, #031d38 0%, #010d1c 100%);
        min-height: 100%;
    }
    body { background: transparent !important; background-attachment: unset; }
}

/* Very subtle top-corner blue tint — barely there */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60% 35% at 0% 0%,   rgba(59,130,246,0.07) 0%, transparent 70%),
        radial-gradient(40% 30% at 100% 100%, rgba(29,78,216,0.05) 0%, transparent 70%);
}

/* --------------------------- Scrollbars ---------------------------- */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(59,130,246,0.25) transparent;
}
*::-webkit-scrollbar { width: 5px; height: 5px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: rgba(59,130,246,0.2);
    border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(59,130,246,0.38); }

/* ---------------------------- Inputs ------------------------------- */
input, select, textarea {
    padding: 10px 13px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: rgba(1,13,28,0.7);
    color: var(--text);
    outline: none;
    border: 1px solid var(--border);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input::placeholder, textarea::placeholder { color: var(--text-mute); }
input:hover, select:hover, textarea:hover { border-color: rgba(255,255,255,0.12); }
input:focus, select:focus, textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
    background: rgba(1,13,28,0.95);
}

select { cursor: pointer; appearance: none; -webkit-appearance: none; }

/* ---------------------------- Buttons ------------------------------ */
button {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    background: var(--blue-dark);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    border: 1px solid rgba(59,130,246,0.25);
    cursor: pointer;
    letter-spacing: 0.01em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
}
button:hover {
    background: var(--blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(59,130,246,0.22), inset 0 1px 0 rgba(255,255,255,0.1);
}
button:active { transform: translateY(0) scale(0.99); }
button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Ghost */
button[style*="transparent"] {
    background: transparent;
    border: 1px solid var(--border);
    box-shadow: none;
    color: var(--text-dim);
}
button[style*="transparent"]:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    color: var(--text);
    transform: translateY(-1px);
}

/* ----------------------------- Tables ------------------------------ */
table { border-collapse: collapse; width: 100%; }

thead td, thead th, th {
    color: var(--text-mute);
    font-weight: 600;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    padding: 10px;
}
thead tr { border-bottom: 1px solid var(--border) !important; }

tr {
    border-bottom: 1px solid rgba(255,255,255,0.035) !important;
    transition: background 0.1s;
}
tbody tr:hover { background: rgba(59,130,246,0.04); }
td { padding: 10px; font-size: 13px; }

/* --------------------------- Telegram banner ----------------------- */
#tgdiv {
    position: relative;
    top: -90px;
    background: rgba(59,130,246,0.06);
    border-bottom: 1px solid var(--border);
    width: 100%;
    padding: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: top 0.4s cubic-bezier(.2,.8,.2,1);
    gap: 10px;
}
#tgdiv:hover { background: rgba(59,130,246,0.1); cursor: pointer; }
#tgdiv img { animation: floaty 3s ease-in-out infinite; }

/* ---------------------------- Sidebar ------------------------------ */
#leftmenu {
    background: #020b17 !important;
    border-right: 1px solid var(--border);
}

#leftmenu h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.lm-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 20px 18px 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.lm-brand .logo {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--blue-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.lm-profile {
    margin: 8px 12px 6px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-radius: 8px;
    background: rgba(59,130,246,0.06);
    border: 1px solid rgba(59,130,246,0.1);
}
.lm-profile img {
    width: 38px; height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(59,130,246,0.25);
}
.lm-profile .info { overflow: hidden; }
.lm-profile .info b {
    font-size: 13px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lm-profile .info small { font-size: 11px; color: var(--text-mute); }

.lm-section {
    font-size: 9.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-mute);
    font-weight: 700;
    padding: 14px 18px 5px;
}
.lm-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding-bottom: 14px;
}

.left-menu {
    margin-top: 2px;
    width: 92%;
    height: 40px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    position: relative;
    border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s, transform 0.1s;
}
.left-menu:hover {
    background: rgba(59,130,246,0.08);
    border-color: rgba(59,130,246,0.14);
    cursor: pointer;
    transform: translateX(2px);
}
.left-menu::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 2px; height: 0;
    border-radius: 0 2px 2px 0;
    background: var(--blue);
    transition: height 0.15s;
}
.left-menu:hover::before,
.left-menu.active::before { height: 52%; }

.left-menu.active {
    background: rgba(59,130,246,0.1) !important;
    border-color: rgba(59,130,246,0.2) !important;
}
.left-menu.active .left-menup { color: var(--text) !important; }
.left-menu.active .left-menuimg { opacity: 0.95 !important; }

.left-menuimg {
    width: 20px; height: 20px;
    margin-left: 13px;
    object-fit: contain;
    opacity: 0.45;
    transition: opacity 0.12s;
    filter: brightness(0.6) saturate(0);
}
.left-menu:hover .left-menuimg,
.left-menu.active .left-menuimg {
    opacity: 0.85;
    filter: none;
}

.left-menup {
    margin-left: 11px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-dim);
    transition: color 0.12s;
}
.left-menu:hover .left-menup { color: var(--text); }

.lm-badge {
    margin-left: auto; margin-right: 12px;
    background: rgba(59,130,246,0.1); color: var(--blue);
    border: 1px solid rgba(59,130,246,0.18);
    font-size: 10.5px; font-weight: 700;
    padding: 2px 7px; border-radius: 999px;
}

/* --------------------------- Utilities ----------------------------- */
.std { text-align: center; }

/* ------------------------------ Chat ------------------------------- */
.message {
    background: var(--surface) !important;
    border: 1px solid var(--border);
    border-radius: 8px !important;
    transition: border-color 0.12s;
}
.message:hover { border-color: rgba(255,255,255,0.12); }
.content h4 { font-weight: 700; }

.delchat {
    background: rgba(248,113,113,0.08) !important;
    border: 1px solid rgba(248,113,113,0.2);
    border-radius: 7px !important;
    display: flex; align-items: center; justify-content: center;
}
.delchat:hover { background: rgba(248,113,113,0.18) !important; }

/* --------------------------- Statistics ---------------------------- */
.day {
    border-radius: 8px !important;
    border: 1px solid var(--border);
    transition: transform 0.14s, border-color 0.14s;
}
.day:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.12); }
.livecont { border-radius: 999px !important; overflow: hidden; }

/* ==================== Layout ==================== */
.app { width: 100%; height: 100%; display: flex; }
.page { flex: 1; min-width: 0; height: 100vh; overflow-y: scroll; }
.page-inner { width: 90%; max-width: 1160px; margin: 0 auto; padding: 30px 0 48px; }

.page-head {
    display: flex; align-items: flex-end;
    justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 6px;
}
.page-head h1 { font-size: 1.75rem; }
.page-head .sub { color: var(--text-mute); font-size: 13px; margin-top: 3px; }

/* Cards */
.card {
    background: rgba(3,21,36,0.7);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    animation: rise 0.35s ease both;
}
.card + .card, .page-inner > .card { margin-top: 16px; }
.card-title {
    display: flex; align-items: center; gap: 9px;
    font-size: 0.95rem; font-weight: 700;
    margin-bottom: 14px; color: var(--text);
}

.filters { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; justify-content: center; }
.filters select, .filters input { min-width: 130px; margin: 0; }

.tbl-wrap { width: 100%; overflow-x: auto; margin-top: 6px; }
.tbl-wrap table { width: 100%; border-collapse: collapse; min-width: 700px; }

.empty-state { text-align: center; color: var(--text-mute); padding: 28px; font-size: 13px; }

/* Chip */
.chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 999px;
    font-size: 11px; font-weight: 600;
    background: rgba(59,130,246,0.08); color: var(--blue);
    border: 1px solid rgba(59,130,246,0.15);
}

/* Tag badges used in checker */
.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.tag.live { background: rgba(52,211,153,0.09); color: var(--success); border: 1px solid rgba(52,211,153,0.2); }
.tag.dead { background: rgba(248,113,113,0.09); color: var(--danger);  border: 1px solid rgba(248,113,113,0.2); }
.tag.dfacto { background: rgba(59,130,246,0.09); color: var(--blue);    border: 1px solid rgba(59,130,246,0.2); }

@media (max-width: 900px) { .page-inner { width: 94%; } }

/* --------------------------- Motion -------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, body::before { transition: none !important; animation: none !important; }
}

/* Touch fix */
@media (hover: none) and (pointer: coarse) {
    * { -webkit-tap-highlight-color: transparent; }
    button { transform: none !important; transition: opacity 0.12s !important; }
    button:active { opacity: 0.72; }
}
