:root{
    --bg: #0b0b0c;
    --card: #121214;
    --text: #f6f6f6;
    --muted: #b6b6b6;
    --accent: #ff7a00;
    --accent-2: #ff9f3d;
    --red: #e10600;
    --ok: #38c172;
    --warn: #ffcc00;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
    background:
            radial-gradient(1200px 600px at 80% -10%, rgba(255,122,0,.15), transparent 60%),
            radial-gradient(800px 400px at 10% 110%, rgba(255,122,0,.12), transparent 60%),
            var(--bg);
    color: var(--text);
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1100px, 92vw); margin: 0 auto; }

main > .container {
    padding: 70px 15px 20px;
}

.site-header {
    border-bottom: 1px solid rgba(255,255,255,.06);
    position: sticky;
    top: 0;
    backdrop-filter: saturate(180%) blur(8px);
    background: linear-gradient(180deg, rgba(11,11,12,.78), rgba(11,11,12,.40));
    z-index: 10;
    overflow: hidden;
}

.site-header::before{
    content:"";
    position:absolute; inset:-20px;
    pointer-events:none;
    background:
            radial-gradient(18px 14px at 10% 35%, rgba(225,6,0,.18), transparent 70%),
            radial-gradient(22px 18px at 18% 55%, rgba(225,6,0,.14), transparent 72%),
            radial-gradient(30px 22px at 32% 30%, rgba(225,6,0,.12), transparent 70%),
            radial-gradient(16px 12px at 55% 45%, rgba(225,6,0,.10), transparent 70%),
            radial-gradient(28px 20px at 78% 40%, rgba(225,6,0,.12), transparent 70%),
            radial-gradient(20px 16px at 92% 62%, rgba(225,6,0,.10), transparent 72%);
    filter: blur(0.2px);
    opacity: .85;
    mix-blend-mode: screen;
}

.site-header::after{
    content:"";
    position:absolute; inset:0;
    pointer-events:none;
    background: radial-gradient(700px 140px at 50% 0%, rgba(255,122,0,.12), transparent 60%);
    opacity: .8;
}

.nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 18px;
    flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-title { font-size: 20px; font-weight: 900; letter-spacing: .7px; }
.brand-sub { font-size: 13px; color: var(--muted); }

.logo-img{
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: radial-gradient(circle at top, rgba(255,80,80,.95), rgba(225,6,0,.92));
    display: grid;
    place-items: center;
    box-shadow:
            0 0 0 2px rgba(255,255,255,.08),
            0 0 28px rgba(225,6,0,.42),
            0 10px 30px rgba(0,0,0,.35);
    animation: breathe 3.2s ease-in-out infinite;
    will-change: transform, box-shadow;
}
.logo-img img{
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.7));
    transform: translateY(.5px);
}
@keyframes breathe{
    0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 0 0 2px rgba(255,255,255,.08), 0 0 26px rgba(225,6,0,.38), 0 10px 30px rgba(0,0,0,.35); }
    50% { transform: translateY(-1px) scale(1.02); box-shadow: 0 0 0 2px rgba(255,255,255,.10), 0 0 34px rgba(225,6,0,.52), 0 14px 34px rgba(0,0,0,.40); }
}
@media (prefers-reduced-motion: reduce){
    .logo-img { animation: none; }
}

.nav-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.nav-link:hover {
    border-color: rgba(255,255,255,.12);
    text-decoration: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pill {
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    font-size: 14px;
    color: var(--muted);
    background: rgba(18,18,20,.35);
}

.hero { display: grid; gap: 22px; padding: 42px 0 28px; }
.hero-cover {
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(18,18,20,.35);
    box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.hero-cover img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
}
.title { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.05; margin: 0; }
.subtitle { color: var(--muted); margin: 0; }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 16px; border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: #151517; color: var(--text);
    cursor: pointer; transition: transform .04s ease;
    text-decoration: none;
    font-size: 14px;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn.primary {
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    color: #111; border: none; font-weight: 700;
}

.btn-small { padding: 8px 12px; font-size: 13px; }
.btn-ghost { background: rgba(18,18,20,.35); }
.btn-danger { background: rgba(225,6,0,.15); color: #fff; border-color: rgba(225,6,0,.4); }
.btn-disabled { opacity: .4; pointer-events: none; }

.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) { .grid { grid-template-columns: 1.2fr .8fr; } }

.card {
    background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 18px;
    color: var(--text);
}
.card h3 { margin-top: 0; }

.schedule { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.schedule .item {
    background: #151517;
    border: 1px solid rgba(255,255,255,.08);
    padding: 8px 10px; border-radius: 10px;
    color: var(--muted); font-size: 14px;
}

.list { display: grid; gap: 10px; padding-left: 20px; }

.site-footer { margin: 26px 0 50px; color: var(--muted); font-size: 14px; }
.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    text-align: center;
}
.site-footer__links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: #19191c;
    padding: 2px 6px; border-radius: 6px;
    border: 1px solid rgba(255,255,255,.08);
}
.muted { color: var(--muted); }

