/* ==========================================================================
   1. RESET I PODSTAWOWE STYLE GLOBALNE
   ========================================================================== */

html,
body {
    overflow-x: hidden;
}

body,
input,
select,
button,
textarea {
    font-family: "Mulish", "Muli", "Mulish Black", "Mulish ExtraBold",
        "Mulish ExtraLight", "Mulish Light", "Mulish Medium", "Mulish SemiBold",
        sans-serif !important;
    margin: 0;
    padding: 0;
    background-color: white;
    color: #171b34;
}

/* [GLOBAL] Zmienne kolorów – używane w całym projekcie */
:root {
    --gold: #dfc173; /* [1] Kolor główny – złoty */
    --dark: #171b34; /* [2] Kolor tła – ciemny granat */
    --orange: #f9b132; /* [3] Kolor akcentowy – pomarańczowy */
    --blue: #3a6ab2; /* [4] Kolor dodatkowy – niebieski */
    --violet: #b64e94; /* [5] Kolor dodatkowy – róż */
    --red: #e62b48; /* [6] Kolor ostrzeżeń – czerwony */
    --white: #ffffff; /* [7] Kolor awaryjny – biały */
}

/* ==========================================================================
   2. NAGŁÓWEK (header) – LOGO I NAWIGACJA
   ========================================================================== */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1vw 5vw 0 5vw;
    background-color: white;
}

.logo img {
    width: 100%;
    max-height: 150px;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 5vw;
    margin: 0;
    padding: 0;
}

nav ul li {
    display: inline;
}

nav ul li a {
    text-decoration: none;
    color: #171b34;
    font-size: clamp(20px, 4vw, 30px);
    font-weight: 500;
    transition: background-color 0.1s ease, color 0.1s ease;
}

nav ul li a:hover {
    background-color: white;
    color: #b64e94;
}

nav ul li a.active {
    color: #3a6ab2;
}

/* ==========================================================================
   2.1. BURGER MENU
   ========================================================================== */

/* Burger menu button - ukryty domyślnie */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #171b34;
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 0;
}

/* Animacja burgera po kliknięciu */
.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.theme-toggle {
    position: relative;
}

.theme-toggle input {
    display: none;
}

/* Mobile navigation styles */
@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        padding-top: 80px;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 20px;
        align-items: flex-start;
    }
    
    nav ul li {
        display: block;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    nav ul li:last-child {
        border-bottom: none;
    }
    
    nav ul li a {
        display: block;
        padding: 15px 0;
        font-size: 18px;
        color: #171b34;
        border-bottom: none;
    }
    
    nav ul li a:hover {
        color: #b64e94;
        background: none;
    }
    
    nav ul li a.active {
        color: #3a6ab2;
        font-weight: bold;
    }
    
    /* Overlay dla zamknięcia menu */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .menu-overlay.active {
        display: block;
    }
}

/* ==========================================================================
   3. SEKCJA GŁÓWNA – UKŁAD I OGÓLNE STYLE
   ========================================================================== */

main {
    min-height: 800px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: white;
}

input[type="number"],
input[type="date"] {
    font-family: "Mulish", "Muli", Arial, sans-serif;
    border-radius: 10px;
    border: 1.8px solid #dfc173;
    padding: 6px 12px;
    font-size: 1em;
}

input[type="number"]:focus,
input[type="date"]:focus {
    border-color: #bfa14b;
    outline: none;
}

/* ==========================================================================
   4. BLOK INTRO (nagłówek + grafika + tło ozdobne)
   ========================================================================== */

.intro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 50px;
    border-radius: 10px;
    min-width: 300px;
    width: 80%;
    max-width: 1800px;
    gap: 20px;
}

.image-container {
    flex: 1 1 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 1000px;
}

.image-container-szerokie {
    flex: 1 1 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 800px;
}

.image-container-szerokie img {
    max-width: 100%;
    height: auto;
    z-index: 2;
}

.image-container img {
    max-width: 80%;
    height: auto;
    z-index: 2;
}

.dark-box-container {
    position: absolute;
}

.dark-box {
    position: relative;
    top: 50px;
    left: -20vw;
    width: 70vw;
    max-width: 1200px;
    height: calc(17vw + 275px);
    max-height: 1000px;
    background-color: #171b34;
    border-bottom-right-radius: 80px;
    z-index: 0;
}

.blue-box {
    position: relative;
    top: 50px;
    left: -20vw;
    width: 70vw;
    max-width: 1200px;
    height: calc(17vw + 275px);
    max-height: 1000px;
    background-color: #3a6ab2;
    border-bottom-right-radius: 80px;
    z-index: 1;
}

.text {
    flex: 1 1 400px;
    padding: 10px;
    text-align: left;
}

