/* =============================================
   GATE PORTAL — ADDITIONAL STYLES SUPPLEMENT
   Appended to style.css for completeness
============================================= */

/* ── PAGE HERO ─────────────────────────────── */
.page-hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-bottom: 1px solid var(--border);
    padding: 32px 0 28px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79,142,247,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero-title {
    font-size: clamp(22px, 3.5vw, 34px);
    font-weight: 900;
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.15;
}
.hero-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* ── SEARCH BOX ─────────────────────────────── */
.search-box {
    position: relative;
}
.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
    z-index: 2;
}
.search-box .form-control {
    padding-left: 38px;
}

/* ── FILTER TABS ────────────────────────────── */
.filter-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.filter-tab {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.filter-tab:hover, .filter-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    text-decoration: none;
}

/* ── CONTENT CARD ───────────────────────────── */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    display: block;
    text-decoration: none;
    height: 100%;
}
.content-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-accent);
    text-decoration: none;
}
.content-card .card-thumb {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--bg-secondary);
}
.content-card .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.content-card:hover .card-thumb img { transform: scale(1.05); }
.thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 36px;
    color: var(--text-muted);
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
}
.card-cat {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(10,14,26,0.8);
    backdrop-filter: blur(4px);
    padding: 3px 8px;
    border-radius: 20px;
}
.content-card .card-body { padding: 16px; }
.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    text-decoration: none;
}
.card-title a {
    color: inherit;
    text-decoration: none;
}
.card-title a:hover { color: var(--primary); }
.card-excerpt {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.card-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-stats { display: flex; align-items: center; gap: 8px; }
.card-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
}
.card-stat i { font-size: 10px; }

/* ── DISCUSSION ITEMS ───────────────────────── */
.discussion-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s;
    position: relative;
}
.discussion-item:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
    transform: translateX(2px);
}
.discussion-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.discussion-content { flex: 1; min-width: 0; }
.discussion-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    transition: color 0.2s;
}
.discussion-title:hover { color: var(--primary); }
.discussion-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 5px;
    font-size: 11px;
    color: var(--text-muted);
}
.discussion-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.discussion-stat {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ── ARTICLE CONTENT ────────────────────────── */
.article-content {
    font-size: 15px;
    line-height: 1.85;
    color: var(--text-secondary);
}
.article-content p { margin-bottom: 1.2em; }
.article-content h2, .article-content h3, .article-content h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-primary);
    margin: 1.5em 0 0.6em;
}
.article-content img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 1em 0;
}
.article-content pre {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    overflow-x: auto;
    margin: 1em 0;
}
.article-content code {
    background: rgba(79,142,247,0.12);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}
.article-content blockquote {
    border-left: 3px solid var(--primary);
    margin: 1em 0;
    padding: 10px 20px;
    background: rgba(79,142,247,0.05);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* ── STATUS BADGES ──────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}
.status-approved { background: rgba(16,185,129,0.15); color: var(--success); }
.status-rejected { background: rgba(239,68,68,0.15); color: var(--danger); }
.status-pending  { background: rgba(245,158,11,0.15); color: var(--warning); }
.status-draft    { background: rgba(108,117,125,0.15); color: #6c757d; }

/* ── ROLE BADGES ────────────────────────────── */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}
.role-webmaster    { background: rgba(239,68,68,0.15);   color: var(--danger); }
.role-administrator{ background: rgba(245,158,11,0.15);  color: var(--warning); }
.role-moderator    { background: rgba(79,142,247,0.15);  color: var(--primary); }
.role-user         { background: rgba(108,117,125,0.12); color: #8a9ab5; }


/* ── ANNOUNCEMENT CARD ──────────────────────── */
.announcement-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}
.announcement-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    border-radius: 0;
}
.announcement-card.type-info::before    { background: var(--info); }
.announcement-card.type-warning::before { background: var(--warning); }
.announcement-card.type-success::before { background: var(--success); }
.announcement-card.type-danger::before  { background: var(--danger); }
.announcement-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ── INBOX ITEMS ────────────────────────────── */
.inbox-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
    cursor: pointer;
}
.inbox-item:hover { background: var(--bg-secondary); }
.inbox-item.unread { background: rgba(79,142,247,0.04); }
.inbox-item.unread .inbox-subject { color: var(--text-primary); }
.inbox-subject {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 2px;
}
.inbox-preview {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}
.inbox-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── BADGE DOT ──────────────────────────────── */
.badge-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

