/* ===== ZMIENNE CSS ===== */
:root {
    --color-primary: #b88421;
    --color-dark: #1a1a1a;
    --color-light: #fff;
    --color-accent: #88621a;
    --color-error: #9d6e16;
    --color-success: #27ae60;
    --color-grey: #f8f8f8;
    --color-grey-light: #eee;
    --color-grey-dark: #555;
    --font-display: 'Roboto Slab', serif;
    --font-body: 'PT Sans', sans-serif;
    --transition: all 0.2s ease;
    
    /* Responsive font sizes */
    --fs-h1: clamp(1.8rem, 5vw, 3.2rem);
    --fs-h2: clamp(1.4rem, 4vw, 2.2rem);
    --fs-h3: clamp(1.1rem, 3vw, 1.8rem);
    --fs-body: clamp(0.9rem, 2vw, 1rem);
    --fs-small: clamp(0.75rem, 1.5vw, 0.95rem);
    
    /* Responsive spacing */
    --spacing-xs: clamp(0.5rem, 2vw, 1rem);
    --spacing-sm: clamp(1rem, 3vw, 1.5rem);
    --spacing-md: clamp(1.5rem, 4vw, 2rem);
    --spacing-lg: clamp(2rem, 5vw, 3rem);
    --spacing-xl: clamp(2.5rem, 6vw, 4rem);
}

.lead-alert{
    display: none;
    position:fixed;
    top:20px;
    left:50%;
    transform:translateX(-50%);
    background:#ff3b3b;
    color:#fff;
    padding:14px 28px;
    border-radius:10px;
    font-weight:700;
    font-size:15px;
    box-shadow:0 10px 30px rgba(0,0,0,0.4);
    z-index:9999;
    display:none;
    animation:leadPulse 1s infinite alternate;
    }
    
    .lead-alert a{
    color:#fff;
    text-decoration:underline;
    margin-left:6px;
    }
    
    @keyframes leadPulse{
    from{transform:translateX(-50%) scale(1);}
    to{transform:translateX(-50%) scale(1.05);}
    }