.text h1 {
    color: #171b34;
    font-size: 36px;
}

.text h2 {
    color: #e62b48;
    font-size: 25px;
}

.text p {
    color: #171b34;
    font-size: clamp(12px, 3.5vw, 18px);
    line-height: 1.6;
}

.text a {
    color: #171b34;
    font-size: 18px;
    line-height: 1.6;
}

/* ==========================================================================
   5. PRZYCISKI (uniwersalne i warianty)
   ========================================================================== */

.button,
.red_button {
    z-index: 10;
    position: relative;
    display: inline-block;
    margin-top: 20px;
    padding: 20px 30px;
    border: 4px solid #dfc173;
    border-radius: 20px;
    background-color: transparent;
    color: #171b34;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.1s;
}

.button:hover {
    background-color: #dfc173;
    color: white;
}

.red_button:hover {
    background-color: #e62b48;
    border: 4px solid #e62b48;
    color: white;
}

/* ==========================================================================
   6. STOPKA STRONY
   ========================================================================== */

footer {
    margin-top: 150px;
    text-align: center;
    padding: 1px;
    background-color: white;
    width: 95%;
}

/* ==========================================================================
   7. SEKCJA LOKALIZACJA / ABOUT OFFICE
   ========================================================================== */

.office-wrapper {
    background-color: #b64e94;
    padding: 60px 40px;
    width: 100vw;
    position: relative;
}

.office-section {
    background-color: #b64e94;
    width: 100vw;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-bottom: 100px;
}

.office-photo {
    flex: 1 1 600px;
    max-width: 1000px;
    margin: 50px;
}

.office-photo img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.office-description {
    flex: 1 1 500px;
    max-width: 600px;
    background-color: white;
    padding: 30px;
    margin: 50px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.office-description p {
    color: #171b34;
    font-size: clamp(12px, 3.5vw, 18px);
    line-height: 1.6;
}

/* ==========================================================================
   8. SEKCJA PLATFORMY – KAFELKI WYBORU
   ========================================================================== */

.platform-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin: 60px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.platform-tile {
    align-self: flex-start !important; /* Każdy kafelek startuje od góry kontenera */
    border: 2px solid #dfc173;
    padding: 40px 60px;
    border-radius: 20px;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    color: #171b34;
    font-size: 20px;
    transition: background-color 0.3s, color 0.3s;
}

.platform-tile:hover {
    background-color: #dfc173;
    color: white;
}

.gold-tile {
    border: 2px solid #f9b132;
    color: #171b34;
    font-weight: bold;
}

.gold-tile:hover,
.gold-tile.active {
    background-color: #f9b132;
    color: white;
}

/* ==========================================================================
   8.5. STRONA CENNIKA
   ========================================================================== */

/* [8.5.1] Hero section cennika */
.pricing-hero {
    text-align: center;
    padding: 10px 60px;
    background: rgba(182, 78, 148, 0.1);
    color: #B64E94;
    margin: 0 auto 60px;
    border-radius: 25px;
    max-width: 1400px;
}

.pricing-hero h1 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: bold;
}

.pricing-subtitle {
    font-size: clamp(16px, 2.5vw, 20px);
    opacity: 0.8;
    max-width: 700px;
    margin: 0 auto;
    color: #B64E94;
    line-height: 1.4;
}

