/* ═══════════════════════════════════════════════════
   xAngler Hub — Dark Theme (styl xTraMarlin)
   ═══════════════════════════════════════════════════ */

:root {
    /* Kolory tła */
    --bg-darkest:    #0d1017;
    --bg-sidebar:    #111620;
    --bg-main:       #151a24;
    --bg-card:       #1a2030;
    --bg-card-hover: #1f2740;
    --bg-input:      #1c2233;

    /* Akcenty */
    --accent-cyan:   #00d4ff;
    --accent-blue:   #3b82f6;
    --accent-green:  #22c55e;
    --accent-orange: #f59e0b;
    --accent-red:    #ef4444;

    /* Tekst */
    --text-primary:   #e8edf5;
    --text-secondary: #8892a8;
    --text-muted:     #5a6478;
    --text-accent:    #00d4ff;

    /* Obramowania */
    --border-color:   #1e2a3a;
    --border-subtle:  #172030;

    /* Inne */
    --radius:        12px;
    --radius-sm:     8px;
    --radius-lg:     16px;
    --sidebar-width: 240px;
    --transition:    all 0.2s ease;

    /* Fonty */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: var(--font-family);
    background: var(--bg-darkest);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════════════════
   Layout
   ═══════════════════════════════════════════════════ */

.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px 16px;
    border-bottom: 1px solid var(--border-color);
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: #ffffff;
    padding: 4px;
}

.logo-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}
.logo-name em {
    font-style: normal;
    color: var(--accent-cyan);
}

.logo-sub {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: -2px;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-group-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 16px 10px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
}
.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}
.nav-item.active {
    background: var(--accent-blue);
    color: #fff;
}

.nav-icon {
    font-size: 15px;
    width: 20px;
    text-align: center;
}

/* Dots */
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 4px;
    margin-right: 2px;
}
.dot-live     { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
.dot-upcoming { background: var(--accent-blue); }
.dot-finished { background: var(--accent-orange); }

/* Discipline banners */
.discipline-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
    padding: 14px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid transparent;
}
.discipline-banner:hover {
    transform: translateY(-1px);
}

.disc-surfcasting,
.disc-splawik,
.disc-feeder,
.disc-wojsko,
.disc-karpiowe,
.disc-mucha,
.disc-brzeg,
.disc-lod {
    background: linear-gradient(135deg, #0d1f2d 0%, #122436 60%, #0d1f2d 100%);
    border-color: #1e3a50;
}
.disc-surfcasting:hover,
.disc-splawik:hover,
.disc-feeder:hover,
.disc-wojsko:hover,
.disc-karpiowe:hover,
.disc-mucha:hover,
.disc-brzeg:hover,
.disc-lod:hover {
    border-color: #00d4ff;
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.15);
}

.disc-icon {
    font-size: 26px;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

.disc-icon-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
    background: transparent;
    padding: 0;
}

.disc-info {
    flex: 1;
    min-width: 0;
}
.disc-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}
.disc-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

.disc-arrow {
    font-size: 22px;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
}
.discipline-banner:hover .disc-arrow {
    color: var(--text-primary);
    transform: translateX(2px);
}