.tabs { display:flex; gap:4px; margin-bottom:24px; border-bottom:2px solid #444; }
.tab-btn { padding:10px 24px; border:none; background:transparent; color:#aaa; font-family:var(--font-body,'PT Sans',sans-serif); font-size:1em; font-weight:700; cursor:pointer; border-bottom:3px solid transparent; margin-bottom:-2px; transition:color 0.2s,border-color 0.2s; border-radius:6px 6px 0 0; }
.tab-btn:hover { color:#e0e0e0; }
.tab-btn.active { color:#4fc3f7; border-bottom-color:#4fc3f7; background:#2a2a2a; }
.tab-content { display:none; }
.tab-content.active { display:block; }
.tab-badge { display:inline-block; background:#4fc3f7; color:#111; font-size:0.7em; font-weight:700; border-radius:10px; padding:1px 7px; margin-left:6px; vertical-align:middle; }

/* Siatka kart miesięcy */
.months-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:16px; margin-top:8px; }
.month-card {
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:8px; padding:24px 16px;
    background:#232323; border:1px solid #3a3a3a; border-radius:14px;
    text-decoration:none; color:#e0e0e0;
    transition:background 0.2s, border-color 0.2s, transform 0.15s;
    cursor:pointer;
}
.month-card:hover { background:#2a3a4a; border-color:#4fc3f7; transform:translateY(-2px); }
.month-card .mc-icon { font-size:2em; }
.month-card .mc-name { font-family:'Roboto Slab',serif; font-size:1.05em; font-weight:700; text-align:center; }
.month-card .mc-count { font-size:0.8em; color:#888; }

/* Widok wpisów miesiąca */
.arch-header { display:flex; align-items:center; gap:12px; margin-bottom:20px; flex-wrap:wrap; }
.btn-back { display:inline-flex; align-items:center; gap:6px; padding:8px 16px; background:#2a2a2a; border:1px solid #555; border-radius:8px; color:#ccc; font-size:0.9em; font-weight:700; text-decoration:none; cursor:pointer; transition:background 0.2s, color 0.2s; }
.btn-back:hover { background:#3a3a3a; color:#fff; }
.arch-month-title { font-family:'Roboto Slab',serif; font-size:1.3em; color:#4fc3f7; }

/* Admin: ręczna archiwizacja */
.admin-archive-bar { display:flex; align-items:center; gap:12px; margin-bottom:24px; padding:14px 18px; background:#1e2a1e; border:1px solid #2e5030; border-radius:10px; flex-wrap:wrap; }
.admin-archive-bar label { color:#aaa; font-size:0.9em; white-space:nowrap; }
.admin-archive-bar input[type="month"] { padding:8px 12px; border:1px solid #555; border-radius:6px; background:#2a2a2a; color:#e0e0e0; font-size:0.9em; }
.btn-archive { padding:8px 18px; background:#2e5030; color:#7ec880; border:1px solid #3d6640; border-radius:6px; font-weight:700; cursor:pointer; font-size:0.9em; transition:background 0.2s; }
.btn-archive:hover { background:#3d6640; }
#archiveMsg { font-size:0.85em; padding:6px 12px; border-radius:6px; }
#archiveMsg.ok  { background:#1e3a1e; color:#7ec880; border:1px solid #3d6640; }
#archiveMsg.err { background:#3a1e1e; color:#e07070; border:1px solid #6a3030; }
.obecnosc-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: flex-start;
}

@media (max-width: 1100px) {
    .obecnosc-layout {
        grid-template-columns: 1fr;
    }
}

/* ===== WRAPPER KALENDARZA ===== */
.kal-wrapper {
    background: #2a2a2a;
    border-radius: 16px;
    border: 2px solid rgba(184, 132, 33, 0.35);
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    overflow: hidden;
    user-select: none;
    position: sticky;
    top: 90px;
}

/* ===== NAGŁÓWEK MIESIĄCA ===== */
.kal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #b88421, #9d6e16);
}

.kal-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.15;
}

.kal-month-name {
    font-family: 'Roboto Slab', serif;
    font-size: 1.3em;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.kal-year {
    font-size: 0.82em;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
}

.kal-nav-btn {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.25);
    color: #fff;
    border-radius: 10px;
    width: 38px;
    height: 38px;
    font-size: 1.6em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
    padding: 0;
}

.kal-nav-btn:hover {
    background: rgba(255,255,255,0.28);
    transform: scale(1.08);
}

/* ===== NAGŁÓWKI DNI TYGODNIA ===== */
.kal-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #222;
    padding: 8px 12px 6px;
    gap: 3px;
}

.kal-dow {
    text-align: center;
    font-size: 0.72em;
    font-weight: 700;
    color: #888;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 0;
}

.kal-dow-weekend {
    color: #b88421;
}

/* ===== SIATKA DNI ===== */
.kal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    padding: 8px 12px 12px;
    background: #2a2a2a;
}

/* ===== KOMÓRKI DNI ===== */
.kal-cell {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: default;
    transition: all 0.15s ease;
    overflow: visible;
    background: #3a3a3a;
}

.kal-cell:hover {
    transform: scale(1.08);
    z-index: 10;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.kal-cell.kal-empty {
    background: transparent;
    border-color: transparent;
}

.kal-cell.kal-empty-day {
    background: #303030;
    border-color: #404040;
}

.kal-cell.kal-weekend .kal-day-num {
    color: #b88421;
}

.kal-cell.kal-today {
    box-shadow: 0 0 0 2px #b88421, 0 0 12px rgba(184,132,33,0.4);
}

.kal-cell.kal-today .kal-day-num {
    color: #b88421;
    font-weight: 800;
}

/* Numer dnia */
.kal-day-num {
    font-size: 0.78em;
    font-weight: 700;
    color: #ccc;
    line-height: 1;
    margin-bottom: 2px;
}

/* Ikona statusu (pojedynczy wpis) */
.kal-status-icon {
    font-size: 0.9em;
    line-height: 1;
    font-weight: 700;
}

/* Kropki dla wielu wpisów (admin) */
.kal-dots {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    padding: 0 2px;
}

.kal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

/* ===== TOOLTIP ===== */
.kal-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    border: 1px solid rgba(184,132,33,0.4);
    border-radius: 8px;
    padding: 8px 12px;
    white-space: nowrap;
    font-size: 0.78em;
    color: #e0e0e0;
    z-index: 100;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    pointer-events: none;
    min-width: 120px;
}

.kal-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(184,132,33,0.4);
}

.kal-cell:hover .kal-tooltip {
    display: block;
    animation: tooltipFadeIn 0.15s ease;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(4px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.kal-tooltip-row {
    padding: 2px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

/* Tooltip — poprawka gdy na końcu lewej/prawej krawędzi */
.kal-grid .kal-cell:nth-child(7n) .kal-tooltip,
.kal-grid .kal-cell:nth-child(7n-6) .kal-tooltip {
    left: auto;
    transform: none;
}
.kal-grid .kal-cell:nth-child(7n) .kal-tooltip   { right: 0; left: auto; }
.kal-grid .kal-cell:nth-child(7n-6) .kal-tooltip { left: 0; right: auto; }
.kal-grid .kal-cell:nth-child(7n) .kal-tooltip::after   { left: auto; right: 10px; transform: none; }
.kal-grid .kal-cell:nth-child(7n-6) .kal-tooltip::after { left: 10px; transform: none; }

/* ===== STATYSTYKI MIESIĄCA ===== */
.kal-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 12px 12px;
}

.kal-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid;
    font-size: 0.78em;
    font-weight: 600;
}

/* ===== LEGENDA ===== */
.kal-legenda {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px 14px;
    border-top: 1px solid #3a3a3a;
    background: #242424;
}

.kal-legenda-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75em;
    color: #aaa;
    font-weight: 600;
}

.kal-legenda-dot {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    color: white;
    font-weight: 700;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    .kal-wrapper {
        position: static;
    }
    .kal-cell {
        border-radius: 7px;
    }
    .kal-day-num {
        font-size: 0.7em;
    }
    .kal-status-icon {
        font-size: 0.75em;
    }
    .kal-dot {
        width: 5px;
        height: 5px;
    }
    .kal-header {
        padding: 12px 16px;
    }
    .kal-month-name {
        font-size: 1.1em;
    }
    .kal-grid, .kal-days-header {
        padding: 6px 8px;
    }
    .kal-grid {
        gap: 2px;
    }
}

@media (max-width: 479px) {
    .kal-day-num {
        font-size: 0.6em;
    }
    .kal-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 1.3em;
    }
}

.logo-tagline {
    display: block;
    font-family: var(--font-body);
    font-size: 0.55em;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #c9951f;
    text-shadow:
        0 0 6px rgba(184,132,33,0.9),
        0 0 14px rgba(184,132,33,0.6),
        0 0 28px rgba(184,132,33,0.35);
    margin-top: -2px;
    line-height: 1;
}
.hdr-msg-btn {
    position: relative;
    width: 38px; height: 38px;
    border-radius: 9px;
    background: rgba(255,255,255,0.05);
    border: 2px solid #b88421;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #aaa; font-size: 1.1em;
    text-decoration: none; flex-shrink: 0;
    transition: all 0.2s ease;
}
.hdr-msg-btn:hover {
    background: rgba(184,132,33,0.15);
    border-color: rgba(184,132,33,0.4);
    color: #b88421; transform: translateY(-2px);
}
.hdr-msg-badge {
    position: absolute; top: -6px; right: -6px;
    background: #b88421; color: white;
    font-size: 0.62em; font-weight: 800;
    min-width: 18px; height: 18px; border-radius: 9px;
    display: none; align-items: center; justify-content: center;
    padding: 0 4px; border: 2px solid #1a1a1a;
    animation: badgePop 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes badgePop { from{transform:scale(0);opacity:0} to{transform:scale(1);opacity:1} }
.change-pass-btn {
    background: transparent;
    color: #b88421;
    border: 2px solid #b88421;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: var(--fs-small);
    transition: var(--transition);
    white-space: nowrap;
}
.change-pass-btn:hover {
    background: linear-gradient(135deg, #b88421, #9d6e16);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 132, 33, 0.3);
}

#changePassModal .input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #555;
    border-radius: 8px;
    background: #3a3a3a;
    color: #e0e0e0;
    font-size: 1em;
    font-family: var(--font-body);
    transition: all 0.2s ease;
    outline: none;
}
#changePassModal .input-wrapper input:focus { border-color: #b88421; box-shadow: 0 0 0 3px rgba(184,132,33,0.15); }
#changePassModal .input-wrapper input::placeholder { color: #777; }
#changePassModal .form-group { margin-bottom: 0; }
#changePassModal .form-group label { display: block; font-weight: 700; margin-bottom: 8px; color: #e0e0e0; font-size: var(--fs-small); }
#passMsg { padding: 10px 14px; border-radius: 6px; font-weight: 600; font-size: 0.9em; display: none; margin-bottom: 4px; }
#passMsg.success { background: rgba(39,174,96,0.15); color: #27ae60; border-left: 4px solid #27ae60; display: block; }
#passMsg.error   { background: rgba(184,132,33,0.15); color: #b88421; border-left: 4px solid #b88421; display: block; }
@media (max-width: 767px) { .change-pass-btn { padding: 8px 10px; font-size: 0.75em; } }
@media (max-width: 479px) { .change-pass-btn { width: 100%; padding: 10px; font-size: 0.7em; } }
/* ===== SPOTKANIA STYLES ===== */
.logo-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
}
@media (max-width: 200px) {
    .logo-img {
        max-width: 150px;
    }
}

.btn-zal {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75em;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}
.btn-zal-dodaj {
    background: linear-gradient(135deg, #b88421, #9d6e16);
    color: white;
}
.btn-zal-dodaj:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(184,132,33,0.4);
}
.btn-zal-lista {
    background: rgba(184,132,33,0.12);
    color: #b88421;
    border: 1px solid rgba(184,132,33,0.35) !important;
}
.btn-zal-lista:hover {
    background: rgba(184,132,33,0.22);
    transform: translateY(-1px);
}
.zal-count-badge {
    background: #b88421;
    color: white;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 0.85em;
}
.zal-btns {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* ===== MODAL ZAŁĄCZNIKÓW ===== */
.zal-loading, .zal-empty, .zal-error {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 0.95em;
}
.zal-error { color: #e74c3c; }

.zal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #3a3a3a;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #4a4a4a;
    transition: all 0.2s ease;
}
.zal-item:hover { border-color: #b88421; background: #404040; }
.zal-icon { font-size: 1.6em; flex-shrink: 0; }
.zal-info { flex: 1; min-width: 0; }
.zal-nazwa {
    font-weight: 700;
    color: #e0e0e0;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.zal-meta { font-size: 0.75em; color: #888; margin-top: 3px; }
.zal-akcje { display: flex; gap: 6px; flex-shrink: 0; }

.btn-zal-pobierz {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #b88421, #9d6e16);
    color: white;
    border-radius: 6px;
    font-size: 0.78em;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-zal-pobierz:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(184,132,33,0.4); }

.btn-zal-usun {
    padding: 6px 10px;
    background: rgba(220,53,69,0.15);
    color: #e74c3c;
    border: 1px solid rgba(220,53,69,0.3);
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-zal-usun:hover { background: #dc3545; color: white; }

/* ===== MODAL UPLOAD ===== */
#modalZalaczniki .modal-header,
#modalDodajZalacznik .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
#modalZalaczniki .modal-header h3,
#modalDodajZalacznik .modal-header h3 { margin: 0; }

.btn-dodaj-zal-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #b88421, #9d6e16);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-dodaj-zal-header:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(184,132,33,0.35); }

/* Drop zone */
.drop-zone {
    border: 2px dashed #555;
    border-radius: 10px;
    padding: 35px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #3a3a3a;
    color: #888;
    margin-bottom: 14px;
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: #b88421;
    background: rgba(184,132,33,0.08);
    color: #b88421;
}
.drop-zone-icon { font-size: 2.5em; margin-bottom: 10px; }
.drop-zone-text { font-size: 0.9em; font-weight: 600; }
.drop-zone-sub { font-size: 0.78em; margin-top: 5px; color: #666; }

#wybranyPlik {
    font-size: 0.82em;
    color: #b88421;
    font-weight: 600;
    margin-bottom: 12px;
    min-height: 20px;
}

.upload-success { color: #27ae60; font-weight: 700; padding: 8px; background: rgba(39,174,96,0.1); border-radius: 6px; border-left: 3px solid #27ae60; }
.upload-error   { color: #e74c3c; font-weight: 700; padding: 8px; background: rgba(231,76,60,0.1); border-radius: 6px; border-left: 3px solid #e74c3c; }

#btnUpload {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #b88421, #9d6e16);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}
#btnUpload:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(184,132,33,0.3); }
#btnUpload:disabled { opacity: 0.6; cursor: not-allowed; }

#listaZalacznikow { max-height: 380px; overflow-y: auto; padding-right: 4px; }

@media (max-width: 767px) {
    .zal-btns { flex-direction: column; }
    .btn-zal { font-size: 0.7em; }
    .zal-item { flex-wrap: wrap; }
    .zal-akcje { width: 100%; }
}
/* Stats bar - one line */
.stats-bar {
    display: flex;
    gap: 30px;
    align-items: center;
    background: #3a3a3a;
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 4px solid #b88421;
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    flex-wrap: wrap;
}

.stat-item-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-label-inline {
    font-weight: 600;
    color: #e0e0e0;
    font-size: var(--fs-small);
}

.stat-value-inline {
    font-family: 'Roboto Slab', serif;
    font-size: var(--fs-h3);
    font-weight: 700;
    color: #b88421;
    padding: 5px 10px;
    background: rgba(227, 164, 28, 0.1);
    border-radius: 6px;
}

@media (max-width: 767px) {
    .stats-bar {
        gap: 15px;
        padding: 12px 15px;
    }

    .stat-item-inline {
        gap: 8px;
    }

    .stat-label-inline {
        font-size: 0.8em;
    }

    .stat-value-inline {
        font-size: 1.2em;
        padding: 4px 8px;
    }
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: var(--fs-small);
    font-weight: 600;
    text-align: center;
}

.badge-yes {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.15), rgba(39, 174, 96, 0.1));
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.badge-no {
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.15), rgba(196, 30, 58, 0.1));
    color: #9d6e16;
    border: 1px solid rgba(196, 30, 58, 0.3);
}

/* Checkbox styling */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #b88421;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:hover {
    transform: scale(1.1);
}

.checkbox-text {
    font-weight: 600;
    color: #ffffff;
    font-size: var(--fs-small);
}

/* Textarea styling */
textarea {
    font-family: 'PT Sans', sans-serif;
    border: 2px solid #555;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.2s ease;
    resize: vertical;
    min-height: 100px;
    width: 100%;
    box-sizing: border-box;
    background: #3a3a3a;
    color: #e0e0e0;
}

textarea:focus {
    outline: none;
    border-color: #b88421;
    box-shadow: 0 0 0 4px rgba(227, 164, 28, 0.15);
}

textarea::placeholder {
    color: #999;
}

/* Stats section */
.stats-section {
    background: #2a2a2a;
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    margin-top: var(--spacing-xl);
    border-top: 3px solid #b88421;
}

.stats-section h3 {
    font-family: 'Roboto Slab', serif;
    font-size: var(--fs-h2);
    margin-bottom: var(--spacing-lg);
    color: #ffffff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.stat-card {
    background: linear-gradient(135deg, #3a3a3a, #ffffff);
    padding: var(--spacing-lg);
    border-radius: 12px;
    border: 2px solid #eee;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: all 0.2s ease;
    border-left: 4px solid #b88421;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: #b88421;
}

.stat-icon {
    font-size: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-family: 'Roboto Slab', serif;
    font-size: var(--fs-h2);
    font-weight: 700;
    color: #b88421;
    margin-bottom: 5px;
}

.stat-label {
    font-size: var(--fs-small);
    color: #b0b0b0;
}
/* ===== NOTATKI STYLES ===== */

.notatki-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md);
    height: calc(100vh - 200px);
}

.notatki-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: var(--spacing-lg);
    height: 100%;
    background: #2a2a2a;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Lista notatek - lewa strona */
.notatki-list-section {
    display: flex;
    flex-direction: column;
    border-right: 2px solid var(--color-grey-light);
    overflow: hidden;
    background: #fafafa;
}

.notatki-header {
    padding: var(--spacing-md);
    border-bottom: 2px solid var(--color-grey-light);
    background: #2a2a2a;
}

.notatki-header h2 {
    margin: 0 0 var(--spacing-sm) 0;
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    color: #999999;
}

.notatki-header .btn-add {
    width: 100%;
    padding: 10px 16px;
    font-size: var(--fs-small);
}

.notatki-search {
    padding: var(--spacing-sm);
    border-bottom: 1px solid var(--color-grey-light);
}

.notatki-search input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #555;
    border-radius: 6px;
    font-size: var(--fs-small);
    transition: var(--transition);
}

.notatki-search input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(227, 164, 28, 0.15);
}

.notatki-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-sm);
}

.notatka-item {
    padding: var(--spacing-sm);
    margin-bottom: 8px;
    background: #2a2a2a;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.notatka-item:hover {
    background: #3a3a3a;
    border-left-color: var(--color-primary);
}

.notatka-item.active {
    background: rgba(227, 28, 35, 0.1);
    border: 2px solid var(--color-primary);
    border-left: 3px solid var(--color-primary);
}

.notatka-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.notatka-item-header h3 {
    margin: 0;
    font-size: var(--fs-small);
    color: #ffffff;
    font-weight: 700;
    word-break: break-word;
    flex: 1;
}

.notatka-data {
    font-size: 0.7em;
    color: #999;
    white-space: nowrap;
    margin-left: 8px;
}

.notatka-preview {
    margin: 6px 0;
    font-size: 0.85em;
    color: #b0b0b0;
    line-height: 1.3;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notatka-owner {
    display: inline-block;
    font-size: 0.75em;
    color: #999;
    background: #3a3a3a;
    padding: 2px 6px;
    border-radius: 4px;
}

.notatki-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    text-align: center;
}

.notatki-empty p {
    font-size: var(--fs-h3);
    margin: 0;
}

.notatki-empty small {
    font-size: var(--fs-small);
}

/* Edytor notatki - prawa strona */
.notatki-editor-section {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #2a2a2a;
}

.editor-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.editor-header {
    padding: var(--spacing-md);
    border-bottom: 2px solid var(--color-grey-light);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.notatka-title-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #555;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    font-weight: 700;
    color: #ffffff;
    transition: var(--transition);
}

.notatka-title-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(227, 164, 28, 0.15);
}

.editor-actions {
    display: flex;
    gap: 8px;
}

.btn-save-note,
.btn-delete-note,
.btn-close-note {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: var(--fs-small);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-save-note {
    background: linear-gradient(135deg, var(--color-primary), #9d6e16);
    color: white;
    box-shadow: 0 2px 8px rgba(219, 108, 28, 0.2);
}

.btn-save-note:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(219, 108, 28, 0.3);
}

.btn-delete-note {
    background: #dc3545;
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.btn-delete-note:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-close-note {
    background: #e9ecef;
    color: #e0e0e0;
}

.btn-close-note:hover {
    background: #dee2e6;
}

/* Toolbar */
.editor-toolbar {
    padding: 12px var(--spacing-md);
    border-bottom: 2px solid var(--color-grey-light);
    display: flex;
    gap: 8px;
    align-items: center;
    background: #3a3a3a;
    flex-wrap: wrap;
}

.editor-toolbar button {
    padding: 8px 12px;
    border: 1px solid #555;
    border-radius: 6px;
    background: #2a2a2a;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.editor-toolbar button:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.editor-toolbar input[type="color"] {
    width: 36px;
    height: 36px;
    border: 1px solid #555;
    border-radius: 6px;
    cursor: pointer;
}

.toolbar-separator {
    width: 1px;
    height: 24px;
    background: #ddd;
    margin: 0 4px;
}

/* Editor area */
.notatka-editor {
    flex: 1;
    padding: var(--spacing-lg);
    overflow-y: auto;
    outline: none;
    font-size: 1em;
    line-height: 1.6;
    color: #ffffff;
}

.notatka-editor:focus {
    outline: none;
}

.notatka-editor b,
.notatka-editor strong {
    font-weight: 700;
}

.notatka-editor i,
.notatka-editor em {
    font-style: italic;
}

.notatka-editor u {
    text-decoration: underline;
}

.notatka-editor ul,
.notatka-editor ol {
    margin: 10px 0 10px 20px;
}

.notatka-editor li {
    margin: 5px 0;
}

/* Editor info */
.editor-info {
    padding: var(--spacing-sm) var(--spacing-md);
    border-top: 1px solid var(--color-grey-light);
    background: #3a3a3a;
    color: #b0b0b0;
    font-size: var(--fs-small);
}

/* Editor empty state */
.editor-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    text-align: center;
}

.editor-empty i {
    font-size: 3em;
    margin-bottom: var(--spacing-md);
    color: var(--color-grey-light);
}

.editor-empty h3 {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: var(--fs-h2);
    color: #ffffff;
}

/* Responsive */
@media (max-width: 1023px) {
    .notatki-layout {
        grid-template-columns: 280px 1fr;
    }

    .editor-toolbar {
        gap: 4px;
    }

    .editor-toolbar button {
        min-width: 32px;
        height: 32px;
        padding: 6px 8px;
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .notatki-container {
        padding: var(--spacing-sm);
        height: calc(100vh - 150px);
    }

    .notatki-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .notatki-list-section {
        max-height: 300px;
        border-right: none;
        border-bottom: 2px solid var(--color-grey-light);
    }

    .notatki-header h2 {
        font-size: var(--fs-h3);
    }

    .editor-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .notatka-title-input {
        width: 100%;
    }

    .editor-actions {
        width: 100%;
    }

    .btn-save-note,
    .btn-delete-note,
    .btn-close-note {
        flex: 1;
        padding: 10px 8px;
        font-size: 0.8em;
    }

    .editor-toolbar {
        gap: 4px;
        padding: 8px var(--spacing-sm);
    }

    .editor-toolbar button {
        min-width: 28px;
        height: 28px;
        padding: 4px 6px;
        font-size: 11px;
    }

    .notatka-editor {
        padding: var(--spacing-md);
        font-size: 0.95em;
    }
}

@media (max-width: 479px) {
    .notatka-item-header {
        flex-direction: column;
    }

    .notatka-data {
        margin-left: 0;
        margin-top: 4px;
    }

    .editor-toolbar button {
        min-width: 24px;
        height: 24px;
        padding: 2px 4px;
        font-size: 10px;
    }

    .toolbar-separator {
        height: 20px;
    }

    .btn-save-note,
    .btn-delete-note,
    .btn-close-note {
        padding: 8px 6px;
        font-size: 0.7em;
    }
}
/* Responsive stats */
@media (max-width: 1023px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .stats-section {
        padding: var(--spacing-md);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: var(--spacing-md);
    }

    .stat-icon {
        font-size: 2em;
    }

    .stat-value {
        font-size: var(--fs-h3);
    }
}
/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    height: auto;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--color-dark) 0%, #2a2a2a 100%);
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    font-size: var(--fs-body);
}

/* ===== LOGIN PAGE ===== */
.login-page {
    background: linear-gradient(135deg, var(--color-dark) 0%, #2a2a2a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
}

.login-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
}

.login-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(227, 141, 28, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(227, 141, 28, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    position: relative;
    z-index: 2;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== LOGO SEKCJA ===== */
.login-logo {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 0.6s ease-out;
}

.logo-icon {
    font-size: clamp(2rem, 8vw, 4em);
    margin-bottom: var(--spacing-sm);
    display: inline-block;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-logo h1 {
    font-family: var(--font-display);
    font-size: var(--fs-h1);
    color: var(--color-light);
    margin-bottom: var(--spacing-xs);
    font-weight: 700;
}

.login-logo p {
    color: var(--color-primary);
    font-size: var(--fs-small);
    font-weight: 600;
}

/* ===== FORMULARZ ===== */
.login-form-wrapper {
    background: #2a2a2a;
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out 0.1s both;
    border: 2px solid var(--color-primary);
}

.login-form-wrapper h2 {
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    color: #ffffff;
    margin-bottom: var(--spacing-sm);
}

.login-subtitle {
    color: #e0e0e0;
    margin-bottom: var(--spacing-md);
    font-size: var(--fs-small);
}

/* ===== ERROR MESSAGE ===== */
.error-message {
    background-color: rgba(227, 28, 35, 0.1);
    border-left: 4px solid var(--color-primary);
    padding: var(--spacing-sm);
    border-radius: 6px;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-primary);
    font-weight: 600;
    font-size: var(--fs-small);
    animation: shake 0.3s ease-in-out;
}

.error-message svg {
    flex-shrink: 0;
    color: var(--color-primary);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ===== FORM GROUPS ===== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    font-size: var(--fs-small);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--color-grey);
    border: 2px solid var(--color-grey-light);
    border-radius: 8px;
    transition: var(--transition);
}

.input-wrapper svg {
    position: absolute;
    left: 12px;
    color: #e0e0e0;
    pointer-events: none;
    transition: var(--transition);
    width: 18px;
    height: 18px;
}


.input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #555;
    border-radius: 8px;
    background: #3a3a3a;
    font-size: 1em;
    font-family: var(--font-body);
    color: #e0e0e0;
    outline: none;
    transition: var(--transition);
}

.input-wrapper input::placeholder {
    color: #999;
}

.input-wrapper:focus-within {
    border-color: var(--color-primary);
    background: #2a2a2a;
    box-shadow: 0 0 0 3px rgba(227, 164, 28, 0.15);
}

.input-wrapper:focus-within svg {
    color: var(--color-primary);
}

/* ===== FORM OPTIONS ===== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    font-size: var(--fs-small);
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #e0e0e0;
    transition: var(--transition);
}

.remember-me input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.remember-me:hover {
    color: #ffffff;
}

.forgot-password {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.forgot-password:hover {
    color: #b07d10;
    text-decoration: underline;
}

/* ===== BUTTON LOGIN ===== */
.btn-login {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--color-primary), #9d6e16);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(219, 108, 28, 0.2);
    width: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(219, 108, 28, 0.2);
}

.btn-login:active {
    transform: translateY(0);
}

/* ===== FOOTER LOGOWANIA ===== */
.login-footer {
    text-align: center;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-grey-light);
    color: #e0e0e0;
    font-size: var(--fs-small);
}

.login-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.login-footer a:hover {
    color: #b08b10;
    text-decoration: underline;
}

/* ===== INFO SEKCJA PO PRAWEJ ===== */
.login-info {
    color: var(--color-light);
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.info-card {
    background: rgba(227, 28, 35, 0.08);
    padding: var(--spacing-lg);
    border-radius: 12px;
    border: 1px solid rgba(227, 147, 28, 0.2);
    margin-bottom: var(--spacing-lg);
    backdrop-filter: blur(10px);
}

.info-card h3 {
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.info-card p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.info-features {
    list-style: none;
}

.info-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--fs-small);
}

.highlight-day {
    color: var(--color-primary);
    font-weight: 700;
}

.info-features svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

/* ===== STATS DISPLAY ===== */
.stats-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.stat {
    text-align: center;
    padding: var(--spacing-sm);
    background: rgba(227, 28, 35, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(219, 108, 28, 0.2);
}

.stat-value {
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    color: var(--color-primary);
    font-weight: 700;
}

.stat-label {
    font-size: var(--fs-small);
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
}

/* ===== HEADER ===== */
header {
    background-color: #2a2a2a;
    border-bottom: 3px solid var(--color-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}
/* ===============================
   OGŁOSZENIE - KAFELKA
================================= */

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.announcement-card {
    background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    max-width: 350px;
    width: 100%;
    transition: all 0.3s ease;
    border-left: 5px solid #b88421;
    animation: fadeIn 0.6s ease;
}

.announcement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.announcement-header {
    font-weight: bold;
    color: #b88421;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.announcement-card h3 {
    margin: 10px 0;
    font-size: 20px;
    color: #999999;
}

.announcement-card p {
    font-size: 14px;
    color: #aaaaaa;
    line-height: 1.5;
    margin-bottom: 15px;
}

.announcement-date {
    font-size: 12px;
    color: #aaaaaa;
    text-align: right;
}

/* Animacja */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .hero-content {
        flex-direction: column;
    }

    .announcement-card {
        max-width: 100%;
    }
}

.logo {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 4vw, 1.8em);
    font-weight: 700;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: -1px;
    white-space: nowrap;
}

.logo::before {
    content: "";
    width: 24px;
    height: 24px;
    background: var(--color-primary);
    border-radius: 4px;
    display: inline-block;
    margin-right: 8px;
}

nav {
    flex: 1;
    min-width: 250px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: clamp(1rem, 3vw, 2.2rem);
    align-items: center;
    flex-wrap: wrap;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: var(--fs-small);
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

nav a::before {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition);
}

nav a:hover::before {
    width: 100%;
}

.user-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    border-left: 2px solid var(--color-primary);
    padding-left: var(--spacing-sm);
    white-space: nowrap;
}

.user-name {
    font-weight: 600;
    color: #ffffff;
    font-size: var(--fs-small);
}

.logout-btn {
    background: linear-gradient(135deg, var(--color-primary), #9d6e16);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-size: var(--fs-small);
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(219, 108, 28, 0.2);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(219, 108, 28, 0.3);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--color-dark) 0%, #2a2a2a 100%);
    color: var(--color-light);
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(20px); }
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.hero-text h1 {
    font-family: var(--font-display);
    font-size: var(--fs-h1);
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
    animation: fadeInUp 0.6s ease-out;
}

.hero-text p {
    font-size: clamp(1rem, 2.5vw, 1.15em);
    opacity: 0.95;
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-sm);
    animation: fadeInUp 0.6s ease-out 0.2s both;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: var(--fs-body);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #9d6e16);
    color: white;
    box-shadow: 0 4px 12px rgba(219, 108, 28, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(219, 108, 28, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--color-primary), #9d6e16);
    color: white;
    transform: translateY(-3px);
}

.stats-mini {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.stat-item {
    background: rgba(104, 54, 13, 0.3);
    padding: var(--spacing-md);
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
}

.stat-number {
    font-size: var(--fs-h2);
    font-weight: 700;
    color: var(--color-primary);
}

.stat-label {
    font-size: var(--fs-small);
    opacity: 0.8;
    margin-top: 5px;
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.hero-visual {
    width: 100%;
    min-height: 300px;
    background: linear-gradient(135deg, var(--color-dark) 0%, #2a2a2a 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(3rem, 10vw, 5em);
    animation: scaleIn 0.6s ease-out 0.3s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== MAIN CONTENT ===== */
main {
    max-width: 1400px;
    margin: 0 auto;
    border-radius: 12px;
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    margin-bottom: var(--spacing-sm);
    color: #999999;
}

.section-subtitle {
    color: #b0b0b0;
    margin-bottom: var(--spacing-lg);
    font-size: clamp(0.95rem, 2vw, 1.1em);
}

/* ===== REGIONS SECTION ===== */
.regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.region-card {
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    border-top: 3px solid var(--color-primary);
    position: relative;
    overflow: hidden;
    color: #e0e0e0;
}

.region-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.region-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.region-card:hover::before {
    opacity: 0.05;
}

.region-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.region-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary), #9d6e16);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2em;
    flex-shrink: 0;
}

.region-name {
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    color: #999999;
    font-weight: 700;
}

.region-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
    padding: var(--spacing-sm) 0;
    border-top: 1px solid var(--color-grey-light);
    border-bottom: 1px solid var(--color-grey-light);
}

.region-stat {
    text-align: center;
}

.region-stat-value {
    font-size: var(--fs-h3);
    font-weight: 700;
    color: var(--color-primary);
}

.region-stat-label {
    font-size: var(--fs-small);
    color: #999;
    margin-top: 5px;
}

.region-action {
    margin-top: var(--spacing-md);
}

.region-action a {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary), #9d6e16);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: var(--fs-small);
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(219, 108, 28, 0.2);
}

.region-action a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(219, 108, 28, 0.3);
}

