
body {
    margin:0;
    background:#0f0f0f;
    color:#fff;
    font-family:Arial;
}

/* =========================
CONTAINER
========================= */

.container {
    max-width:520px;
    margin:auto;
    padding:20px;
}

/* =========================
INPUTS
========================= */

input, select {
    width:100%;
    padding:12px;
    margin:6px 0;
    border-radius:10px;
    border:1px solid #333;
    background:#1a1a1a;
    color:#fff;
}

/* =========================
BUTTONS
========================= */

button {
    padding:12px;
    border-radius:10px;
    border:none;
    cursor:pointer;
}

.primary-btn {
    background:linear-gradient(135deg,#ff7a00,#ffb347);
    color:#000;
    font-weight:bold;
}

/* =========================
ADMIN LAYOUT
========================= */

.admin-container {
    max-width:1400px;
}

.stats-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
    gap:15px;
    margin-bottom:30px;
}

.stat-card {
    background:#1a1a1a;
    padding:20px;
    border-radius:14px;
    text-align:center;
}

.stat-card h2 {
    margin:0;
    font-size:34px;
}

.stat-sum {
    margin-top:10px;
    font-size:22px;
    font-weight:bold;
}

.paid { border:2px solid #0f9d58; }
.unpaid { border:2px solid #ff9800; }
.reserve { border:2px solid #3f51b5; }

/* =========================
TABLE
========================= */

.table-wrapper {
    overflow-x:auto;
    background:#1a1a1a;
    border-radius:14px;
}

.admin-table {
    width:100%;
    border-collapse:collapse;
    min-width:1300px;
}

.admin-table th {
    background:#222;
    padding:14px;
    text-align:left;
}

.admin-table td {
    padding:12px;
    border-bottom:1px solid #333;
    vertical-align:top;
    white-space:nowrap;
}

/* =========================
CHIPS (KOSZULKI)
========================= */

.shirt-item {
    display:inline-block;
    background:#2a2a2a;
    padding:4px 8px;
    margin:2px;
    border-radius:8px;
    font-size:12px;
}

/* =========================
STATUS
========================= */

.status-select {
    border:none;
    border-radius:8px;
    padding:8px;
    font-weight:bold;
}

.status-opłacony {
    background:#0f9d58;
    color:#fff;
}

.status-nieopłacony {
    background:#ff9800;
    color:#000;
}

.status-rezerwowa {
    background:#3f51b5;
    color:#fff;
}

/* =========================
CATEGORY
========================= */

.category-select {
    border:none;
    border-radius:8px;
    padding:8px;
    font-weight:bold;
}

.cat-old {
    background:#ff9800;
    color:#000;
}

.cat-young {
    background:#00c853;
    color:#fff;
}

/* =========================
DELETE
========================= */

.delete-x {
    background:red;
    color:#fff;
    border:none;
    padding:6px 10px;
    border-radius:6px;
    cursor:pointer;
}

/* =========================
RESPONSIVE
========================= */

@media(max-width:768px){
    .stats-grid {
        grid-template-columns:1fr;
    }
}
/* =========================
COMPACT ADMIN TABLE FIX
========================= */

.admin-table {
    width:100%;
    border-collapse:collapse;
    font-size:12px;
}

.admin-table th,
.admin-table td {
    padding:8px 6px;
    border-bottom:1px solid #333;
    vertical-align:top;
}

/* pozwala zawijać zamiast scrolla */
.admin-table td {
    white-space:normal;
    word-break:break-word;
}

/* ograniczenia szerokości kolumn */
.admin-table td:nth-child(2),
.admin-table td:nth-child(5),
.admin-table td:nth-child(6) {
    font-size:11px;
}

/* auto shrink table wrapper */
.table-wrapper {
    overflow-x:hidden;
}

/* chips mniejsze */
.shirt-item {
    font-size:11px;
    padding:3px 6px;
}

/* ACTION BUTTONS */
.edit-btn {
    background:#444;
    color:#fff;
    border:none;
    padding:5px 8px;
    border-radius:6px;
    cursor:pointer;
    font-size:11px;
    margin:2px 0;
}

.edit-btn:hover {
    background:#666;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    z-index: 99999;
}


/* =========================
ADMIN MENU
========================= */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
}

.admin-menu {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-btn {
    background: #222;
    color: #fff;
    padding: 10px 15px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.admin-btn:hover {
    background: #333;
}

.logout {
    background: #8b0000;
}

.logout:hover {
    background: #a00000;
}

@media(max-width: 768px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-menu {
        justify-content: flex-start;
    }
}
/* ACTIVE STATE */
.modal.active {
    display: flex;
}

/* 🔥 KONTENER - PREMIUM */
.modal-content {
    background: #141414;
    color: #fff;
    padding: 28px;
    border-radius: 18px;
    width: 520px;
    max-width: 95%;
    border: 1px solid #2a2a2a;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    animation: modalIn 0.25s ease-out;
}

/* ANIMACJA */
@keyframes modalIn {
    from {
        transform: translateY(20px) scale(0.98);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}
/* =========================
MODAL EDYCJI GADŻETÓW
========================= */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(5px);
    z-index: 99999;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #141414;
    color: #fff;
    padding: 28px;
    border-radius: 18px;
    width: 520px;
    max-width: 95%;
    border: 1px solid #2a2a2a;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.modal-content h3 {
    margin-top: 0;
}

.edit-shirt-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.edit-shirt-row select {
    flex: 1;
}

.edit-shirt-row button {
    background: #8b0000;
    color: #fff;
}

.chip {
    display: inline-block;
    background: #2a2a2a;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 8px;
    font-size: 12px;
}

.edit-btn {
    margin-top: 6px;
    background: #333;
    color: #fff;
    padding: 6px 10px;
    font-size: 12px;
}

.edit-btn:hover {
    background: #444;
}

.page-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.action-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff7a00, #ffb347);
    color: #111;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(255, 122, 0, 0.22);
    transition: transform .18s ease, box-shadow .18s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 38px rgba(255, 122, 0, 0.34);
}

.action-icon {
    font-size: 28px;
    line-height: 1;
}

.action-card small {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 500;
    opacity: .75;
}

@media(max-width:768px) {
    .page-actions {
        justify-content: stretch;
    }

    .action-card {
        width: 100%;
        justify-content: center;
    }
}

/* =========================
KOSZULKI - 1 LINIA
========================= */

.shirt-row {
    display: grid;
    grid-template-columns: 45% 45% 40px;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.shirt-row select {
    width: 100%;
    margin: 0;
}

.shirt-row .remove {
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border-radius: 10px;
    background: #eee;
    color: #000;
}

/* przycisk dodawania koszulki */
#shirts + button {
    width: auto;
    display: inline-block;
    margin-top: 4px;
    padding: 10px 14px;
}

/* mniejsza informacja */
.info {
    font-size: 12px;
    line-height: 1.4;
    color: #aaa;
    margin-top: 8px;
    margin-bottom: 18px;
}

@media (max-width: 420px) {
    .shirt-row {
        grid-template-columns: 1fr 1fr 38px;
        gap: 6px;
    }

    .shirt-row .remove {
        width: 38px;
        height: 38px;
    }
}

/* OVERLAY FORMULARZA */
#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

#overlay.active {
    display: flex;
}

#overlay .modal {
    display: block;
    position: static;
    width: 90%;
    max-width: 520px;
    height: auto;
    background: #fff;
    color: #111;
    padding: 25px;
    border-radius: 16px;
}

#summary p{
	padding: 0;
	font-size: 13px;
	margin: 5px;
}