/* ── SIDEBAR WIDGET ─────────────────────────── */
.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.widget-header {
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-body { padding: 12px 16px; }

/* ── ALBUM GRID ─────────────────────────────── */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}
.album-photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-secondary);
    cursor: pointer;
}
.album-photo-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.album-photo-item:hover img { transform: scale(1.08); }
.album-photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.2s;
}
.album-photo-item:hover .album-photo-overlay { opacity: 1; }

/* ── LIGHTBOX ───────────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.lightbox.active {
    opacity: 1;
    pointer-events: all;
}
.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.lightbox-close {
    position: absolute;
    top: 20px; right: 24px;
    color: white;
    font-size: 22px;
    cursor: pointer;
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    border: none;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); color: white; }
.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 18px;
    background: rgba(255,255,255,0.1);
    border: none;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.25); }

/* ── LIKE BUTTON ────────────────────────────── */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.like-btn:hover, .like-btn.liked {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.4);
    color: #ef4444;
}
.like-btn.liked i { color: #ef4444; }
.like-btn i { transition: transform 0.2s; }
.like-btn:active i { transform: scale(1.3); }

/* ── GATE TABLE ─────────────────────────────── */
.gate-table {
    width: 100%;
    border-collapse: collapse;
}
.gate-table thead th {
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.gate-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.gate-table tbody tr:hover { background: var(--bg-secondary); }
.gate-table tbody td {
    padding: 10px 14px;
    vertical-align: middle;
    color: var(--text-secondary);
}
.gate-table tbody tr:last-child { border-bottom: none; }

/* ── ADMIN LAYOUT ───────────────────────────── */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}
.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
}
.admin-sidebar-header {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.18s;
    border-radius: 0;
    position: relative;
}
.admin-nav-item i { width: 16px; text-align: center; font-size: 13px; }
.admin-nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    text-decoration: none;
}
.admin-nav-item.active {
    color: var(--primary);
    background: rgba(79,142,247,0.1);
}
.admin-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}
.admin-content {
    flex: 1;
    padding: 28px 28px 48px;
    min-width: 0;
    overflow-x: auto;
}
.admin-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 24px;
}
.pending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 800;
    border-radius: 10px;
    line-height: 1;
}

/* ── EMPTY STATE ────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.4;
}
.empty-state h4, .empty-state h5 {
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.empty-state p { font-size: 14px; margin: 0; }

/* ── ANIMATIONS ─────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
    animation: fadeInUp 0.45s ease both;
}

/* ── MIN-WIDTH UTILITY ──────────────────────── */
.min-w-0 { min-width: 0; }
.fw-700  { font-weight: 700 !important; }
.fw-800  { font-weight: 800 !important; }
.fw-900  { font-weight: 900 !important; }

/* ── RANK BADGE ─────────────────────────────── */
.rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

/* ── TEXTAREA AUTO RESIZE ────────────────────── */
.auto-resize { resize: vertical; min-height: 70px; }

/* ── RESPONSIVE ADMIN SIDEBAR ───────────────── */
@media (max-width: 768px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        display: flex;
        overflow-x: auto;
        padding: 10px 0;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .admin-sidebar > div { display: flex; flex-direction: row; flex-wrap: nowrap; padding: 0 8px; }
    .admin-sidebar-header { display: none; }
    .admin-nav-item { white-space: nowrap; padding: 8px 14px; border-radius: 20px; }
    .admin-nav-item.active::before { display: none; }
    .admin-content { padding: 16px; }
    .admin-section-title { font-size: 18px; }
}
@media (max-width: 576px) {
    .discussion-stats { display: none; }
    .album-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
    .card-thumb { height: 160px; }
}

/* ── AUTO-APPROVE CONSTANT FALLBACK ─────────── */
/* Ensure AUTO_APPROVE_ARTICLES is defined via config.php */

/* ── CHAT EMPTY STATE ───────────────────────── */
.chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 120px;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    padding: 20px;
}
.chat-empty i {
    font-size: 28px;
    opacity: 0.4;
}