/* ===== MAP SECTION ===== */
.map-section {
    background: #2a2a2a;
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: var(--spacing-xl);
}
.shoutbox {
    background: #2a2a2a;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 300px;
    max-height: 100%;
}

.shoutbox h3 {
    margin: 0 0 10px;
    font-size: 1.2em;
}

.shoutbox-messages {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    margin-bottom: 10px;
    background: #2a2a2a;
    font-size: 0.95em;
}

.shoutbox-messages .message {
    margin-bottom: 8px;
}

.shoutbox-messages .message span.username {
    font-weight: bold;
    color: #b88421;
}

.shoutbox-messages .message span.text {
    margin-left: 5px;
    color: #e0e0e0;
}

#shoutboxForm {
    display: flex;
    gap: 5px;
}

#shoutboxInput {
    flex: 1;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #555;
}

#shoutboxForm button {
    padding: 6px 12px;
    border: none;
    background: #b88421;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    color: white;
}

#shoutboxForm button:hover {
    background: #9d6e16;
}

.map-section h2,
.map-section h3 {
    font-family: var(--font-display);
    margin-bottom: var(--spacing-md);
}

#map,
#mapContainer,
#formMapContainer {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--color-grey-light);
}

#map {
    height: 500px;
}

#mapContainer {
    height: clamp(250px, 50vh, 500px);
}

