:root {
    --bg: #050a14;
    --bg-soft: #08111f;
    --surface: rgba(10, 20, 36, 0.76);
    --surface-strong: rgba(13, 25, 44, 0.95);
    --surface-hover: rgba(22, 39, 65, 0.9);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --border: rgba(148, 163, 184, 0.13);
    --border-strong: rgba(96, 165, 250, 0.30);
    --primary: #4f8cff;
    --primary-strong: #2563eb;
    --primary-soft: rgba(79, 140, 255, 0.13);
    --purple: #8b5cf6;
    --discord: #5865f2;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    min-height: 100vh;
    font-family: "Inter", sans-serif;
    background:
        radial-gradient(circle at 14% 0%, rgba(79, 140, 255, 0.14), transparent 31%),
        radial-gradient(circle at 90% 12%, rgba(139, 92, 246, 0.11), transparent 28%),
        radial-gradient(circle at 48% 100%, rgba(37, 99, 235, 0.07), transparent 36%),
        var(--bg);
    color: var(--text);
    overflow-x: hidden;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 88%);
}
::selection {
    background: rgba(79, 140, 255, 0.3);
    color: #fff;
}
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 999px;
}
a, button, input {
    font: inherit;
}
button {
    color: inherit;
}
.hidden {
    display: none !important;
}
.nav-wrap {
    position: fixed;
    top: 18px;
    left: 0;
    right: 0;
    z-index: 1000;
    pointer-events: none;
}
.island-nav {
    pointer-events: auto;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px 12px 10px 16px;
    background: rgba(7, 15, 27, 0.82);
    border: 1px solid var(--border);
    border-radius: 22px;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}
.nav-left,
.brand-info,
.nav-menu,
.nav-right {
    display: flex;
    align-items: center;
}
.nav-left {
    gap: 26px;
    min-width: 0;
}
.brand-info {
    gap: 11px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
#guild-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 22px rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(255,255,255,0.08);
}
.brand-copy {
    min-width: 0;
}
.brand-copy h1 {
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
}
.brand-copy span {
    display: block;
    margin-top: 3px;
    color: var(--muted-2);
    font-size: 0.72rem;
    font-weight: 600;
}
.nav-menu {
    gap: 4px;
}
.nav-item {
    color: var(--muted);
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: 0.2s ease;
}
.nav-item:hover,
.nav-item.active {
    color: #fff;
    background: rgba(255,255,255,0.055);
}
.nav-item.active {
    color: #cfe0ff;
    box-shadow: inset 0 0 0 1px rgba(79, 140, 255, 0.17);
}
.nav-right {
    gap: 8px;
    flex-shrink: 0;
}
.btn,
.logout-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    transition: 0.2s ease;
}
.btn {
    color: #fff;
    background: var(--discord);
    border: 1px solid transparent;
    box-shadow: 0 10px 26px rgba(88, 101, 242, 0.22);
}
.btn:hover {
    transform: translateY(-1px);
    background: #6875f5;
}
.logout-btn {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.09);
    border: 1px solid rgba(239, 68, 68, 0.16);
}
.logout-btn:hover {
    color: #fff;
    background: rgba(239, 68, 68, 0.18);
}
.container {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 126px 0 54px;
}
.content-wrapper {
    width: 100%;
}
.page-header {
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    padding: 34px 36px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(13, 25, 44, 0.94), rgba(7, 15, 27, 0.9));
    box-shadow: var(--shadow);
}
.page-header::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    right: -100px;
    top: -160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 140, 255, 0.22), transparent 66%);
}
.page-header h2 {
    position: relative;
    z-index: 1;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.055em;
    line-height: 1;
}
.page-header p {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin-top: 13px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 0.98rem;
}
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    width: 100%;
}
.app-card,
.dashboard-card,
.panel-card,
.guidelines-section {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(0,0,0,0.16);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.app-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: 0.22s ease;
}
.app-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: 0 22px 52px rgba(0,0,0,0.22);
}
.app-banner,
.banner-wrapper {
    width: 100%;
}
.app-banner {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.banner-wrapper {
    height: 170px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(79,140,255,.08), rgba(139,92,246,.05));
    border-bottom: 1px solid var(--border);
}
.banner-wrapper .app-banner {
    width: 126px;
    height: 126px;
    background-size: contain;
    filter: drop-shadow(0 12px 24px rgba(0,0,0,.35));
    transition: 0.25s ease;
}
.app-card:hover .banner-wrapper .app-banner {
    transform: scale(1.05);
}
.app-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px;
}
.app-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.app-header h3 {
    font-size: 1rem;
    line-height: 1.4;
}
.status-badge {
    flex-shrink: 0;
    padding: 6px 9px;
    border-radius: 999px;
    color: #bcd4ff;
    background: var(--primary-soft);
    border: 1px solid rgba(79,140,255,.2);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.status-open {
    color: #86efac;
    background: rgba(34,197,94,.09);
    border-color: rgba(34,197,94,.18);
}
.status-closed {
    color: #fca5a5;
    background: rgba(239,68,68,.09);
    border-color: rgba(239,68,68,.18);
}
.section-desc,
.dept-meta,
.transcript-meta,
.stat-subtext {
    color: var(--muted);
}
.section-desc {
    margin-bottom: 20px;
    line-height: 1.65;
    font-size: 0.86rem;
}
.dept-meta,
.transcript-meta {
    font-size: 0.79rem;
    line-height: 1.6;
}
.dept-meta {
    margin: -2px 0 14px;
}
.dept-meta span,
.transcript-meta span {
    color: #cbd5e1;
}
.duty-btn,
.portal-btn,
.back-btn,
.action-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 12px;
    color: #dbeafe;
    background: rgba(79,140,255,.08);
    border: 1px solid rgba(79,140,255,.22);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}