/* [8.5.1.1] Banery cenowe w hero */
.price-banners {
    display: flex;
    gap: 32px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.price-banner {
    flex: 1;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 32px 24px 24px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.price-banner:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.price-banner h2 {
    font-size: 28px;
    font-weight: bold;
    color: white;
    margin-bottom: 16px;
}

.banner-price {
    font-size: 36px;
    font-weight: bold;
    color: white;
    margin-bottom: 24px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.banner-button {
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #171b34;
    padding: 12px 32px;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.banner-button:hover {
    background: #f5f5f5;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* [8.5.1.2] Style dla konkretnych banerów */
.group-banner {
    border-color: rgba(58, 106, 178, 0.5);
}

.group-banner:hover {
    border-color: rgba(58, 106, 178, 0.8);
    background: rgba(58, 106, 178, 0.15);
}

.individual-banner {
    border-color: rgba(249, 177, 50, 0.5);
}

.individual-banner:hover {
    border-color: rgba(249, 177, 50, 0.8);
    background: rgba(249, 177, 50, 0.15);
}

/* [8.5.2] Siatka pakietów cennikowych */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

/* [8.5.3] Karty cennikowe */
.pricing-card {
    background: white;
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow: 0 8px 32px rgba(23, 27, 52, 0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 3px solid transparent;
}

.pricing-card:hover {
    box-shadow: 0 16px 48px rgba(23, 27, 52, 0.15);
}

/* [8.5.4] Pakiety grupowe - różne kolory */
/* Ósmoklasisty - czerwony */
.red-package {
    /* border-color: rgba(230, 43, 72, 0.5); */
    background: rgba(230, 43, 72, 0.05);
}

.red-package:hover {
    /* border-color: rgba(209, 26, 42, 0.8); */
    background: rgba(230, 43, 72, 0.08);
}

/* Podstawa - żółty/pomarańczowy */
.yellow-package {
    /* border-color: rgba(249, 177, 50, 0.5); */
    background: rgba(249, 177, 50, 0.05);
}

.yellow-package:hover {
    /* border-color: rgba(230, 164, 41, 0.8); */
    background: rgba(249, 177, 50, 0.08);
}

/* Rozszerzenie - niebieski */
.blue-package {
    /* border-color: rgba(58, 106, 178, 0.5); */
    background: rgba(58, 106, 178, 0.05);
}

.blue-package:hover {
    /* border-color: rgba(42, 90, 159, 0.8); */
    background: rgba(58, 106, 178, 0.08);
}

/* [8.5.5] Pakiet indywidualny (złoty - wyróżniony) */
.premium-package {
    /* border-color: rgba(223, 193, 115, 0.5); */
}

.premium-package.featured {
    background: linear-gradient(135deg, rgba(223, 193, 115, 0.05) 0%, rgba(249, 177, 50, 0.05) 10%, rgba(223, 193, 115, 0.05) 10%);
}

.premium-package:hover {
    /* border-color: rgba(212, 181, 95, 0.8); */
    background: rgba(223, 193, 115, 0.08);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #e62b48;
    color: white;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

/* [8.5.7] Nagłówek pakietu */
.package-header {
    text-align: center;
    margin-bottom: 24px;
}

.premium-package .package-header {
    padding-top: 45px;
}

.package-header h2 {
    font-size: 28px;
    font-weight: bold;
    color: #171b34;
    margin-bottom: 8px;
}

.package-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* [8.5.8] Cena */
.price {
    text-align: center;
    margin-bottom: 32px;
}

.price .amount {
    font-size: 48px;
    font-weight: bold;
    color: #171b34;
}

.price .period {
    font-size: 18px;
    color: #666;
    margin-left: 4px;
}

/* [8.5.9] Lista funkcji */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.features-list li {
    padding: 8px 0;
    font-size: 16px;
    color: #171b34;
    border-bottom: 1px solid #f0f0f0;
}

.features-list li:last-child {
    border-bottom: none;
}

/* [8.5.10] Opis pakietu */
.package-description {
    margin: 24px 0;
    text-align: center;
}

.package-description p {
    color: #666;
    font-style: italic;
    font-size: 14px;
}

/* [8.5.11] Przyciski cennikowe */
.pricing-button {
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 32px;
    border-radius: 25px;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.red-button {
    background-color: #e62b48;
    color: white;
}

.red-button:hover {
    background-color: #d11a2a;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 43, 72, 0.4);
}

.yellow-button {
    background-color: #f9b132;
    color: white;
}

.yellow-button:hover {
    background-color: #e6a429;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 177, 50, 0.4);
}

.blue-button {
    background-color: #3a6ab2;
    color: white;
}

.blue-button:hover {
    background-color: #2a5a9f;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(58, 106, 178, 0.4);
}

.premium-button {
    background-color: #dfc173;
    color: #171b34;
}

.premium-button:hover {
    background-color: #d4b55f;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(223, 193, 115, 0.4);
}

/* [8.5.11.1] Styl przycisku po kliknięciu (numer telefonu) */
.phone-button {
    font-size: 18px !important;
    padding: 18px 50px !important;
    font-weight: bold !important;
    opacity: 1 !important;
    cursor: default !important;
    pointer-events: none !important;
    white-space: nowrap !important;
    min-width: 180px !important;
}

.phone-button:hover {
    transform: translateX(-50%) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
    opacity: 1 !important;
}

/* [8.5.12] Sekcja informacyjna */
.pricing-info {
    background-color: #f8f9fa;
    padding: 60px 20px;
    margin: 60px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.info-item {
    text-align: center;
}

.info-item h3 {
    font-size: 20px;
    color: #171b34;
    margin-bottom: 12px;
}

.info-item p {
    color: #666;
    line-height: 1.6;
}

/* [8.5.13] Call to action */
.cta-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #3a6ab2 0%, #b64e94 100%);
    color: white;
    margin: 60px 0;
}

.cta-section h2 {
    font-size: clamp(28px, 4vw, 36px);
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background-color: #dfc173;
    color: #171b34;
    padding: 16px 48px;
    border-radius: 12px;
    font-weight: bold;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: #d4b55f;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(223, 193, 115, 0.4);
}

/* [8.5.14] Responsywność cennika */

/* Tablet breakpoint */
@media (max-width: 1200px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        max-width: 800px;
    }
    
    .pricing-hero {
        max-width: 1000px;
        padding: 25px 40px;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    .pricing-hero {
        max-width: 95%;
        padding: 20px 20px;
        margin: 0 10px 40px;
    }
    
    .pricing-hero h1 {
        font-size: clamp(24px, 6vw, 32px);
        margin-bottom: 8px;
    }
    
    .pricing-subtitle {
        font-size: clamp(14px, 4vw, 16px);
        max-width: 90%;
        line-height: 1.3;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }

    .pricing-card {
        padding: 24px 20px 40px;
        margin: 0 15px;
        max-width: 350px;
    }

    .price .amount {
        font-size: 32px;
    }
    
    .package-header h2 {
        font-size: 24px;
    }
    
    .package-icon {
        font-size: 36px;
    }
    
    .features-list li {
        font-size: 14px;
        padding: 6px 0;
    }

    .pricing-button {
        position: static;
        transform: none;
        margin: 20px auto 0;
        width: auto;
        display: block;
        padding: 14px 32px;
        font-size: 14px;
        text-align: center;
        max-width: 200px;
    }

    .pricing-button:hover {
        transform: translateY(-2px);
    }
    
    .phone-button {
        font-size: 16px !important;
        padding: 16px 20px !important;
        min-width: auto !important;
        margin: 20px auto 0 !important;
        max-width: 200px !important;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .cta-section {
        padding: 40px 20px;
        margin: 40px 10px;
    }
}

    /* Responsywność małych banerów w hero */
    .price-banners {
        flex-direction: column;
        gap: 24px;
    }

    .price-banner {
        min-width: auto;
        padding-bottom: 36px;
    }

    .banner-price {
        font-size: 28px;
    }

    .banner-button {
        position: static;
        transform: none;
        margin-top: 16px;
        display: inline-block;
    }

    .banner-button:hover {
        transform: translateY(-2px);
    }
}

/* ==========================================================================
   9. FORMA LOGOWANIA / REJESTRACJI
   ========================================================================== */

#login-tile {
    width: 150px;
    max-width: 95vw;
    transition: width 0.4s cubic-bezier(0.4, 0.2, 0.2, 1);
}

#login-tile.active {
    width: 250px;
}

#login-form-wrap {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0.2, 0.2, 1), opacity 0.3s;
}

#login-form-wrap.active {
    max-height: 700px;
    opacity: 1;
    transition: max-height 0.5s cubic-bezier(0.4, 0.2, 0.2, 1), opacity 0.3s;
}

#login-form input,
#register-form input {
    margin: 5px 0;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid #bbb;
    width: 85%;
    font-size: 1em;
}

#login-form button,
#register-form button {
    background: white;
    color: #171b34;
    border: 1px solid #dfc173;
    border-radius: 8px;
    padding: 7px 16px;
    margin: 8px 0 0 0;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: background 0.2s;
}

#login-form button:hover,
#register-form button:hover {
    background: #dfc173;
    color: white;
}

.gold-btn {
    background: white;
    color: #e62b48;
    border: 2px solid #e62b48;
    border-radius: 8px;
    padding: 8px 20px;
    margin-top: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 7px rgba(255, 215, 0, 0.08);
}

.gold-btn:hover {
    background: #e62b48;
    color: white;
}

#login-message.success {
    color: #3a6ab2;
    background: #eafbe2;
    border-radius: 6px;
    padding: 3px 10px;
    margin-top: 10px;
    font-weight: 500;
}

