﻿/* System Projektowy i Style Portalu UKS Czułowianka Tychy */

:root {
    --primary-font: 'Inter', sans-serif;
    --heading-font: 'Outfit', sans-serif;

    /* Kolory marki */
    --emerald-50: #f0fdf4;
    --emerald-100: #dcfce7;
    --emerald-500: #16a34a;
    --emerald-600: #15803d;
    --emerald-700: #166534;
    
    --emerald-200: #bbf7d0;
    --emerald-300: #86efac;

    --sky-50: #f0f9ff;
    --sky-200: #bae6fd;
    --sky-500: #0284c7;
    --sky-600: #0369a1;

    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;

    --danger-50: #fef2f2;
    --danger-200: #fecaca;
    
    /* Kolory systemowe */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;
    
    --white: #ffffff;
    
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    
    /* Cienie i zaokrąglenia */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--primary-font);
    background-color: var(--slate-100);
    color: var(--slate-800);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--slate-900);
    font-weight: 700;
}

/* Brakujące klasy narzędziowe (kolory tła/obramowania, zaokrąglenia) - używane w wielu
   miejscach portal.html (skrzynki informacyjne, ostrzeżenia, karty), ale nigdy nie były
   zdefiniowane tutaj, więc te elementy renderowały się bez zamierzonego koloru/zaokrąglenia. */
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-lg); }
.rounded-2xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: 9999px; }

.border { border: 1px solid var(--slate-200); }
.border-dashed { border-style: dashed; }

.bg-emerald-50 { background-color: var(--emerald-50); }
.bg-emerald-100 { background-color: var(--emerald-100); }
.border-emerald-200 { border-color: var(--emerald-200); }
.border-emerald-300 { border-color: var(--emerald-300); }

.bg-sky-50 { background-color: var(--sky-50); }
.border-sky-200 { border-color: var(--sky-200); }

.bg-amber-50 { background-color: var(--amber-50); }
.bg-amber-100 { background-color: var(--amber-100); }
.border-amber-200 { border-color: var(--amber-200); }
.border-amber-300 { border-color: var(--amber-300); }

.bg-danger-50 { background-color: var(--danger-50); }
.border-danger-200 { border-color: var(--danger-200); }

.bg-slate-100 { background-color: var(--slate-100); }
.border-slate-200 { border-color: var(--slate-200); }
.border-slate-300 { border-color: var(--slate-300); }

/* Brakujące max-h-48/overflow-y-auto - używane przy kilku przeszukiwalnych listach
   checkboxów (Zaproś Rodzica, Naliczanie Opłat "Wybrani zawodnicy", Scal Duplikaty,
   Konta Rodziców), ale nigdy niezdefiniowane - lista renderowała się na pełną
   wysokość zamiast w małym, przewijalnym w sobie boksie. */
.max-h-48 { max-height: 12rem; }
.overflow-y-auto { overflow-y: auto; }

/* Większy box na listę checkboxów kadry meczowej (1.14.0) - żeby łatwiej zaznaczać
   zawodników na telefonie, bez przewijania małego okienka co chwilę. */
.max-h-80 { max-height: 20rem; }

/* Klasy pomocnicze */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-gap-2 {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-lg { font-size: 1.125rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.font-mono { font-family: monospace; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Baner Informacji o Cookies */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: var(--slate-900);
    border-top: 2px solid var(--emerald-600);
    box-shadow: var(--shadow-xl);
    padding: 1rem 1.5rem;
}

.cookie-banner-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-banner-content p {
    flex: 1 1 320px;
    margin: 0;
    font-size: 0.9rem;
    color: var(--slate-300);
    line-height: 1.5;
}

.cookie-banner-btn {
    flex: 0 0 auto;
    background: var(--emerald-600);
    color: var(--white);
    border: none;
    padding: 0.7rem 1.6rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: var(--primary-font);
    cursor: pointer;
    transition: background 0.2s ease;
}

.cookie-banner-btn:hover {
    background: var(--emerald-700);
}

.text-emerald { color: var(--emerald-600) !important; }
.text-sky { color: var(--sky-500) !important; }
.text-amber { color: var(--amber-400) !important; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--slate-500) !important; }

.bg-slate { background-color: var(--slate-50); }
.bg-white { background-color: var(--white); }

/* Pasek Nawigacyjny */
.app-header {
    background-color: var(--slate-900);
    border-bottom: 2px solid var(--emerald-700);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

/* Herb Klubowy */
.portal-logo {
    height: 52px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(16, 185, 129, 0.3));
    transition: transform 0.2s ease;
}

.portal-logo:hover {
    transform: scale(1.05);
}

.brand-text h1 {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
}

.brand-text p {
    font-size: 10px;
    color: var(--emerald-100);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#auth-status-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

#user-display-email {
    color: var(--slate-300);
    font-weight: 500;
}

@media (max-width: 767px) {
    .header-container {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    .nav-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
        width: 100%;
    }

    #auth-status-bar {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.35rem;
    }
}