.duty-btn:hover,
.portal-btn:hover,
.back-btn:hover,
.action-btn:hover {
    color: #fff;
    background: rgba(79,140,255,.15);
    border-color: rgba(79,140,255,.42);
    transform: translateY(-1px);
}
.duty-btn:disabled {
    cursor: not-allowed;
    opacity: .45;
    transform: none;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 34px 0 16px;
    color: #dce8ff;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.empty-state,
.auth-state {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px dashed var(--border);
    border-radius: 18px;
    color: var(--muted);
    background: rgba(255,255,255,.018);
    text-align: center;
    line-height: 1.7;
}
.auth-state a,
.empty-state a {
    color: #8ab4ff;
}
@media (max-width: 900px) {
    .nav-menu {
        display: none;
    }
    .container {
        padding-top: 110px;
    }
}
@media (max-width: 640px) {
    .island-nav,
    .container {
        width: calc(100% - 24px);
    }
    .nav-wrap {
        top: 12px;
    }
    .island-nav {
        min-height: 62px;
        padding: 9px 10px 9px 12px;
        border-radius: 18px;
    }
    .brand-copy span {
        display: none;
    }
    .brand-copy h1 {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .btn,
    .logout-btn {
        min-height: 38px;
        padding: 0 12px;
        font-size: .74rem;
    }
    .container {
        padding: 92px 0 28px;
    }
    .page-header {
        padding: 26px 24px;
        border-radius: 22px;
    }
    .content-grid {
        grid-template-columns: 1fr;
    }
}


.bottom-banner {
    margin-top: 20px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(10,20,36,.72);
}
.bottom-banner p {
    color: var(--muted);
    line-height: 1.6;
}
.bottom-actions a {
    white-space: nowrap;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    background: var(--discord);
    font-size: .82rem;
    font-weight: 700;
}
@media (max-width: 650px) {
    .bottom-banner {
        flex-direction: column;
        align-items: stretch;
    }
    .bottom-actions a {
        justify-content: center;
    }
}