#login-message.error {
    color: #e62b48;
    background: #ffe4e4;
    border-radius: 6px;
    padding: 3px 10px;
    margin-top: 10px;
    font-weight: 500;
}

/* ==========================================================================
   10. USTAWIENIA UŻYTKOWNIKA (EDYCJA DANYCH)
   ========================================================================== */

#user-settings-box {
    display: none;
}

.user-settings-box {
    max-width: 370px;
    margin: 32px auto;
    background: #faf9f6;
    border-radius: 14px;
    padding: 18px 26px 24px 26px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-settings-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 10px;
    width: 100%;
}

.user-settings-form label {
    font-weight: bold;
}

.user-settings-form input[type="text"],
.user-settings-form input[type="password"] {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 7px;
    font-size: 1em;
}

.user-settings-form button {
    background: #dfc173;
    color: #2d2002;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    margin-top: 3px;
    transition: background 0.2s;
    align-self: flex-end;
}

.user-settings-form button:hover {
    background: #e7d092;
}

.settings-message {
    font-size: 0.95em;
    margin-top: 7px;
}

.settings-message.success {
    color: green;
}

.settings-message.error {
    color: red;
}

/* ==========================================================================
   11. ARKUSZE MATURALNE (listy PDFów, tabele z wynikami)
   ========================================================================== */