/* Stopka */
.app-footer {
    background-color: var(--slate-900);
    border-t: 1px solid var(--slate-800);
    color: var(--slate-400);
    font-size: 0.75rem;
    padding: 2rem 0;
    margin-top: auto;
}

/* Layout główny */
.app-main {
    flex: 1;
    padding: 2rem 0;
}

/* Układ Siatki */
.grid {
    display: grid;
    gap: 1rem;
}

.grid-2-col { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-3-col { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-4-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-5-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (min-width: 768px) {
    .grid-2-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3-col { grid-template-columns: 1fr 2fr; }
    .grid-4-col { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .grid-5-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .grid-5-col { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Przyciski */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-align: center;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-primary {
    background-color: var(--emerald-600);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--emerald-700);
}

.btn-success {
    background-color: var(--emerald-500);
    color: var(--white);
}

.btn-success:hover {
    background-color: var(--emerald-600);
}

.btn-danger {
    background-color: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-amber {
    background-color: var(--amber-500);
    color: var(--white);
}

.btn-amber:hover {
    background-color: #d97706;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--slate-300);
    color: var(--slate-700);
}

.btn-outline:hover {
    background-color: var(--slate-100);
    border-color: var(--slate-400);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Odznaka (Badge) */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-emerald {
    background-color: var(--emerald-100);
    color: var(--emerald-700);
}

.badge-sky {
    background-color: #e0f2fe;
    color: var(--sky-600);
}

.badge-amber {
    background-color: #fef3c7;
    color: var(--amber-500);
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger);
}

/* Karty (Cards) */
.card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-dark {
    background-color: var(--slate-900);
    color: var(--white);
    border: none;
}

.card-dark h3 {
    color: var(--white);
}

.card-header {
    padding: 1rem 1.5rem;
    border-b: 1px solid var(--slate-200);
    font-size: 1rem;
}

.card-dark .card-header {
    border-b: 1px solid var(--slate-800);
}

.card-body {
    padding: 1.5rem;
}

/* Statystyczne Karty w Panelu Admina */
.stat-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.stat-card-clickable {
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.stat-card-clickable:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--emerald-300, var(--slate-200));
    transform: translateY(-2px);
}

.stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.bg-emerald-light { background-color: var(--emerald-50); }
.bg-success-light { background-color: var(--success-light); }
.bg-warning-light { background-color: var(--warning-light); }
.bg-danger-light { background-color: var(--danger-light); }

.stat-data {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-val {
    font-size: 1.2rem;
    font-weight: 800;
    margin-top: 0.1rem;
    white-space: nowrap;
}

/* Formularze i Kontrolki */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--slate-600);
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    background-color: var(--white);
    color: var(--slate-800);
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 3px var(--emerald-100);
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--slate-400);
    font-size: 0.875rem;
}

.input-icon-wrapper input {
    padding-left: 2.5rem !important;
}

/* Tabele */
.table-responsive {
    overflow-x: auto;
    background-color: var(--white);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    text-align: left;
}

.table th {
    background-color: var(--slate-50);
    font-weight: 700;
    color: var(--slate-700);
    padding: 0.625rem 0.625rem;
    border-bottom: 1px solid var(--slate-200);
    text-transform: uppercase;
    font-size: 10px;
}

.table td {
    padding: 0.625rem 0.625rem;
    border-bottom: 1px solid var(--slate-150);
    color: var(--slate-600);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Naprzemienne tło wierszy (zebra) - ułatwia śledzenie wiersza wzrokiem w długich listach */
.table tbody tr:nth-child(even) {
    background-color: rgba(148, 163, 184, 0.06);
}

.table-hover tbody tr:hover {
    background-color: var(--slate-50);
}

/* Karty Autoryzacji */
.auth-card {
    background-color: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
}

.auth-tabs {
    display: flex;
    background-color: var(--slate-50);
    border-bottom: 1px solid var(--slate-200);
}

.auth-tab-btn {
    flex: 1;
    padding: 1.25rem;
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--slate-500);
    font-family: var(--heading-font);
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.auth-tab-btn.active {
    color: var(--emerald-600);
    border-bottom-color: var(--emerald-600);
    background-color: var(--white);
}

.auth-body {
    padding: 2rem;
}

.btn-link-forgot {
    display: block;
    width: 100%;
    text-align: center;
    background: none;
    border: none;
    color: var(--emerald-600);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.75rem;
    cursor: pointer;
    padding: 0.25rem;
}

.btn-link-forgot:hover {
    text-decoration: underline;
}

.demo-notice {
    background-color: var(--emerald-50);
    border: 1px solid var(--emerald-100);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-size: 0.75rem;
    color: var(--emerald-700);
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.demo-notice i {
    font-size: 1.125rem;
    margin-top: 0.125rem;
}

.selectable {
    user-select: all;
    background-color: var(--emerald-100);
    padding: 0.05rem 0.25rem;
    border-radius: 4px;
}

/* Zakładki Admina */
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    background-color: var(--slate-50);
    border-bottom: 1px solid var(--slate-200);
    padding: 0.5rem 1rem 0 1rem;
    gap: 0.25rem;
}

.admin-tab-btn {
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: 0.8125rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: none;
    cursor: pointer;
    color: var(--slate-500);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-tab-btn:hover {
    color: var(--slate-800);
    background-color: var(--slate-100);
}

.admin-tab-btn.active {
    color: var(--emerald-600);
    background-color: var(--white);
    border-color: var(--slate-200) var(--slate-200) transparent var(--slate-200);
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.02);
}

.admin-tab-content {
    padding: 1rem 0;
}

/* Panel admina: od tabletu wzwyż zakładki stają się pionowym paskiem nawigacyjnym z lewej.
   Na telefonie zostaje dotychczasowy poziomy, zawijany rząd zakładek - pasek boczny na wąskim
   ekranie zabrałby zbyt dużo miejsca na tabele/formularze. */
/* Panel admina dostaje więcej szerokości niż reszta serwisu - to głównie gęste tabele */
#view-admin.container {
    max-width: 1600px;
}

@media (min-width: 768px) {
    .admin-shell {
        display: flex;
        align-items: flex-start;
    }

    .admin-shell .admin-tabs {
        flex-direction: column;
        flex-wrap: nowrap;
        width: 190px;
        flex-shrink: 0;
        background-color: var(--slate-50);
        border-bottom: none;
        border-right: 1px solid var(--slate-200);
        padding: 0.75rem 0.5rem;
        gap: 0.125rem;
        align-self: stretch;
    }

    .admin-shell .admin-tab-btn {
        width: 100%;
        justify-content: flex-start;
        border-radius: var(--radius-md);
        text-align: left;
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
    }

    .admin-shell .admin-tab-btn.active {
        border-color: transparent;
        background-color: var(--emerald-50);
        box-shadow: none;
    }

    .admin-shell .card-body {
        flex: 1;
        min-width: 0;
    }
}

.search-bar {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 100%;
    max-width: 320px;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    color: var(--slate-400);
}

.search-bar input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--emerald-500);
}