/* Sidebar cards */
.sidebar-card {
    margin: 8px 0;
    padding: 14px;
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
.sidebar-card:hover {
    transform: translateY(-1px);
}

.card-accent {
    background: linear-gradient(135deg, #0c2a4a 0%, #0a1e38 100%);
    border: 1px solid #1a3a5c;
}
.card-accent:hover {
    border-color: var(--accent-cyan);
}

.card-secondary {
    background: linear-gradient(135deg, #1a2040 0%, #151830 100%);
    border: 1px solid #252a45;
}
.card-secondary:hover {
    border-color: var(--accent-blue);
}

.card-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 6px;
}
.card-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.card-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.sidebar-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}
.version {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Auth buttons w stopce sidebara ── */
.sidebar-auth-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.btn-auth {
    flex: 1;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    letter-spacing: .3px;
    transition: opacity .2s;
}
.btn-auth:hover { opacity: .85; }
.btn-login {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.btn-register {
    background: linear-gradient(135deg, #7c3aed, #00d4ff);
    border: none;
    color: #fff;
}

/* ── Widget zalogowanego użytkownika ── */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
    margin-bottom: 8px;
}
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #00d4ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.user-info {
    flex: 1;
    overflow: hidden;
    text-align: left;
}
.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-role {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.user-logout {
    font-size: 18px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color .2s;
    flex-shrink: 0;
}
.user-logout:hover { color: #ef4444; }

/* ═══════════════════════════════════════════════════
   Main content
   ═══════════════════════════════════════════════════ */

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px 40px;
    background: var(--bg-main);
}

/* ── Hero Banner ── */
.hero-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 30px;
    min-height: 340px;
}

.banner-img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    object-position: center 30%;
    display: block;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(13, 16, 23, 0.88) 0%,
        rgba(13, 16, 23, 0.65) 40%,
        rgba(13, 16, 23, 0.3) 100%
    );
}

.banner-content {
    position: absolute;
    inset: 0;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero {
    margin-bottom: 30px;
}

.badge-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--accent-green);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}
.badge-live .pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
    50%      { opacity: 0.7; box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}

.hero-title {
    font-size: 52px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 8px;
}
.hero-title .accent {
    color: var(--accent-cyan);
}
.hero-title .diamond {
    color: var(--accent-cyan);
    font-size: 36px;
}

.hero-brand {
    margin-top: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.hero-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
    background: #ffffff;
    padding: 6px;
}
.hero-brand-text {
    display: flex;
    align-items: baseline;
}
.hero-brand .brand-name {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}
.hero-brand .brand-name em {
    font-style: normal;
    color: var(--accent-cyan);
}
.hero-brand .brand-ver {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-cyan);
    vertical-align: super;
    margin-left: 2px;
}

/* ── Partners Carousel ── */
.partners-section {
    margin-bottom: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px 0;
    overflow: hidden;
    position: relative;
}

.partners-section::before,
.partners-section::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}
.partners-section::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-card), transparent);
}
.partners-section::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-card), transparent);
}

.partners-label {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.partners-carousel {
    overflow: hidden;
    width: 100%;
}

.partners-track {
    display: flex;
    gap: 40px;
    width: max-content;
    animation: partnerScroll 20s linear infinite;
}

.partners-track:hover {
    animation-play-state: paused;
}

.partner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    cursor: default;
    transition: var(--transition);
}
.partner-item:hover {
    transform: translateY(-3px);
}

.partner-logo-circle {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
    transition: var(--transition);
}
.partner-item:hover .partner-logo-circle {
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.35);
    transform: scale(1.08);
}

.partner-logo-img {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    background: #fff;
    object-fit: contain;
    padding: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: var(--transition);
}
.partner-item:hover .partner-logo-img {
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.35);
    transform: scale(1.08);
}

.partner-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

@keyframes partnerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Disciplines strip (main page) ── */
.disciplines-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 12px 0;
}
.disciplines-strip .discipline-banner {
    margin: 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 10px 12px;
    gap: 8px;
    background: linear-gradient(135deg, #0d1f2d 0%, #122436 60%, #0d1f2d 100%) !important;
    border-color: #1e3a50 !important;
}
.disciplines-strip .discipline-banner:hover {
    border-color: #00d4ff !important;
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.15);
}
.disciplines-strip .disc-icon-img {
    width: 44px;
    height: 44px;
}
.disciplines-strip .disc-info {
    min-width: 0;
}
.disciplines-strip .disc-name {
    font-size: 13px;
}
.disciplines-strip .disc-sub {
    font-size: 10px;
}
.disciplines-strip .disc-arrow {
    display: none;
}
@media (max-width: 1100px) {
    .disciplines-strip {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 900px) {
    .disciplines-strip {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 600px) {
    .disciplines-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Status bar ── */
.status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    margin-bottom: 20px;
    font-size: 13px;
}

.status-ok {
    color: var(--accent-green);
    font-weight: 600;
}

.btn-refresh {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
}
.btn-refresh:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* ── Section tabs ── */
.section-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}
.tab-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}
.tab-btn.active {
    background: rgba(0, 212, 255, 0.13);
    color: #00d4ff;
}
.tab-btn.active[data-filter="live"] {
    background: rgba(34, 197, 94, 0.13);
    color: #22c55e;
}
.tab-btn.active[data-filter="upcoming"] {
    background: rgba(59, 130, 246, 0.13);
    color: #3b82f6;
}
.tab-btn.active[data-filter="finished"] {
    background: rgba(245, 158, 11, 0.13);
    color: #f59e0b;
}
.tab-btn.active[data-filter="all"] {
    background: rgba(0, 212, 255, 0.13);
    color: #00d4ff;
}
.tab-btn .tab-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

