/* eevent Intranet – Frontend Styles
   Designed to match eevent.ch dark theme.
   Uses native CSS variables + Tailwind utility classes from the theme.
*/

:root {
    --eevi-bg:       #0f172a;
    --eevi-card:     #1e293b;
    --eevi-border:   #334155;
    --eevi-accent:   #3b82f6;
    --eevi-accent2:  #6366f1;
    --eevi-text:     #f1f5f9;
    --eevi-muted:    #94a3b8;
    --eevi-green:    #22c55e;
    --eevi-yellow:   #eab308;
    --eevi-red:      #ef4444;
    --eevi-purple:   #a855f7;
}

/* ── Base ─────────────────────────────────────────────────────── */
.eevi-intranet {
    color: var(--eevi-text);
    font-family: inherit;
}
.eevi-intranet * { box-sizing: border-box; }

/* ── Page header ──────────────────────────────────────────────── */
.eevi-page-header { margin-bottom: 24px; }
.eevi-page-header h2 { font-size: 1.5rem; font-weight: 700; color: #fff; margin: 0 0 4px; }
.eevi-page-header p  { margin: 0; color: var(--eevi-muted); font-size: .875rem; }

/* ── Card ─────────────────────────────────────────────────────── */
.eevi-card {
    background: var(--eevi-card);
    border: 1px solid var(--eevi-border);
    border-radius: 12px;
    padding: 20px 24px;
}
.eevi-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%);
    border-color: #2d4a7a;
}

/* ── Stats grid ───────────────────────────────────────────────── */
.eevi-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
@media (max-width: 640px) { .eevi-stats-grid { grid-template-columns: repeat(2,1fr); } }
.eevi-stat {
    background: var(--eevi-card);
    border: 1px solid var(--eevi-border);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    min-width: 120px;
}
.eevi-stat-icon  { font-size: 1.5rem; }
.eevi-stat-value { font-size: 1.6rem; font-weight: 700; color: #60a5fa; line-height: 1; }
.eevi-stat-label { font-size: .8rem; color: var(--eevi-muted); }

/* ── Two column layout ────────────────────────────────────────── */
.eevi-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 768px) { .eevi-two-col { grid-template-columns: 1fr; } }