/* Ustawienia Importu Przelewów */
.dropzone {
    border: 2px dashed var(--slate-300);
    border-radius: var(--radius-lg);
    background-color: var(--slate-50);
    padding: 3rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropzone:hover {
    border-color: var(--emerald-500);
    background-color: var(--emerald-50);
}

.dropzone-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Okna Modalne */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.modal-content {
    background-color: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-height: 90vh;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--slate-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--slate-900);
    color: var(--white);
}

.modal-header h3 {
    color: var(--white);
    font-size: 1.125rem;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--slate-400);
    cursor: pointer;
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--white);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.modal-content > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--slate-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background-color: var(--slate-50);
}

.max-w-xs { max-width: 320px; }
.max-w-sm { max-width: 420px; }
.max-w-md { max-width: 520px; }
.max-w-lg { max-width: 640px; }
.max-w-2xl { max-width: 672px; }
.max-w-6xl { max-width: 920px; }

/* Karta Szczegółowa Zawodnika */
#modal-child-details .modal-body {
    padding: 2rem 6rem !important;
}

#modal-child-details .modal-footer {
    padding: 1.5rem 6rem !important;
}

#modal-child-details .grid {
    margin-top: 1rem;
    margin-left: 1rem;
    margin-right: 1rem;
}

#modal-child-details .card {
    padding: 0.5rem !important;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

