/* =========================================================
   NTH ISLE — Components extras
   ========================================================= */

/* ============================================================
   Notifications bell
   ============================================================ */
.notif-bell { position: relative; }
.bell-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px; height: 40px;
    border-radius: 50%;
    display: grid; place-items: center;
    position: relative;
    transition: background var(--t-fast), border-color var(--t-fast);
}
.bell-btn:hover { background: var(--bg-elev); border-color: var(--accent-2); }
.bell-dot {
    position: absolute; top: -3px; right: -3px;
    background: var(--danger);
    color: #fff;
    font-size: .65rem; font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-1);
    box-shadow: 0 0 0 2px var(--bg-1);
}
.bell-dropdown {
    position: absolute; right: 0; top: calc(100% + 10px);
    width: 380px; max-width: calc(100vw - 32px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-3);
    z-index: 200;
    overflow: hidden;
    animation: dropdown .15s ease-out;
}
@keyframes dropdown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.bell-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.bell-list { max-height: 420px; overflow-y: auto; }
.bell-empty { padding: 32px 16px; text-align: center; color: var(--text-muted); }
.bell-footer {
    display: block;
    padding: 12px;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--accent);
    font-weight: 600;
    background: var(--bg-elev);
}
.bell-footer:hover { background: var(--bg-elev-2); color: var(--accent); }

.notif-item {
    display: flex; gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    transition: background var(--t-fast);
    position: relative;
}
.notif-item:hover  { background: var(--bg-elev); color: var(--text); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(94,210,109,.04); }
.notif-item.unread::before {
    content: '';
    position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}
.notif-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(94,210,109,.2), rgba(94,210,109,.05));
    border: 1px solid rgba(94,210,109,.2);
    display: grid; place-items: center;
    color: var(--accent);
    flex-shrink: 0;
    font-size: .9rem;
}
.notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.notif-title { font-weight: 600; font-size: .92rem; line-height: 1.35; }
.notif-text  {
    color: var(--text-muted); font-size: .85rem;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.notif-time  { font-size: .75rem; margin-top: 4px; color: var(--text-muted); }

.link-btn {
    background: none; border: none;
    color: var(--accent); cursor: pointer;
    font-size: .85rem; padding: 0;
}
.link-btn:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .bell-dropdown { right: -60px; }
}

/* ============================================================
   Tickets
   ============================================================ */
.ticket-list { display: flex; flex-direction: column; gap: 10px; }
.ticket-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    align-items: center;
    transition: all var(--t-fast);
}
.ticket-row:hover { border-color: var(--accent-2); background: var(--bg-elev); color: var(--text); transform: translateX(2px); }
.ticket-cat-icon {
    width: 42px; height: 42px;
    border-radius: var(--radius-sm);
    display: grid; place-items: center;
    font-size: 1.15rem;
    border: 1px solid currentColor;
    opacity: .9;
}
.ticket-info { min-width: 0; }
.ticket-subj { font-weight: 600; font-size: 1rem; }
.ticket-meta { color: var(--text-muted); font-size: .82rem; margin-top: 3px; }
.ticket-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ticket-arrow { color: var(--text-muted); transition: transform var(--t-fast); }
.ticket-row:hover .ticket-arrow { transform: translateX(4px); color: var(--accent); }

/* Ticket chat */
.ticket-chat { display: flex; flex-direction: column; gap: 14px; }
.msg {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    animation: fadeIn .25s ease-out;
}
.msg-avatar img, .msg-avatar > .ava {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.msg-body {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    position: relative;
}
.msg-body::before {
    content: '';
    position: absolute;
    left: -8px; top: 16px;
    width: 0; height: 0;
    border: 8px solid transparent;
    border-right-color: var(--border);
    border-left: 0;
}
.msg-body::after {
    content: '';
    position: absolute;
    left: -7px; top: 16px;
    width: 0; height: 0;
    border: 8px solid transparent;
    border-right-color: var(--bg-card);
    border-left: 0;
}
.msg.staff .msg-body {
    border-color: rgba(94,210,109,.4);
    background: rgba(94,210,109,.04);
}
.msg.staff .msg-body::before { border-right-color: rgba(94,210,109,.4); }
.msg.staff .msg-body::after  { border-right-color: rgba(15,22,18,1); }
.msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: .9rem; }
.msg-name { font-weight: 600; color: var(--text); }
.msg-name:hover { color: var(--accent); }
.msg-time { color: var(--text-muted); font-size: .78rem; margin-left: auto; }
.msg-text { white-space: pre-wrap; word-wrap: break-word; font-size: .95rem; line-height: 1.6; }

/* ============================================================
   Profile banner (public + cabinet)
   ============================================================ */
.profile-banner {
    background:
        linear-gradient(135deg, rgba(94,210,109,.1), transparent 60%),
        var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    gap: 28px;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}