/* ── Section header ───────────────────────────────────────────── */
.eevi-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}
.eevi-section-header h3 { font-size: 1rem; font-weight: 600; color: #fff; margin: 0; }
.eevi-link { font-size: 1rem; color: #60a5fa; text-decoration: none; }
.eevi-link:hover { text-decoration: underline; }

/* ── News cards ───────────────────────────────────────────────── */
.eevi-news-card {
    background: rgba(255,255,255,.03);
    border: 1px solid var(--eevi-border);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
}
.eevi-news-pinned { border-left: 3px solid var(--eevi-yellow); }
.eevi-news-title  { font-size: .95rem; font-weight: 600; color: #fff; margin: 6px 0 4px; }
.eevi-news-excerpt { font-size: .82rem; color: var(--eevi-muted); margin: 0 0 6px; }
.eevi-news-date   { font-size: .75rem; color: #64748b; }
.eevi-pin { font-size: .75rem; color: var(--eevi-yellow); }

.eevi-news-full { margin-bottom: 16px; }
.eevi-news-body { font-size: .9rem; line-height: 1.6; }
.eevi-news-body p  { margin-bottom: .75em; }

/* ── Badges (categories / status) ────────────────────────────── */
.eevi-badge-cat {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    letter-spacing: .03em;
}
.eevi-badge-status {
    font-size: .7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.eevi-status-open     { background: rgba(59,130,246,.2);  color: #93c5fd; border: 1px solid rgba(59,130,246,.3); }
.eevi-status-upcoming { background: rgba(59,130,246,.2);  color: #93c5fd; border: 1px solid rgba(59,130,246,.3); }
.eevi-status-active   { background: rgba(34,197,94,.2);   color: #86efac; border: 1px solid rgba(34,197,94,.3); }
.eevi-status-running  { background: rgba(34,197,94,.2);   color: #86efac; border: 1px solid rgba(34,197,94,.3); }
.eevi-status-closed   { background: rgba(234,179,8,.2);   color: #fde68a; border: 1px solid rgba(234,179,8,.3); }
.eevi-status-finished { background: rgba(100,116,139,.2); color: #94a3b8; border: 1px solid rgba(100,116,139,.3);}

/* ── Tournament cards ─────────────────────────────────────────── */
.eevi-tourney-card {
    background: rgba(255,255,255,.03);
    border: 1px solid var(--eevi-border);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
}
.eevi-tourney-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 16px; }
.eevi-tourney-full-card { /* extends .eevi-card */ }
.eevi-tourney-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: .8rem;
    color: var(--eevi-muted);
    margin-top: 8px;
}

.eevi-player-list { list-style: none; padding: 8px 0 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--eevi-muted); }
.eevi-details summary { list-style: none; }
.eevi-details summary::-webkit-details-marker { display: none; }

/* ── Progress bar ─────────────────────────────────────────────── */
.eevi-progress-bar {
    height: 6px;
    background: rgba(255,255,255,.08);
    border-radius: 9999px;
    overflow: hidden;
}
.eevi-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--eevi-accent), var(--eevi-accent2));
    border-radius: 9999px;
    transition: width .4s ease;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.eevi-btn-sm {
    display: inline-block;
    font-size: 1rem;
    padding: 4px 12px;
    color: #93c5fd;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
}
.eevi-btn-primary {
    padding: 8px 16px;
    background: var(--eevi-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.eevi-btn-primary:hover { background: #2563eb; }
.eevi-btn-danger {
    padding: 6px 12px;
    background: rgba(239,68,68,.15);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,.3);
    border-radius: 6px;
    font-size: .8rem;
    cursor: pointer;
}
.eevi-btn-danger:hover { background: rgba(239,68,68,.3); }
.eevi-btn-disabled { padding: 8px 16px; background: #1e293b; color: #64748b; border: 1px solid #334155; border-radius: 8px; cursor: not-allowed; font-size: .875rem; }
.eevi-input-sm { background: #0f172a; border: 1px solid #334155; color: #fff; padding: 6px 10px; border-radius: 6px; font-size: .85rem; flex: 1; }
.eevi-input-sm::placeholder { color: #475569; }

/* ── Registered badge ─────────────────────────────────────────── */
.eevi-registered-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(34,197,94,.15); color: #86efac;
    border: 1px solid rgba(34,197,94,.3);
    border-radius: 6px; padding: 6px 12px; font-size: .85rem; font-weight: 600;
}

/* ── Table ────────────────────────────────────────────────────── */
.eevi-table { width: 100%; border-collapse: collapse; }
.eevi-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--eevi-muted); padding: 8px 12px; border-bottom: 1px solid var(--eevi-border); }
.eevi-table td { padding: 10px 12px; border-bottom: 1px solid rgba(51,65,85,.5); font-size: .875rem; color: var(--eevi-text); }
.eevi-table tr:last-child td { border-bottom: none; }
.eevi-table tr:hover td { background: rgba(255,255,255,.02); }
.eevi-my-row td { background: rgba(234,179,8,.05); }
.eevi-pts-positive { color: #86efac; }

/* ── Badges grid ──────────────────────────────────────────────── */
.eevi-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.eevi-badge-card {
    background: var(--eevi-card);
    border: 1px solid var(--eevi-border);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    position: relative;
    transition: border-color .2s, transform .2s;
}
.eevi-badge-card:hover { transform: translateY(-2px); }
.eevi-badge-earned {
    border-color: var(--badge-color, var(--eevi-accent));
    box-shadow: 0 0 16px rgba(59,130,246,.15);
}
.eevi-badge-locked { opacity: .55; filter: grayscale(.6); }
.eevi-badge-icon { font-size: 2.5rem; position: relative; display: inline-block; margin-bottom: 8px; }
.eevi-badge-check {
    position: absolute; bottom: -2px; right: -6px;
    background: var(--eevi-green); color: #fff;
    border-radius: 9999px; font-size: .65rem;
    width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.eevi-badge-name { font-size: .9rem; font-weight: 700; color: #fff; margin: 0 0 4px; }
.eevi-badge-desc { font-size: .75rem; color: var(--eevi-muted); margin: 0 0 8px; line-height: 1.4; }
.eevi-badge-date { font-size: .7rem; color: #64748b; margin-top: 8px; }
.eevi-badge-reward {
    background: rgba(234,179,8,.1);
    border: 1px solid rgba(234,179,8,.2);
    border-radius: 6px;
    padding: 5px 8px;
    font-size: .72rem;
    color: #fde68a;
    margin-top: 8px;
}
.eevi-reward-given   { display: block; color: #86efac; font-size: .7rem; margin-top: 3px; }
.eevi-reward-pending { display: block; color: #fcd34d; font-size: .7rem; margin-top: 3px; }

/* ── Badges row (dashboard preview) ──────────────────────────── */
.eevi-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}
.eevi-badge-chip {
    display: flex; flex-direction: column; align-items: center;
    gap: 3px; cursor: default;
}

/* ── Leaderboard ──────────────────────────────────────────────── */
.eevi-my-rank { background: linear-gradient(135deg, #1c3353, #1e293b); border-color: #2d4a7a; }

/* ── Messages ─────────────────────────────────────────────────── */
.eevi-msg { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .875rem; font-weight: 500; }
.eevi-msg-success { background: rgba(34,197,94,.15); color: #86efac; border: 1px solid rgba(34,197,94,.3); }
.eevi-msg-error   { background: rgba(239,68,68,.15);  color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
/*.hidden { display: none !important; }
*/
/* ── Utility spacing ──────────────────────────────────────────── */
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.ml-auto { margin-left: auto; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-xs  { font-size: .75rem; }
.text-sm  { font-size: .875rem; }
.text-xl  { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-white  { color: #fff; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-blue-400  { color: #60a5fa; }
.text-yellow-400 { color: #facc15; }
.rounded-full { border-radius: 9999px; }
.cursor-pointer { cursor: pointer; }
.inline { display: inline; }
.line-height-6 { line-height: 1.5; }