.arkusze-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding: 40px 20px;
}

.arkusze-box {
    flex: 1 1 400px;
    max-width: 600px;
}

.arkusze-box h2 {
    text-align: center;
    color: #171b34;
    margin-bottom: 20px;
}

.arkusze-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.arkusze-table th,
.arkusze-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.arkusze-table th {
    background-color: #dfc173;
    color: #171b34;
}

.pdf-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #dfc173; /* [1] Bazowy kolor */
    filter: brightness(1); /* [2] Bazowa jasność */
    transition: filter 0.3s; /* [3] Animacja zmiany filtra */
    color: #171b34;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    outline: none;
}

.pdf-button:focus {
    outline: none !important;
}

.pdf-button:hover {
    filter: brightness(0.85); /* ciemniej */
}

.odp-button {
    display: inline-block;
    padding: 4px 16px;
    border: 4px solid #dfc173;
    color: #171b34;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.odp-button:hover {
    background-color: #dfc173;
}

/* ==========================================================================
   12. PANEL ADMINA (użytkownicy, wyniki)
   ========================================================================== */

.admin-panel {
    display: none;
    max-width: 400px;
    margin: 30px auto;
    padding: 20px;
    background: #f9f6e5;
    border-radius: 14px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.09);
    border: 2px solid #f9b132;
}

.admin-tools {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
}

.admin-tool {
    display: flex;
    align-items: center;
    padding: 16px 22px;
    border: 2px solid #dfc173;
    border-radius: 10px;
    background: whitede7;
    color: #171b34;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(200, 160, 32, 0.06);
    transition: background 0.14s, box-shadow 0.14s;
    cursor: pointer;
}

.admin-tool:hover {
    background: #f5e3b8;
    box-shadow: 0 2px 16px rgba(200, 160, 32, 0.14);
    color: #e62b48;
}

.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
    font-size: 0.9em;
}

.admin-users-table th,
.admin-users-table td {
    box-sizing: border-box;
    padding: 14px 10px;
    border: 1px solid #f9b132;
    text-align: left;
    background: white;
}

.admin-users-table th {
    background: white;
    font-weight: bold;
}

.admin-users-table tr:nth-child(even) {
    background: white;
}

.admin-users-table th:nth-child(2),
.admin-users-table td:nth-child(2) {
    min-width: 200px;
    max-width: 400px;
}

.admin-users-table input[type="text"] {
    border: 1px solid #dfc173;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 1em;
    background: white;
    transition: border-color 0.2s;
}