/* Powiadomienia Toast */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    background-color: var(--slate-900);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.8125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-danger {
    border-left: 4px solid var(--danger);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Awatar */
.avatar-large {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background-color: var(--emerald-50);
    border: 2px solid var(--emerald-100);
    color: var(--emerald-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
}

/* Informacje pomocnicze w formularzu naliczania */
.icon-circle {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-emerald {
    background-color: var(--emerald-500);
}

.list-bullet {
    list-style-type: disc;
    padding-left: 1.25rem;
}

/* ======================================================== */
/* KARTY MECZÓW TRENERA (WIDOK MOBILNY / RESPONSYWNY)       */
/* ======================================================== */
.coach-matches-desktop {
    display: block;
}

.coach-matches-mobile {
    display: none;
}

.coach-match-card {
    background-color: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 0.875rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.coach-match-card:hover {
    border-color: var(--slate-300);
    box-shadow: var(--shadow-sm);
}

/* Linia 1 (GÓRA): Data, godzina, miejsce i grupa */
.coach-match-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--slate-200);
}

.coach-match-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    font-size: 0.75rem;
    color: var(--slate-600);
}

.coach-match-card-meta .match-meta-item {
    display: inline-flex;
    align-items: center;
}

.match-meta-venue {
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Linia 2 (ŚRODEK): Mecz po środku (Gospodarz vs Gość + Wynik) */
.coach-match-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0;
    gap: 0.5rem;
}

.coach-match-team {
    flex: 1;
    font-size: 0.875rem;
    color: var(--slate-700);
    line-height: 1.25;
    word-break: break-word;
}

.coach-match-team:first-child {
    text-align: right;
    padding-right: 0.25rem;
}

.coach-match-team:last-child {
    text-align: left;
    padding-left: 0.25rem;
}

.coach-match-team.is-club-team {
    font-weight: 800;
    color: var(--emerald-700);
}

.coach-match-vs-score {
    flex-shrink: 0;
    min-width: 54px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.coach-match-score-badge {
    font-size: 0.875rem !important;
    padding: 0.25rem 0.625rem !important;
    letter-spacing: 0.05em;
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}

/* Linia 3 (DÓŁ): Kadra i przyciski akcji */
.coach-match-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--slate-200);
}

.coach-match-card-squad {
    display: flex;
    align-items: center;
}

.coach-match-card-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.coach-action-btn {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm) !important;
    font-size: 0.8125rem !important;
    background-color: var(--slate-50);
    border: 1px solid var(--slate-200) !important;
    color: var(--slate-700);
}

.coach-action-btn:hover {
    background-color: var(--slate-100);
    border-color: var(--slate-300) !important;
}

.coach-action-btn.text-danger:hover {
    background-color: var(--danger-50);
    border-color: var(--danger-200) !important;
    color: var(--danger) !important;
}