/* ── Competition cards ── */
.comp-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comp-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    cursor: pointer;
}
.comp-card:hover {
    border-color: var(--accent-cyan);
    background: var(--bg-card-hover);
}

.comp-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.comp-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.comp-info { flex: 1; }

.comp-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 2px;
}

.comp-organizer {
    font-size: 12px;
    color: var(--text-muted);
}

.comp-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.comp-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: var(--accent-cyan);
}
.comp-type-badge.team {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: var(--accent-green);
}

.comp-time {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.comp-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.comp-tag {
    font-size: 11px;
    color: var(--text-muted);
}

.comp-rounds {
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
.comp-rounds:hover {
    color: var(--accent-cyan);
}

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.empty-state .empty-text {
    font-size: 15px;
}

/* ═══════════════════════════════════════════════════
   Scrollbar
   ═══════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ═══════════════════════════════════════════════════
   Surfcasting pages
   ═══════════════════════════════════════════════════ */

/* ── Surfcasting index header ── */
.surf-page-header {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #0a2a3e 0%, #0d3352 60%, #0a1e30 100%);
    border: 1px solid #1a4a6a;
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 24px;
}
.surf-banner-wrap {
    position: relative;
    margin-bottom: 24px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid #1a4a6a;
}
.surf-banner-img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    object-position: center 40%;
}
.surf-banner-badges {
    position: absolute;
    bottom: 12px;
    right: 16px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}
.surf-page-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 4px;
    flex-shrink: 0;
}
.surf-page-meta { flex: 1; }
.surf-page-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}
.surf-page-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
}
.surf-page-badges {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}
.surf-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.surf-badge-cyan {
    background: rgba(0,212,255,0.1);
    border-color: rgba(0,212,255,0.3);
    color: var(--accent-cyan);
}
.surf-badge-amber {
    background: rgba(245,158,11,0.1);
    border-color: rgba(245,158,11,0.3);
    color: var(--accent-orange);
}
.surf-badge-purple {
    background: rgba(168,85,247,0.1);
    border-color: rgba(168,85,247,0.3);
    color: #a855f7;
}
.surf-badge-gold {
    background: rgba(201,168,76,0.1);
    border-color: rgba(201,168,76,0.3);
    color: #c9a84c;
}
.disc-header-splawik { border-left: 4px solid #a855f7; }
.disc-header-wojsko  { border-left: 4px solid #c9a84c; }
.btn-splawik { background: #a855f7; }
.btn-splawik:hover { background: #9333ea; }
.btn-wojsko  { background: #c9a84c; }
.btn-wojsko:hover  { background: #b8963c; }
.surf-admin-link {
    text-decoration: none;
    text-align: center;
}
.surf-admin-link:hover {
    color: var(--text-primary);
    border-color: var(--accent-cyan);
}
.dev-source-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ── Competition cards (surfcasting list) ── */
.surf-comp-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 10px;
    transition: var(--transition);
}
.surf-comp-card:hover {
    border-color: #1a4a6a;
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}
.surf-comp-left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
    min-width: 0;
}
.surf-comp-num {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-cyan);
    min-width: 32px;
    padding-top: 2px;
}
.surf-comp-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.surf-comp-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.surf-comp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.surf-comp-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}
.surf-status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.status-finished { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); color: var(--accent-orange); }
.status-live     { background: rgba(34,197,94,0.12);  border: 1px solid rgba(34,197,94,0.3);  color: var(--accent-green); }
.status-upcoming { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.3); color: var(--accent-blue); }