.admin-users-table input[type="text"]:focus {
    border-color: color-mix(in srgb, #dfc173, #171b34 15%);
    outline: none;
}

.admin-users-table select,
.admin-users-table input[type="date"] {
    border: 1px solid #dfc173;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 1em;
    background: white;
    margin-top: 2px;
    transition: border-color 0.2s;
}

.admin-users-table select:focus {
    border-color: color-mix(in srgb, #dfc173, #171b34 15%);
    outline: none;
}

.admin-users-table label {
    margin-right: 9px;
    font-weight: 500;
    cursor: pointer;
}

.save-user-btn {
    background: #dfc173;
    color: #171b34;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1em;
    padding: 7px 22px;
    margin: 0 2px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}

.save-user-btn:hover,
.save-user-btn:focus {
    background: color-mix(in srgb, #dfc173, #171b34 15%);
    color: white;
}

.admin-action-btn {
    margin-right: 6px;
    margin: 2px 2px;
    padding: 4px 8px;
    font-size: 0.97em;
    border: 1px solid #dfc173;
    border-radius: 7px;
    background: white8e1;
    cursor: pointer;
    transition: background 0.14s, color 0.14s;
}

.admin-action-btn:hover {
    background: #dfc173;
    color: #e62b48;
}

/* [ADMIN] Komórka z przyciskami w jednym wierszu */
.admin-action-cell {
    display: flex; /* [1] Flexbox zamiast domyślnego układu */
    flex-wrap: wrap; /* [2] Jeśli okno wąskie, zawija do nowego wiersza */
    gap: 7px; /* [3] Odstęp między przyciskami */
    align-items: center; /* [4] Wyrównanie w pionie */
    justify-content: flex-start; /* [5] Przyciski do lewej */
    min-width: 590px; /* [6] Minimalna szerokość, jeśli chcesz szerzej */
}

/* ==========================================================================
   13. CHMURKA Z WYNIKIEM (formularz na wyniki)
   ========================================================================== */

#wynik-popover {
    display: none;
    position: absolute;
    z-index: 9999;
    background: color-mix(in srgb, #dfc173, white 50%);
    border: 2px solid #dfc173;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(224, 204, 116, 0.18),
        0 1.5px 5px rgba(0, 0, 0, 0.1);
    padding: 16px 20px 14px 20px;
    min-width: 238px;
    min-height: 52px;
    font-size: 1.08em;
    transition: box-shadow 0.15s;
}

#wynik-popover .popover-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

#wynik-popover input[type="number"].popover-procent {
    width: 60px;
    padding: 5px 7px;
    border: 1.5px solid color-mix(in srgb, #dfc173, #171b34 15%);
    border-radius: 8px;
    background: white;
    font-size: 1em;
    outline: none;
    transition: border 0.18s;
}

#wynik-popover input[type="number"].popover-procent:focus {
    border-color: color-mix(in srgb, #dfc173, #171b34 50%);
    background: whitebf2;
}

#wynik-popover input[type="date"].popover-date {
    width: 130px;
    padding: 5px 7px;
    border: 1.5px solid color-mix(in srgb, #dfc173, #171b34 15%);
    border-radius: 8px;
    background: white;
    font-size: 1em;
    outline: none;
    transition: border 0.18s;
}

#wynik-popover input[type="date"].popover-date:focus {
    border-color: color-mix(in srgb, #dfc173, #171b34 15%);
    background: whitebf2;
}

#wynik-popover .popover-ok {
    padding: 6px 16px;
    background: #dfc173;
    border: none;
    border-radius: 8px;
    color: #171b34;
    font-weight: bold;
    font-size: 1em;
    box-shadow: 0 1.5px 5px rgba(208, 176, 51, 0.1);
    cursor: pointer;
    transition: background 0.15s;
}

#wynik-popover .popover-ok:hover {
    background: color-mix(in srgb, #dfc173, #171b34 15%);
}

/* Poprawione style przycisków w popoverze wyników */
#wynik-popover button {
    background-color: #dfc173; /* kolor dodatkowy przycisku */
    color: #171b34; /* główny kolor tekstu */
    border: none; /* brak obramowania */
    border-radius: 8px; /* dopasowanie do innych elementów */
    padding: 3px 8px; /* wygodne odstępy wewnętrzne */
    font-weight: 600; /* lepsza widoczność tekstu */
    cursor: pointer; /* wskaźnik kursora */
    transition: background-color 0.2s, transform 0.1s; /* animacje */
}

/* Hover przycisku ogólnego */
#wynik-popover button:hover {
    background-color: #3a6ab2; /* główny kolor */
    color: white; /* biały kolor tekstu */
    transform: translateY(-1px); /* subtelne uniesienie */
}

#wynik-popover button.usun-wynik-btn {
    margin-left: auto; /* Przycisk zawsze na końcu flexa */
    min-width: 52px;
}

/* Specjalny styl dla przycisków "Usuń" */
#wynik-popover button.usun-wynik-btn:hover {
    background-color: #e62b48; /* czerwony kolor do usuwania */
    color: white; /* biały kolor tekstu */
    margin-left: auto; /* Przycisk zawsze na końcu flexa */
}

/* Linia z wynikiem – procent+data z lewej, przycisk z prawej */
.wynik-item-row {
    position: relative; /* [1] Baza dla pozycjonowania absolutnego */
    display: flex;
    align-items: center;
    margin-bottom: 3px;
    min-width: 220px;
}

.wynik-proc-col {
    /* Możesz ustawić min-width, żeby procent się nie rozjeżdżał */
    min-width: 38px;
    text-align: left;
    font-weight: 500;
    padding-right: 8px;
}