.section-spacer { margin-top: 16px; }

.link-info { color: #0dcaf0; }
.link-danger { color: #b02a37; }

.chat-wrap { max-width: 1100px; margin: 0 auto; padding: 16px; color: #eaeaea; }
.chat-title { font-size: 22px; margin: 0 0 16px; color: #fff; }
.chat-warning {
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;
    padding: 14px 16px;
    background: rgba(255,255,255,.04);
    color: #f0f0f0;
}
.chat-meta { margin-top: 8px; font-size: 13px; opacity: .8; color: #d0d0d0; }

.chat-list { margin-top: 16px; }
.chat-item {
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(6px);
}
.chat-item + .chat-item { margin-top: 10px; }

.chat-top { display:flex; gap:10px; flex-wrap:wrap; align-items:center; font-size: 12px; color:#d6d6d6; }
.chat-message { margin-top: 6px; color:#fff; white-space: normal; }
.pager { margin-top: 18px; }

.diary-wrap { max-width: 1100px; margin: 0 auto; padding: 16px; color: #eaeaea; }
.diary-wrap a { color: #eaeaea; }

.diary-header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.diary-title { font-size: 22px; margin: 0; color: #fff; }
.diary-meta { opacity:.85; font-size: 13px; color:#d8d8d8; }
.diary-actions { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }

.filter-card {
    padding: 12px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    margin: 14px 0 18px;
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(6px);
}

.filter-row { display:flex; gap:12px; flex-wrap:wrap; align-items:end; }

.filter-item label { font-size: 12px; opacity: .8; display:block; margin-bottom:4px; color:#d8d8d8; }

.filter-item input[type=text], .filter-item select {
    height: 34px;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 10px;
    background: rgba(0,0,0,.35);
    color: #fff;
    outline: none;
}

.filter-item input[type=text]::placeholder { color: rgba(255,255,255,.35); }

.filter-item-wide { flex: 1; min-width: 360px; }

.types-box {
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    padding: 10px 10px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;
    background: rgba(0,0,0,.25);
    max-width: 860px;
}

.types-box label { font-size: 12px; white-space:nowrap; color:#eaeaea; opacity:.95; }
.types-box input { accent-color: #fff; }

.btn-primary {
    background:#fff;
    color:#000;
    border-color:#fff;
    font-weight:600;
}
.btn-primary:hover { background:#f2f2f2; }

.small { font-size: 12px; opacity: .75; color: #d0d0d0; }
code { background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 8px; color:#fff; }

.day { margin-top: 18px; }

.day-title {
    font-size: 15px;
    margin: 0 0 10px;
    position: sticky;
    top: 0;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(0,0,0,.35);
    color:#fff;
    backdrop-filter: blur(6px);
}

.event {
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(6px);
}

.event + .event { margin-top: 10px; }

.event-top {
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
    font-size: 12px;
    color:#d6d6d6;
}

.badge {
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.35);
    color:#fff;
}

.event-main { margin-top: 6px; color:#fff; }
.event-title-row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.event-icon { font-size:16px; }
.event-title { font-weight: 600; }
.event-subtitle { margin-top:4px; opacity:.9; }

.event-details { margin-top: 8px; }
summary { cursor: pointer; color:#d6d6d6; }

.event-pre {
    white-space: pre-wrap;
    margin: 8px 0 0;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(0,0,0,.35);
    color: #f0f0f0;
    overflow: auto;
}

.pager { margin-top: 18px; display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.pager .spacer { flex:1; }

.helper-text { margin-top: 8px; }

.tracking-iframe { display:none; visibility:hidden; }
.tracking-pixel { position:absolute; left:-9999px; }

.footer {
    background-color: #f5f5f5;
    font-size: .9em;
    height: 60px;
}

.footer > .container {
    padding-right: 15px;
    padding-left: 15px;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media(max-width:767px) {
    .nav li > form > button.logout {
        display:block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav > li > form > button.logout:focus {
    outline: none;
}

.form-group {
    margin-bottom: 1rem;
}

.page-container { margin-top: 32px; }
.login-hint { margin-top: 12px; }