.btn-wyniki {
    display: inline-block;
    background: var(--accent-cyan);
    color: #000;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 18px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}
.btn-wyniki:hover { background: #00b8d9; }
.btn-wyniki-disabled {
    font-size: 12px;
    color: var(--text-muted);
    padding: 7px 4px;
}

/* ── Calendar ── */
.calendar-header {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.calendar-list { display: flex; flex-direction: column; gap: 8px; }
.calendar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    transition: var(--transition);
}
.calendar-row:hover { border-color: #1a4a6a; background: var(--bg-card-hover); }
.status-row-finished { border-left: 3px solid var(--accent-orange); }
.status-row-upcoming { border-left: 3px solid var(--accent-blue); }
.cal-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-cyan);
    min-width: 90px;
    flex-shrink: 0;
}
.cal-info { flex: 1; }
.cal-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.cal-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cal-status { flex-shrink: 0; }

/* ── Breadcrumb ── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.breadcrumb-link { color: var(--accent-cyan); transition: var(--transition); }
.breadcrumb-link:hover { color: #fff; }
.breadcrumb-sep { color: var(--text-muted); }
.breadcrumb-current { color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Competition detail header ── */
.comp-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    background: linear-gradient(135deg, #0a2a3e 0%, #0d3352 60%, #0a1e30 100%);
    border: 1px solid #1a4a6a;
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 24px;
}
.cdh-left { flex: 1; }
.cdh-badges { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cdh-type-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.3);
    color: var(--accent-blue);
}
.cdh-title {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin-bottom: 10px;
}
.cdh-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.cdh-info-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.cdh-info-item { text-align: center; }
.cdh-info-val {
    font-size: 24px;
    font-weight: 900;
    color: var(--accent-cyan);
    line-height: 1;
}
.cdh-info-lbl {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
}
.cdh-right { flex-shrink: 0; }
.cdh-disc-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius);
    background: #fff;
    padding: 6px;
}

/* ── Competition tabs ── */
.comp-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 6px;
}
.ctab {
    flex: 0 0 auto;
    background: none;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.ctab:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.ctab.active {
    background: var(--accent-cyan);
    color: #000;
    border-color: var(--accent-cyan);
}
.ctab-content { display: none; }
.ctab-content.active { display: block; }

/* ── Info tab ── */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
}
.info-card-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--border-subtle); }
.info-table tr:last-child { border-bottom: none; }
.info-table td { padding: 7px 4px; font-size: 13px; }
.it-label { color: var(--text-muted); width: 40%; }
.scoring-rules { display: flex; flex-direction: column; gap: 10px; }
.scoring-rule { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-secondary); }
.sr-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.judging-method {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
}

.judging-empty {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-input);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
}

/* ── Results table ── */
.results-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}
.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.results-table thead tr {
    background: var(--bg-sidebar);
    border-bottom: 2px solid var(--border-color);
}
.results-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    white-space: nowrap;
}
.results-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition);
}
.results-table tbody tr:hover { background: var(--bg-card-hover); }
.results-table td { padding: 10px 12px; }

.td-name { font-weight: 600; color: var(--text-primary); }
.td-muted { color: var(--text-muted); font-size: 12px; }
.td-small { font-size: 11px; line-height: 1.4; }
.td-num { font-weight: 700; color: var(--accent-cyan); }
.td-center { text-align: center; }
.td-pts { font-weight: 700; text-align: right; }
.td-pts-hi { color: var(--accent-cyan); }
.td-place { text-align: center; font-size: 18px; }
.td-place-lg { font-size: 15px; font-weight: 700; white-space: nowrap; }
.td-sector-place { font-weight: 700; color: var(--text-secondary); }
.td-total { font-size: 15px !important; }

/* Karp weight display */
.karp-weight { color: var(--accent-orange); font-weight: 600; }