.wynik-data-col {
    position: absolute; /* Pozycjonowanie względem .wynik-item-row */
    right: 60px; /* Odległość od prawej (dopasuj do szerokości przycisku i marginesów) */
    top: 50%; /* Wyśrodkowanie w pionie */
    transform: translateY(-50%);
    color: color-mix(in srgb, #dfc173, #171b34 15%);
    font-size: 0.97em;
    font-variant-numeric: tabular-nums;
    background: transparent; /* Dla czystości */
    pointer-events: none; /* Nie klikalna, nie przeszkadza w klikaniu przycisku */
    z-index: 2; /* Na wierzchu nad tłem, ale pod przyciskiem */
}

.wynik-proc {
    position: relative;
    cursor: pointer;
    color: #171b34;
    font-weight: bold;
    background: #dfc173;
    border-radius: 8px;
    padding: 3px 11px;
    box-shadow: 0 2px 8px rgba(224, 204, 116, 0.09);
    transition: background 0.15s;
}

.wynik-proc::after {
    content: attr(data-date);
    display: none;
    position: absolute;
    right: 100%;
    top: 50%;
    background: color-mix(in srgb, #dfc173, white 50%);
    color: #171b34;
    border-radius: 7px;
    padding: 3px 10px;
    margin-right: 14px;
    transform: translateY(-50%);
    white-space: nowrap;
    z-index: 100;
    font-size: 0.97em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.11);
}

.wynik-proc:hover::after {
    display: block;
}

.wynik-cell {
    max-width: 180px;
    min-width: 80px;
    width: 1%;
}

/* ==========================================================================
   14. ADMIN USERS RESULTS (select z arkuszami)
   ========================================================================== */

.arkusz-select {
    background: white;
    border: 2px solid #dfc173;
    border-radius: 12px;
    padding: 7px 16px 7px 10px;
    font-size: 1em;
    font-family: "Mulish", "Muli", Arial, sans-serif;
    color: #171b34;
    transition: border-color 0.16s;
}

.arkusz-select:focus {
    border-color: #dfc173;
    outline: none;
}

/* ==========================================================================
   15. ADMIN CYCLICAL PAPERS – PRZYCISK I GENERATOR
   ========================================================================== */

.actions-row {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.generated-message-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 10px;
}

.generated-message-box textarea {
    width: 340px;
    min-height: 68px;
    margin: 0 0 5px 0;
    font-size: 1.07em;
    padding: 9px 11px;
    border: 1px solid #dfc173;
    border-radius: 6px;
    background: white;
    resize: vertical;
    display: block;
}

.copy-btn {
    margin-top: 3px;
    padding: 6px 20px;
    font-size: 1em;
    border-radius: 8px;
    background: #dfc173;
    color: #171b34;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.18s;
}

.copy-btn:hover {
    background: color-mix(in srgb, #dfc173, #171b34 50%);
    color: white;
}

/* ==========================================================================
   16. MEDIA QUERIES – STYL RESPONSYWNY
   ========================================================================== */

@media (max-width: 768px) {
    .arkusze-table {
        font-size: 11px;
    }

    .arkusze-table th,
    .arkusze-table td {
        padding: 7px 9px;
    }

    .pdf-button {
        padding: 5px 9px;
        font-size: 12px;
    }

    .odp-button {
        padding: 2px 10px;
        font-size: 11px;
    }

    .arkusze-box h2 {
        font-size: 16px;
        text-align: center;
    }

    .arkusze-box {
        padding: 9px;
    }
}

/* ==========================================================================
   17. MAPA MATEMATYKI (SVG)
   ========================================================================== */

#mapa-container {
    width: 100%;
    height: 80vh;
    position: relative;
    overflow: hidden;
    /* Brak poziomego scrolla */
}

svg {
    width: 100%;
    height: 100%;
    touch-action: none;
    /* Pozwala na pinch-zoom bez scrolla strony */
}

/* ==========================================================================
   18. WYKRES ZE SZCZEGÓŁOWYMI WYNIKAMI
   ========================================================================== */

#panel {
    max-width: 1400px; /* lub 100% - zależnie od layoutu */
    width: 90%;
    min-height: 480px;
    margin: 40px auto; /* wyśrodkowanie */
    padding: 24px 32px 48px 32px; /* oddech po bokach */
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px #0001;
}

#ustawDate {
    /* [1] Styl głównego przycisku "Ustaw" */
    background: #dfc173; /* Twój główny złoty */
    color: #171b34; /* Twój główny granat */
    border: none; /* Bez ramki */
    border-radius: 8px; /* Zaokrąglenie rogów */
    font-weight: bold; /* Pogrubienie */
    padding: 6px 18px; /* Padding jak w innych przyciskach */
    font-size: 1em; /* Standardowa czcionka */
    box-shadow: 0 1.5px 5px rgba(208, 176, 51, 0.1); /* Cień */
    cursor: pointer; /* Kursor łapka */
    margin-left: 8px; /* Odstęp od inputa, jeśli trzeba */
    transition: background 0.13s, box-shadow 0.18s;
}
#ustawDate:hover {
    /* [2] Styl po najechaniu */
    background-color: color-mix(
        in srgb,
        #dfc173,
        #171b34 15%
    ); /* Twój jaśniejszy pomarańczowy */
}

#dokladny-wykres {
    width: 100% !important;
    max-width: 1200px;
    aspect-ratio: 2 / 1;
    min-height: 380px;
    display: block;
    margin: 0 auto;
}