.profile-banner::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(94,210,109,.08), transparent 70%);
    pointer-events: none;
}
.profile-banner > * { position: relative; }
.profile-banner .ava {
    width: 128px; height: 128px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    object-fit: cover;
    box-shadow: var(--shadow-3);
}
.profile-banner h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.profile-banner .muted { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-meta { display: flex; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.profile-meta .item {
    display: flex; gap: 8px; align-items: center;
    color: var(--text-soft); font-size: .9rem;
}
.profile-meta .item i { color: var(--accent); }
.profile-meta .item a { color: var(--text-soft); }
.profile-meta .item a:hover { color: var(--accent); }

@media (max-width: 600px) {
    .profile-banner { flex-direction: column; text-align: center; padding: 24px; }
    .profile-meta { justify-content: center; }
    .profile-banner .ava { width: 100px; height: 100px; }
}

/* ============================================================
   Sidebar nav (cabinet/admin)
   ============================================================ */
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    display: flex; align-items: center; gap: 12px;
    transition: all var(--t-fast);
    font-size: .92rem;
    font-weight: 500;
    border: 1px solid transparent;
}
.side-nav a i {
    width: 18px; text-align: center;
    color: var(--text-muted);
    transition: color var(--t-fast);
}
.side-nav a:hover { background: var(--bg-elev); color: var(--text); }
.side-nav a:hover i { color: var(--accent); }
.side-nav a.active {
    background: linear-gradient(90deg, rgba(94,210,109,.12), transparent);
    color: var(--text);
    border-color: rgba(94,210,109,.2);
}
.side-nav a.active i { color: var(--accent); }

/* ============================================================
   2FA QR + backup codes
   ============================================================ */
.qr-box {
    display: flex; gap: 24px; flex-wrap: wrap;
    align-items: center; padding: 16px;
    background: var(--bg-elev);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.qr-box canvas { background: #fff; padding: 12px; border-radius: var(--radius-sm); box-shadow: var(--shadow-1); }
.code-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-family: ui-monospace, monospace;
    margin-top: 12px;
}
.code-grid code {
    background: var(--bg-card);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-align: center;
    font-size: 1rem;
    letter-spacing: .08em;
}

/* ============================================================
   Stats card (dashboard)
   ============================================================ */
.stat-card {
    background:
        linear-gradient(180deg, var(--bg-card), var(--bg-1)),
        var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: border-color var(--t-fast), transform var(--t-fast);
}
.stat-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.stat-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: var(--accent);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0;
    transition: opacity var(--t);
}
.stat-card:hover::after { opacity: .15; }
.stat-card .stat-label {
    color: var(--text-muted);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.stat-card .stat-label i { color: var(--accent); }
.stat-card .stat-value {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}
.stat-card .stat-sub { color: var(--text-soft); font-size: .85rem; margin-top: 6px; }

/* ============================================================
   Activity log
   ============================================================ */
.activity-item {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    align-items: center;
    transition: border-color var(--t-fast);
}
.activity-item:hover { border-color: var(--border-hi); }
.activity-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(94,210,109,.18), rgba(94,210,109,.05));
    border: 1px solid rgba(94,210,109,.2);
    display: grid; place-items: center;
    color: var(--accent);
    font-size: .85rem;
}

/* ============================================================
   Tabs
   ============================================================ */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    margin-bottom: 24px;
}
.tabs a {
    padding: 12px 18px;
    color: var(--text-soft);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color var(--t-fast), border-color var(--t-fast);
    font-weight: 500;
    white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ============================================================
   Cabinet layout
   ============================================================ */
.cabinet-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}
.cabinet-aside { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) {
    .cabinet-grid { grid-template-columns: 1fr; }
}

.admin-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
}
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } }

/* Tag-like search box */
.search-bar {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.search-bar input, .search-bar select {
    padding: 10px 14px;
    background: var(--bg-elev);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    font-size: .92rem;
}
.search-bar input:focus, .search-bar select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(94,210,109,.12);
}
.search-bar input[type="text"], .search-bar input[type="search"] { flex: 1; min-width: 200px; }

/* ============================================================
   Hero art (silhouette dino)
   ============================================================ */
.dino-silhouette {
    width: 100%;
    height: auto;
    fill: url(#dinoGrad);
    filter: drop-shadow(0 0 40px rgba(94,210,109,.4));
}

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    background: var(--bg-card);
    border: 1px dashed var(--border-hi);
    border-radius: var(--radius);
}
.empty-state-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
    display: grid; place-items: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.empty-state h3 { margin: 0 0 6px; }
.empty-state p  { color: var(--text-muted); margin: 0 0 16px; }

/* ============================================================
   Status indicator (online/offline)
   ============================================================ */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
}
.status-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}
.status-dot.online { background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: pulse 2s infinite; }
.status-dot.offline { background: var(--danger); }

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
    display: flex;
    gap: 4px;
    margin-top: 24px;
    justify-content: center;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-soft);
    transition: all var(--t-fast);
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}
.pagination a:hover { color: var(--text); border-color: var(--accent-2); }
.pagination .active {
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    color: #07140a;
    border-color: transparent;
    font-weight: 700;
}
.pagination .disabled { opacity: .5; pointer-events: none; }

/* ============================================================
   Avatar grid (player list etc.)
   ============================================================ */
.player-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: all var(--t-fast);
}
.player-card:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.player-card .ava {
    width: 80px; height: 80px;
    border-radius: 50%;
    margin: 0 auto 12px;
    object-fit: cover;
    border: 2px solid var(--border);
}
.player-card .name { font-weight: 600; margin-bottom: 2px; color: var(--text); }
.player-card .meta { color: var(--text-muted); font-size: .82rem; }

/* ============================================================
   Tooltip (CSS-only)
   ============================================================ */
[data-tip] { position: relative; }
[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elev-2);
    color: var(--text);
    padding: 5px 10px;
    border-radius: var(--radius-xs);
    font-size: .78rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--t-fast);
    z-index: 50;
    border: 1px solid var(--border);
}
[data-tip]:hover::after { opacity: 1; }

/* ============================================================
   Markdown-like prose
   ============================================================ */
.prose { line-height: 1.7; color: var(--text-2); max-width: 70ch; }
.prose h2 { margin-top: 1.5em; }
.prose h3 { margin-top: 1.3em; color: var(--text); }
.prose ol, .prose ul { padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); }