.classif-table {
    table-layout: fixed;
}

.classif-col-place {
    width: 72px;
}

.classif-col-name {
    width: 30%;
}

.classif-col-club {
    width: 24%;
}

.classif-col-turn {
    width: 78px;
}

.classif-col-total {
    width: 86px;
}

.classif-head-place {
    text-align: center;
}

.classif-head-turn {
    text-align: center;
}

.classif-head-total {
    text-align: right;
}

.row-gold   { background: rgba(251,191,36,0.07);  }
.row-silver { background: rgba(156,163,175,0.07); }
.row-bronze { background: rgba(180,120,70,0.07);  }
.row-nf     { opacity: 0.5; }

/* ── Sector badge ── */
.sector-badge {
    display: inline-block;
    background: rgba(0,212,255,0.12);
    border: 1px solid rgba(0,212,255,0.3);
    color: var(--accent-cyan);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
}
.sector-badge-lg { font-size: 14px; padding: 5px 14px; }

/* ── Sector grid (per tura) ── */
.tura-header {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.tura-time { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}
.sector-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}
.sector-card-header {
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
}

/* ── General classification ── */
.classif-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}
.classif-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--border-color);
}
.classif-table .td-total { color: var(--accent-cyan); }

/* ── Stats ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card-accent {
    background: linear-gradient(135deg, #0a2a3e, #0d3352);
    border-color: #1a4a6a;
}
.stat-card-icon { font-size: 32px; margin-bottom: 8px; }
.stat-card-val { font-size: 32px; font-weight: 900; color: var(--accent-cyan); line-height: 1; margin-bottom: 4px; }
.stat-card-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 8px; }
.stat-card-sub { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.sectors-summary-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sectors-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.sector-summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}
.sector-summary-header {
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 14px;
}

/* ── DEV panel ── */
.dev-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.dev-title {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.4px;
}
.dev-sub {
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-muted);
}
.dev-note {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-cyan);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.dev-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}
.dev-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
}
.dev-card-live {
    border-color: rgba(34,197,94,0.35);
    box-shadow: 0 0 0 1px rgba(34,197,94,0.15) inset;
}
.dev-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.dev-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}
.dev-card-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.dev-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.dev-btn {
    display: inline-block;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: 700;
    padding: 7px 12px;
    cursor: pointer;
    text-decoration: none;
}
.dev-btn-add {
    border-color: rgba(34,197,94,0.4);
    color: var(--accent-green);
}
.dev-btn-remove {
    border-color: rgba(239,68,68,0.4);
    color: var(--accent-red);
}
.dev-btn-open {
    border-color: rgba(0,212,255,0.35);
    color: var(--accent-cyan);
}
.dev-btn-save {
    border-color: rgba(0,212,255,0.35);
    color: var(--accent-cyan);
}
.dev-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin: 8px 0 5px;
}
.dev-input,
.dev-textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 13px;
    padding: 9px 10px;
}
.dev-textarea {
    resize: vertical;
    min-height: 90px;
    margin-bottom: 8px;
}
.dev-empty {
    grid-column: 1 / -1;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .sidebar {
        width: 60px;
        min-width: 60px;
    }
    .sidebar .logo-text,
    .sidebar .nav-group-label,
    .sidebar .sidebar-card,
    .sidebar .sidebar-footer,
    .sidebar .nav-item span:not(.nav-icon):not(.dot) {
        display: none;
    }
    .sidebar-logo { justify-content: center; padding: 16px 8px; }
    .nav-item { justify-content: center; padding: 10px; }
    .main-content { padding: 20px; }
    .hero-title { font-size: 32px; }
    .features-row { flex-wrap: nowrap; }
}

@media (max-width: 600px) {
    .sidebar { display: none; }
    .main-content { padding: 16px; }
    .hero-title { font-size: 28px; letter-spacing: -1px; }
    .features-row { gap: 8px; }
    .feature-card { min-width: 140px; padding: 12px; }
    .comp-card { flex-direction: column; align-items: flex-start; gap: 12px; }
    .comp-right { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
}