#formMapContainer {
    height: 300px;
}

/* ===== FEATURES SECTION ===== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.feature {
    text-align: center;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    color: #e0e0e0;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(219, 108, 28, 0.2);
}

.feature-icon {
    font-size: clamp(2rem, 5vw, 3em);
    margin-bottom: var(--spacing-md);
}

.feature-title {
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    margin-bottom: var(--spacing-sm);
    color: #999999;
}

.feature-text {
    color: #b0b0b0;
    line-height: 1.6;
}

/* ===== FOOTER ===== */
footer {
    background-color: rgba(26, 26, 26, 0.6);
    color: var(--color-light);
    padding: var(--spacing-xl) var(--spacing-md);
    border-top: 3px solid var(--color-primary);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    font-family: var(--font-display);
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

.footer-section a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 8px;
    font-size: var(--fs-small);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(227, 28, 35, 0.12);
    padding-top: var(--spacing-md);
    text-align: center;
    color: #999;
    max-width: 1400px;
    margin: 0 auto;
    font-size: var(--fs-small);
}

/* ===== REGIONY PAGE STYLES ===== */
.container {
    max-width: 1400px;
    margin: var(--spacing-lg) auto;
    padding: var(--spacing-md);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.top-bar h2 {
    margin: 0;
    font-size: var(--fs-h2);
    color: #ffffff;
    font-family: var(--font-display);
    min-width: 200px;
}

.btn-add {
    background: linear-gradient(135deg, var(--color-primary), #9d6e16);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    color: white;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(219, 108, 28, 0.2);
    font-size: var(--fs-small);
}

.btn-add:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(219, 108, 28, 0.3);
}

.btn-add:active {
    transform: translateY(-1px);
}

/* ===== SEARCH BOX ===== */
.search-box {
    margin-bottom: var(--spacing-md);
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex-wrap: wrap;
    background: #3a3a3a;
    padding: var(--spacing-md);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.search-box label {
    font-weight: 600;
    color: #e0e0e0;
    white-space: nowrap;
    font-size: var(--fs-small);
}

.search-box input[type="text"] {
    padding: 10px 15px;
    border: 2px solid #555;
    border-radius: 6px;
    font-size: var(--fs-body);
    flex: 1;
    min-width: 200px;
    transition: var(--transition);
    background: #2a2a2a;
    color: #e0e0e0;
}

.search-box input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(227, 164, 28, 0.15);
}

/* ===== TABLE ===== */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: var(--spacing-md);
    background: #2a2a2a;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(219, 108, 28, 0.2);
    overflow: hidden;
}
.employee-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.employee-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 15px 0;
    border: 3px solid #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 215, 0, 0.1);
}