/* Dla bardzo małych ekranów – zwiększ padding nagłówka i ustaw czcionki */
@media (max-width: 600px) {
    #panel {
        padding: 8px 2vw 18vw 2vw;
        min-height: 480px;
    }

    #panel h1 {
        font-size: clamp(1rem, 2vw, 1.15rem);
    }

    #dokladny-wykres {
        aspect-ratio: 2 / 1;
        min-height: 250px;
    }
}

/* ==========================================================================
   19. WYKRES ZE SZCZEGÓŁOWYMI WYNIKAMI [ADMIN]
   ========================================================================== */

#admin-charts-panel {
    max-width: 1400px; /* lub 100% - zależnie od layoutu */
    width: 90%;
    min-height: 480px;
    margin: 40px auto; /* wyśrodkowanie */
    padding: 24px 32px 48px 32px; /* oddech po bokach */
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px #0001;
}

/* ==========================================================================
   20. Zadania
   ========================================================================== */

.task-picker {
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.answer-btn {
    border: 2px solid #dfc173;
    border-radius: 12px;
    background: white;
    color: #171b34;
    padding: 14px 24px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.answer-btn:hover:not(:disabled) {
    background: #f9b132;
    color: white;
}

#zadanie-box.completed .answer-btn:not(:disabled) {
    opacity: 0.7;
}

/* ========================================================================== */
/* 21. [PANEL] STYLOWANIE TABELI STATYSTYK (stats.html)                       */
/* ========================================================================== */

/* --------- kontener i scroll -------------- */
.stats-container {
    max-width: 1200px; /* [21.1] */
    margin: 0 auto; /* [21.1a] */
}

.table-wrap {
    overflow-x: auto; /* [21.2] */
}

/* --------- tabela – bazowe style ---------- */
#stats-table {
    border-collapse: collapse; /* [21.3] */
    width: 100%; /* [21.3a] */
    min-width: 700px; /* [21.3b] */
    table-layout: fixed; /* [21.3c] konieczne, żeby <col width> działało */
}

#stats-table th,
#stats-table td {
    padding: 10px 12px; /* [21.4] */
    border: 1px solid #ddd; /* [21.4a] */
    text-align: left; /* [21.4b] */
    font-size: 15px; /* [21.4c] */
}

#stats-table th {
    background: #dfc173; /* [21.5] */
    font-weight: 600; /* [21.5a] */
}

#stats-table tr:nth-child(even) {
    background: #faf6e7; /* [21.6] */
}

/* --------- kolumny – łatwo regulowane ----- */
.w-id {
    width: 40px; /* [21.7] ID */
}

.w-title {
    width: auto; /* [21.8] Tytuł bazowy */
    max-width: 300px; /* [21.8a] limit */
}

.w-total {
    width: 60px; /* [21.9] Prób */
}

.w-good {
    width: 120px; /* [21.10] Poprawnych */
}

.w-pct {
    width: 120px; /* [21.11] Pasek % */
}

.w-top {
    width: 20%; /* [21.12] TOP błędy */
}

/* --------- pasek % ------------------------ */
.bar {
    height: 12px; /* [21.13] */
    border-radius: 4px; /* [21.13a] */
}

.bar-ok {
    background: #3a6ab2;
} /* [21.13b] */
.bar-bad {
    background: #e62b48;
} /* [21.13c] */

/* --------- tag najczęstszych błędów ------- */
.tag {
    background: #f9b132; /* [21.14] */
    color: #171b34; /* [21.14a] */
    padding: 2px 6px; /* [21.14b] */
    border-radius: 4px; /* [21.14c] */
    margin: 1px 4px 1px 0; /* [21.14d] */
    font-size: 12px; /* [21.14e] */
    display: inline-block; /* [21.14f] */
}

/* --------- responsywne fonty -------------- */
@media (max-width: 700px) {
    h1 {
        font-size: 28px; /* [21.15] */
    }

    #stats-table {
        min-width: 320px; /* [21.15a] */
    }

    #stats-table th,
    #stats-table td {
        font-size: 10px; /* [21.15b] */
        padding: 4px; /* [21.15c] */
    }

    .tag {
        font-size: 9px; /* [21.15d] */
    }

    .w-id {
        width: 20px !important; /* [21.15e] */
    }

    .w-title {
        width: 120px !important; /* [21.15f] */
        white-space: nowrap; /* [21.15f1] */
        overflow: hidden; /* [21.15f2] */
        text-overflow: ellipsis; /* [21.15f3] */
    }

    .w-total {
        width: 35px !important;
    } /* [21.15g] */
    .w-good {
        width: 70px !important;
    } /* [21.15h] */
    .w-pct {
        width: 70px !important;
    } /* [21.15i] */
    .w-top {
        width: 80px !important;
    } /* [21.15j] */
}