/* Przełączenie w widok mobilny na telefonach (ekran <= 768px) */
@media (max-width: 768px) {
    .coach-matches-desktop {
        display: none !important;
    }

    .coach-matches-mobile {
        display: flex !important;
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ======================================================== */
/* TERMINY TRENINGÓW (GRAFIK TRENINGÓW - RESPONSYWNY)       */
/* ======================================================== */
.training-session-row {
    background-color: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 0.625rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.training-session-row:hover {
    border-color: var(--slate-300);
    box-shadow: var(--shadow-sm);
}

.training-session-main {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
}

.training-session-row .training-day {
    flex: 1;
    min-width: 110px;
    font-weight: 600;
    color: var(--slate-800);
    background-color: var(--white);
}

.training-session-hours {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.training-session-row .training-time,
.training-session-row .training-end-time {
    width: 78px !important;
    text-align: center;
    font-family: monospace;
    font-size: 0.8125rem;
    padding: 0.25rem 0.35rem !important;
    background-color: var(--white);
}

.training-time-sep {
    color: var(--slate-400);
    font-weight: 700;
    font-size: 0.8125rem;
}

.training-session-del-btn {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: var(--radius-sm) !important;
    background-color: var(--white);
    border-color: var(--slate-200) !important;
}

.training-session-del-btn:hover {
    background-color: var(--danger-50);
    border-color: var(--danger-200) !important;
    color: var(--danger) !important;
}

.training-session-loc {
    width: 100%;
}

.training-location-input-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.training-loc-icon {
    position: absolute;
    left: 0.65rem;
    font-size: 0.75rem;
    pointer-events: none;
    color: var(--slate-400);
}

.training-location.has-loc-icon {
    padding-left: 1.85rem !important;
    width: 100%;
    font-size: 0.8125rem;
    background-color: var(--white);
}

/* Układ dla dużych ekranów (desktop / tablet poziomo >= 900px) */
@media (min-width: 900px) {
    .training-session-row {
        flex-direction: row;
        align-items: center;
        gap: 0.625rem;
        padding: 0.4rem 0.625rem;
        margin-bottom: 0.375rem;
    }

    .training-session-main {
        width: auto;
        flex: 0 0 auto;
        gap: 0.5rem;
    }

    .training-session-row .training-day {
        width: 130px;
        flex: none;
    }

    .training-session-loc {
        flex: 1;
    }
}

/* ======================================================== */
/* MEDIA PRINT (WYDRUK DOKUMENTÓW)                          */
/* ======================================================== --> */
@media print {
    @page {
        size: A4 portrait;
        margin: 15mm;
    }

    /* Nazwana strona A4 pozioma - używana tylko przez elementy z klasą .print-page-landscape
       (np. tabela obłożenia obiektów treningowych, za szeroka na portret). Wsparcie przeglądarek
       dla właściwości CSS "page" jest ograniczone głównie do Chrome/Edge - w innych przeglądarkach
       wydruk i tak zadziała, tylko w portrecie (treść się zawinie na kolejne strony). */
    @page training-landscape {
        size: A4 landscape;
        margin: 10mm;
    }

    .print-page-landscape {
        page: training-landscape;
    }

    body {
        background-color: var(--white) !important;
        color: #000000 !important;
    }

    /* Ukryj wszystkie standardowe elementy strony */
    body > header,
    body > main,
    body > footer,
    .modal-backdrop,
    #toast-container {
        display: none !important;
    }

    /* Wyświetl tylko wybrane okno druku */
    .print-page {
        display: block !important;
        position: static !important;
        width: 100% !important;
        height: auto !important;
        background-color: var(--white) !important;
        color: #000000 !important;
        font-family: 'Georgia', serif !important;
    }
    
    .print-page.hidden {
        display: none !important;
    }

    .club-badge-print {
        border: 2px solid #000000 !important;
    }

    /* Ukrycie obramowań innych niż czarno-białe */
    .border {
        border-color: #000000 !important;
    }

    .text-muted-print {
        color: #555555 !important;
        font-size: 8px !important;
        font-style: italic !important;
        display: block;
    }
}

/* ==========================================================================
   STATYSTYKI WWW - WYKRES SŁUPKOWY I CMS KOMUNIKATU
   ========================================================================== */
.web-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 180px;
    padding: 10px 0 0 0;
    border-bottom: 2px solid var(--slate-200);
}

.web-bar-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    position: relative;
    cursor: default;
}

.web-bar-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--slate-700);
    margin-bottom: 4px;
    transition: transform 0.15s ease;
}

.web-bar-column:hover .web-bar-count {
    transform: scale(1.15);
    color: var(--emerald-600);
}

.web-bar-pillar {
    width: 100%;
    max-width: 32px;
    background: linear-gradient(180deg, #34d399 0%, #059669 100%);
    border-radius: 6px 6px 0 0;
    min-height: 6px;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, transform 0.2s ease;
}

.web-bar-column:hover .web-bar-pillar {
    opacity: 0.9;
    transform: scaleY(1.03);
}

.web-bar-active .web-bar-pillar {
    background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.4);
}

.web-bar-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--slate-500);
    margin-top: 6px;
    text-align: center;
    white-space: nowrap;
}

.web-bar-active .web-bar-label {
    color: #0284c7;
    font-weight: 800;
}

/* Podgląd Komunikatu (Live Notice Preview) */
.web-notice-preview-box {
    width: 100%;
    border-radius: 10px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
}

.web-notice-preview-info {
    background: linear-gradient(90deg, #064e3b 0%, #047857 50%, #059669 100%);
    border-bottom: 2px solid #10b981;
}

.web-notice-preview-warning {
    background: linear-gradient(90deg, #78350f 0%, #b45309 50%, #d97706 100%);
    border-bottom: 2px solid #f59e0b;
}

.web-notice-preview-danger {
    background: linear-gradient(90deg, #7f1d1d 0%, #b91c1c 50%, #dc2626 100%);
    border-bottom: 2px solid #ef4444;
}

.web-notice-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

/* Sklep Klubowy (1.33.0) */
.w-full { width: 100%; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.shop-card { border: 1px solid var(--slate-200); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.shop-card-img { height: 200px; background: #fff; border-bottom: 1px solid var(--slate-200); padding: 6px; display: flex; align-items: center; justify-content: center; color: var(--slate-400, #94a3b8); font-size: 2.5rem; }
.shop-card-img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; margin: 0 auto; }
.shop-card-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.shop-card-body .form-control { padding: 4px 8px; font-size: 0.85rem; }