.employee-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #2a2a2a;
    min-width: 400px;
}

thead {
    background: linear-gradient(135deg, #b88421 0%, #9d6e16 100%);
    color: white;
}

th {
    padding: clamp(12px, 2vw, 18px) clamp(10px, 2vw, 20px);
    text-align: left;
    font-weight: 700;
    color: white;
    font-size: var(--fs-small);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

th:first-child {
    border-radius: 14px 0 0 0;
}

th:last-child {
    border-radius: 0 14px 0 0;
}

td {
    padding: clamp(10px, 2vw, 16px) clamp(10px, 2vw, 20px);
    border-bottom: 1px solid #3a3a3a;
    font-size: var(--fs-small);
    word-wrap: break-word;
    color: #e0e0e0;
}

tbody tr {
    transition: var(--transition);
    background: #2a2a2a;
}

tbody tr:nth-child(even) {
    background-color: rgba(219, 108, 28, 0.08);
}

tbody tr:hover {
    background-color: rgba(219, 108, 28, 0.15);
    transform: scale(1.02);
    box-shadow: inset 0 0 10px rgba(219, 108, 28, 0.1);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:last-child td:first-child {
    border-radius: 0 0 0 14px;
}

tbody tr:last-child td:last-child {
    border-radius: 0 0 14px 0;
}

/* ===== DODATKOWE STYLE DLA MODALU W REGIONY.PHP ===== */

/* Przycisk Anuluj */
.btn-cancel {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 13px 30px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1em;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.btn-cancel:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.3);
    background: linear-gradient(135deg, #c82333, #bd2130);
}

.btn-cancel:active {
    transform: translateY(-1px);
}

/* Responsive dla przycisków w modal'u */
@media (max-width: 767px) {
    .btn-save,
    .btn-cancel {
        padding: 11px 20px;
        font-size: 0.95em;
    }
    
    #formMapContainer {
        height: 250px !important;
    }
}

@media (max-width: 479px) {
    .btn-save,
    .btn-cancel {
        padding: 10px 16px;
        font-size: 0.9em;
    }
    
    #formMapContainer {
        height: 200px !important;
    }
}

/* Animacja wejścia modal'u */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal.active .modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

/* Hover effect na przycisk dodaj */
.btn-add:active {
    transform: translateY(-1px);
}

/* Form styling w modal'u */
.modal-content form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.modal-content .form-group {
    margin-bottom: 0; /* Już jest gap */
}

.modal-content input[type="text"],
.modal-content input[type="date"] {
    font-size: 16px; /* Accessibility - avoid zoom on iOS */
}

/* Poprawka na wysoki modal gdy mapa się pokazuje */
.modal.active {
    overflow-y: auto;
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
}

.modal-content {
    margin: auto var(--spacing-md);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: var(--spacing-lg) 0;
    flex-wrap: wrap;
    background: #2a2a2a;
    padding: var(--spacing-md);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pagination-numbers {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 14px;
    border: 2px solid #555;
    border-radius: 6px;
    text-decoration: none;
    color: #e0e0e0;
    background-color: #2a2a2a;
    cursor: pointer;
    transition: var(--transition);
    font-size: var(--fs-small);
    font-weight: 600;
    white-space: nowrap;
}

.pagination-btn:hover {
    background: linear-gradient(135deg, var(--color-primary), #9d6e16);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--color-primary), #9d6e16);
    color: white;
    border-color: var(--color-primary);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(219, 108, 28, 0.2);
}

.pagination-dots {
    color: #999;
    padding: 0 5px;
    font-weight: bold;
}

/* ===== MODAL POPUP ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    backdrop-filter: blur(4px);
    padding: var(--spacing-sm);
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--spacing-sm);
    overflow: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #2a2a2a;
    padding: var(--spacing-lg);
    border-radius: 16px;
    max-width: 550px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
    margin-top: var(--spacing-md);
    border: 2px solid var(--color-primary);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 50%;
}

.close-btn:hover {
    color: #ffffff;
    background: rgba(227, 28, 35, 0.1);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    font-size: var(--fs-h2);
    color: #999999;
    font-family: var(--font-display);
}

/* ===== HAMBURGER MENU STYLES ===== */

/* Hamburger button */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    gap: 5px;
    z-index: 999;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #b88421;
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #b88421;
    border-bottom: 3px solid var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 998;
    padding: 0;
}

.mobile-menu.active {
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu a {
    color: #ffffff;
    text-decoration: none;
    padding: 12px 20px;
    border-bottom: 1px solid var(--color-grey-light);
    font-weight: 600;
    transition: var(--transition);
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a:hover {
    background: var(--color-grey);
    color: var(--color-primary);
}

/* ===== RESPONSIVE HEADER ===== */

@media (max-width: 767px) {
    header {
        position: relative;
    }
    
    .header-wrapper {
        padding: var(--spacing-sm);
        flex-wrap: nowrap;
        gap: 0;
        justify-content: space-between;
    }
    
    .logo {
        font-size: clamp(1rem, 4vw, 1.4rem);
        order: 1;
        flex: 1;
    }
    
    .hamburger {
        display: flex;
        order: 2;
    }
    
    nav {
        width: 100%;
        order: 3;
        margin-top: 0;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2a2a2a;
        border-bottom: 3px solid var(--color-primary);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        padding: 0;
        margin: 0;
        z-index: 998;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav li {
        border-bottom: 1px solid var(--color-grey-light);
        width: 100%;
    }
    
    nav li:last-child {
        border-bottom: none;
    }
    
    nav a {
        display: block;
        padding: 12px 20px;
        color: #ffffff;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.95em;
    }
    
    nav a:hover {
        background: var(--color-grey);
        color: var(--color-primary);
    }
    
    nav a::before {
        display: none;
    }
    
    .user-section {
        width: 100%;
        order: 4;
        border-left: none;
        border-top: 2px solid var(--color-primary);
        padding-left: 0;
        padding-top: var(--spacing-sm);
        margin-top: var(--spacing-sm);
        gap: var(--spacing-sm);
        justify-content: space-between;
        align-items: center;
    }
    
    .user-name {
        font-size: var(--fs-small);
        flex: 1;
    }
    
    .logout-btn {
        padding: 8px 12px;
        font-size: 0.75em;
    }
}

@media (max-width: 479px) {
    .header-wrapper {
        padding: 10px 12px;
    }
    
    .logo {
        font-size: clamp(0.9rem, 3vw, 1.2rem);
    }
    
    .hamburger span {
        width: 22px;
        height: 2.5px;
    }
    
    nav a {
        padding: 10px 16px;
        font-size: 0.85em;
    }
    
    .user-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .user-name {
        width: 100%;
        text-align: left;
    }
    
    .logout-btn {
        width: 100%;
        padding: 10px;
        font-size: 0.7em;
    }
}

/* ===== FORM ===== */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #e0e0e0;
    font-size: var(--fs-small);
}

.form-group p {
    margin: 8px 0;
    color: #b0b0b0;
    font-size: var(--fs-small);
}

input[type="text"],
input[type="date"] {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #555;
    border-radius: 8px;
    font-size: 1em;
    font-family: var(--font-body);
    transition: var(--transition);
    background: #3a3a3a;
    color: #e0e0e0;
}

input[type="text"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(227, 164, 28, 0.15);
}

#formMapContainer {
    width: 100%;
    height: 300px;
    border-radius: 10px;
    border: 2px solid #555;
    margin-bottom: var(--spacing-md);
    overflow: hidden;
}

#coordsDisplay {
    color: #999;
    font-size: var(--fs-small);
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: #3a3a3a;
    border-radius: 6px;
    border-left: 3px solid var(--color-primary);
}

.btn-save {
    background: linear-gradient(135deg, var(--color-primary), #9d6e16);
    padding: 13px 30px;
    border-radius: 8px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 1em;
    transition: var(--transition);
    width: 100%;
    color: white;
    box-shadow: 0 4px 12px rgba(219, 108, 28, 0.2);
}

.btn-save:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(219, 108, 28, 0.3);
}

.btn-save:active {
    transform: translateY(-1px);
}

.form-box {
    display: none;
    background: #2a2a2a;
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    margin: var(--spacing-lg) 0;
}

.form-box.active {
    display: block;
}

.form-box h3 {
    font-size: var(--fs-h3);
    margin-bottom: var(--spacing-md);
    color: #ffffff;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Screens (1024px and up) */
@media (min-width: 1024px) {
    .login-container {
        grid-template-columns: 1fr 1fr;
    }

    .hero-content {
        grid-template-columns: 1fr 1fr;
    }

    .regions-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .features {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets (768px to 1023px) */
@media (max-width: 1023px) {
    .login-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        max-width: 500px;
        margin: 0 auto;
    }

    .header-wrapper {
        padding: var(--spacing-sm) var(--spacing-md);
        gap: var(--spacing-md);
    }

    nav {
        width: 100%;
        order: 3;
    }

    nav ul {
        width: 100%;
        gap: 1rem;
        justify-content: flex-start;
    }

    .user-section {
        width: 100%;
        border-left: none;
        border-top: 2px solid var(--color-primary);
        padding-left: 0;
        padding-top: var(--spacing-sm);
        gap: var(--spacing-sm);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .regions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
    }

    #map,
    #mapContainer {
        height: 400px;
    }

    .top-bar {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: stretch;
    }

    .top-bar h2 {
        font-size: var(--fs-h2);
    }

    .btn-add {
        width: 100%;
        text-align: center;
    }

    .search-box {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .search-box label {
        width: 100%;
    }

    .search-box input[type="text"] {
        width: 100%;
        min-width: auto;
    }

    .modal-content {
        max-width: 90%;
        padding: var(--spacing-md);
    }

    #formMapContainer {
        height: 250px;
    }
}

/* Small Phones (480px to 767px) */
@media (max-width: 767px) {
    :root {
        --spacing-lg: clamp(1.5rem, 4vw, 2rem);
        --spacing-xl: clamp(1.5rem, 4vw, 2.5rem);
    }

    .login-page {
        padding: var(--spacing-md);
    }

    .login-form-wrapper {
        padding: var(--spacing-md);
    }

    .header-wrapper {
        padding: var(--spacing-sm);
        flex-direction: column;
        align-items: stretch;
    }

    .logo {
        text-align: center;
        width: 100%;
    }

    nav {
        width: 100%;
        order: 3;
    }

    nav ul {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: var(--spacing-sm) 0;
    }

    nav a {
        font-size: 0.8em;
    }

    .user-section {
        width: 100%;
        border: none;
        border-top: 2px solid var(--color-primary);
        padding: var(--spacing-sm) 0 0 0;
        justify-content: space-between;
    }

    .hero {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: var(--fs-h1);
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 12px 20px;
    }

    .stats-mini {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    main {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .regions-grid {
        grid-template-columns: 1fr;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: var(--fs-h2);
    }

    #map,
    #mapContainer {
        height: 300px;
    }

    .table-wrapper {
        margin-bottom: var(--spacing-md);
    }

    table {
        font-size: 0.85em;
        min-width: auto;
    }

    th {
        padding: 10px 8px;
        font-size: 0.75em;
    }

    td {
        padding: 8px 8px;
        font-size: 0.85em;
    }

    .pagination {
        gap: 4px;
        padding: var(--spacing-sm);
    }

    .pagination-btn {
        padding: 8px 10px;
        font-size: 0.7em;
    }

    .modal-content {
        max-width: 95%;
        padding: var(--spacing-md);
    }

    #formMapContainer {
        height: 200px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .form-box {
        padding: var(--spacing-md);
    }
}

/* Extra Small Phones (320px to 479px) */
@media (max-width: 479px) {
    :root {
        --spacing-md: clamp(1rem, 3vw, 1.5rem);
        --spacing-lg: clamp(1rem, 3vw, 1.5rem);
        --spacing-xl: clamp(1rem, 3vw, 1.5rem);
    }

    html {
        font-size: 14px;
    }

    .login-page {
        padding: var(--spacing-sm);
    }

    .login-container {
        gap: var(--spacing-md);
    }

    .login-form-wrapper {
        padding: var(--spacing-md);
        border-radius: 8px;
    }

    .logo-icon {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .login-logo h1 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .header-wrapper {
        padding: 8px 12px;
        gap: 8px;
    }

    .logo {
        font-size: 1.1em;
    }

    .logo::before {
        width: 20px;
        height: 20px;
        margin-right: 6px;
    }

    nav ul {
        gap: 0.5rem;
    }

    nav a {
        font-size: 0.65em;
        padding: 4px 6px;
    }

    .user-section {
        gap: 6px;
        padding-top: 6px;
    }

    .user-name {
        font-size: 0.65em;
    }

    .logout-btn {
        padding: 6px 10px;
        font-size: 0.6em;
    }

    .hero {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .stats-mini {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .stat-item {
        padding: var(--spacing-sm);
    }

    main {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .region-card {
        padding: var(--spacing-md);
    }

    .region-header {
        gap: 8px;
        margin-bottom: 10px;
    }

    .region-icon {
        width: 32px;
        height: 32px;
        font-size: 1em;
    }

    .region-name {
        font-size: clamp(1rem, 4vw, 1.3em);
    }

    .feature {
        padding: var(--spacing-md);
    }

    .feature-icon {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }

    .top-bar {
        gap: 8px;
    }

    .top-bar h2 {
        font-size: clamp(1.1rem, 4vw, 1.5rem);
    }

    .btn-add {
        padding: 10px 16px;
        font-size: 0.8em;
    }

    .search-box {
        padding: 10px 12px;
        gap: 6px;
    }

    table {
        font-size: 0.75em;
        min-width: 300px;
    }

    th, td {
        padding: 6px 4px;
    }

    .modal-content {
        padding: var(--spacing-md);
        border-radius: 12px;
    }

    .close-btn {
        right: 8px;
        top: 8px;
        font-size: 24px;
        width: 32px;
        height: 32px;
    }

    #map,
    #mapContainer {
        height: 250px;
    }

    #formMapContainer {
        height: 150px;
    }

    .pagination-btn {
        padding: 6px 8px;
        font-size: 0.6em;
    }

    .pagination {
        gap: 2px;
        padding: 10px;
    }

    footer {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .footer-section h3 {
        font-size: 0.9em;
        margin-bottom: 8px;
    }

    .footer-section a {
        font-size: 0.8em;
        margin-bottom: 6px;
    }
}

/* ══════════════════════════════════════
   SHOUTBOX
══════════════════════════════════════ */
.shoutbox-wrap {
    max-width: 1400px;
    margin: 0 auto var(--spacing-md) auto;
    padding: 0 var(--spacing-md);
}
.shoutbox-box {
    background: #222;
    border: 1px solid #333;
    border-radius: 14px;
    padding: 16px 18px;
}
.shoutbox-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.shoutbox-head h3 {
    font-family: var(--font-display);
    font-size: 0.95em;
    color: #fff;
    margin: 0;
    flex: 1;
}
.shoutbox-badge {
    font-size: 0.72em;
    color: #4caf82;
    background: rgba(76,175,130,0.12);
    border: 1px solid rgba(76,175,130,0.3);
    border-radius: 20px;
    padding: 3px 10px;
}
.shoutbox-msgs {
    height: 190px;
    overflow-y: auto;
    padding: 4px 2px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    scrollbar-width: thin;
    scrollbar-color: #3a3a3a transparent;
}
.shout-row {
    display: flex;
    gap: 8px;
    align-items: baseline;
    font-size: 0.84em;
}
.shout-who {
    font-weight: 700;
    color: #b88421;
    white-space: nowrap;
    min-width: 80px;
}
.shout-who.is-me { color: #4caf82; }
.shout-ts {
    color: #444;
    font-size: 0.82em;
    white-space: nowrap;
}
.shout-txt {
    color: #ccc;
    flex: 1;
    word-break: break-word;
    line-height: 1.4;
}
.shout-empty {
    color: #555;
    font-size: 0.82em;
    text-align: center;
    padding: 30px 0;
    font-style: italic;
}
.shoutbox-form {
    display: flex;
    gap: 8px;
}
.shoutbox-form input {
    flex: 1;
    background: #333;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 9px 14px;
    color: #e0e0e0;
    font-family: var(--font-body);
    font-size: 0.9em;
    outline: none;
    transition: border-color 0.18s;
}
.shoutbox-form input:focus { border-color: #b88421; }
.shoutbox-form input::placeholder { color: #555; }
.shoutbox-form button {
    background: linear-gradient(135deg, #b88421, #9d6e16);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 20px;
    font-weight: 700;
    font-size: 0.88em;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.18s;
}
.shoutbox-form button:hover { opacity: 0.85; }

/* ══════════════════════════════════════
   OGŁOSZENIA (index2 + forum sidebar)
══════════════════════════════════════ */
.ogl-section {
    max-width: 1400px;
    margin: 0 auto var(--spacing-md) auto;
    padding: 0 var(--spacing-md);
}
.ogl-section-title {
    font-family: var(--font-display);
    font-size: 1em;
    color: #b88421;
    margin-bottom: 10px;
}
.ogl-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.ogl-card {
    background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
    border: 1px solid rgba(184,132,33,0.25);
    border-left: 4px solid #b88421;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.18s, box-shadow 0.18s;
}
.ogl-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.25); }
.ogl-card-label {
    font-size: 0.68em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #b88421;
}
.ogl-card-title {
    font-family: var(--font-display);
    font-size: 0.95em;
    color: #fff;
}
.ogl-card-preview {
    font-size: 0.83em;
    color: #aaa;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ogl-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}
.ogl-card-date { font-size: 0.72em; color: #666; }
.btn-czytaj {
    background: transparent;
    border: 1px solid rgba(184,132,33,0.45);
    color: #b88421;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.78em;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s;
}
.btn-czytaj:hover { background: rgba(184,132,33,0.14); }

/* sidebar forum - kompaktowe */
.forum-sidebar .ogl-card {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
    gap: 3px;
}
.forum-sidebar .ogl-card-title {
    font-size: 0.8em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.forum-sidebar .ogl-card-preview {
    font-size: 0.74em;
    -webkit-line-clamp: 2;
    color: #888;
}
.forum-sidebar .ogl-card-date { font-size: 0.65em; }
.forum-sidebar .btn-czytaj {
    padding: 2px 7px;
    font-size: 0.65em;
}

/* ══════════════════════════════════════
   MODAL OGŁOSZENIE
══════════════════════════════════════ */
.modal-ogl {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.78);
    z-index: 10000;
    padding: 24px 16px;
    overflow-y: auto;
}
.modal-ogl.open { display: flex; align-items: flex-start; justify-content: center; }
.modal-ogl-content {
    background: #1e1e1e;
    border: 2px solid rgba(184,132,33,0.4);
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    padding: 28px 30px;
    position: relative;
    margin-top: 20px;
    animation: ogl-fade 0.22s ease;
}
@keyframes ogl-fade {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.modal-ogl-close {
    position: absolute;
    top: 14px; right: 18px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.6em;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
}
.modal-ogl-close:hover { color: #fff; }
.modal-ogl-label {
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #b88421;
    margin-bottom: 6px;
}
.user-dropdown { position: relative; }
.user-dropdown-btn {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; color: #e0e0e0;
    padding: 8px 14px; cursor: pointer;
    font-size: 0.88em; font-family: var(--font-body);
    transition: background 0.18s, border-color 0.18s; white-space: nowrap;
}
.user-dropdown-btn:hover { background: rgba(184,132,33,0.18); border-color: rgba(184,132,33,0.4); }
.user-dropdown-btn .fa-user { color: #b88421; }
.user-dropdown-arrow { font-size: 0.72em; color: #888; transition: transform 0.22s; }
.user-dropdown-arrow.open { transform: rotate(180deg); }
.user-dropdown-menu {
    display: none; position: absolute;
    top: calc(100% + 8px); right: 0;
    background: #1e1e1e; border: 1px solid #333;
    border-radius: 12px; min-width: 200px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    z-index: 9999; overflow: hidden;
    animation: dropdown-fade 0.18s ease;
}
.user-dropdown-menu.open { display: block; }
@keyframes dropdown-fade {
    from { opacity:0; transform:translateY(-8px); }
    to   { opacity:1; transform:translateY(0); }
}
.user-dropdown-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px 10px; color: #fff;
    font-weight: 700; font-size: 0.88em;
    border-bottom: 1px solid #2a2a2a;
}
.user-dropdown-header .fa-user-circle { color: #b88421; font-size: 1.4em; }
.user-dropdown-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 11px 16px; color: #ccc;
    font-size: 0.86em; font-family: var(--font-body);
    background: transparent; border: none;
    text-decoration: none; cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: left; box-sizing: border-box;
}
.user-dropdown-item:hover { background: #2a2a2a; color: #fff; }
.user-dropdown-item i { width: 16px; color: #b88421; text-align: center; }
.user-dropdown-divider { height: 1px; background: #2a2a2a; margin: 4px 0; }
.user-dropdown-logout { color: #e55 !important; }
.user-dropdown-logout i { color: #e55 !important; }
.user-dropdown-logout:hover { background: rgba(229,85,85,0.1) !important; }
.modal-ogl-title {
    font-family: var(--font-display);
    font-size: 1.25em;
    color: #fff;
    margin-bottom: 4px;
}
.modal-ogl-meta {
    font-size: 0.75em;
    color: #666;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #333;
}
.modal-ogl-body {
    font-size: 0.9em;
    color: #ccc;
    line-height: 1.75;
    white-space: pre-wrap;
}

.shout-admin-badge {
    color: #e55;
    font-weight: 900;
    font-size: 0.8em;
    flex-shrink: 0;
}
/* Ultra Small (320px) */
@media (max-width: 320px) {
    html {
        font-size: 13px;
    }

    .logo::before {
        width: 18px;
        height: 18px;
        margin-right: 4px;
    }

    nav ul {
        gap: 0.25rem;
    }

    nav a {
        font-size: 0.6em;
    }

    .header-wrapper {
        padding: 6px 10px;
    }

    table {
        font-size: 0.7em;
        min-width: 280px;
    }

    #map,
    #mapContainer {
        height: 200px;
    }

    #formMapContainer {
        height: 120px;
    }
}