:root{--bg:#f5f7fa;--card:#ffffff;--muted:#6b7280;--accent:#2563EB;--accent-strong:#1D4ED8;--radius:12px;--shadow:0 8px 24px rgba(16,24,40,0.06);
--ann-bg:#FFF7ED;--ann-border:#F59E0B;--ann-text:#92400E;}
*{box-sizing:border-box;font-family:'Poppins',system-ui,-apple-system,Segoe UI,Roboto,'Helvetica Neue',Arial;}
body{margin:0;background:var(--bg);color:#0f172a;}
.app-shell{display:flex;min-height:100vh;}
.sidebar{width:260px;background:linear-gradient(180deg,#fff,#f8fafc);border-right:1px solid #e6eef8;padding:28px 20px;display:flex;flex-direction:column;gap:18px;}
.brand{display:flex;align-items:center;gap:12px;padding-bottom:8px;border-bottom:1px solid #eef3fb;}
.brand-icon{font-size:28px;}
.brand-text{font-weight:700;color:var(--accent);font-size:20px;}
.nav{display:flex;flex-direction:column;gap:8px;margin-top:12px;}
.nav-item{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:10px;color:#0f172a;text-decoration:none;font-weight:500;}
.nav-item i{width:18px;text-align:center;color:var(--accent);}
.nav-item:hover{background:#eef6ff;color:var(--accent);}
.sidebar-foot{margin-top:auto;color:var(--muted);font-size:13px;}
.main{flex:1;padding:26px;display:flex;flex-direction:column;gap:18px;}
.topbar{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:transparent;}
.greet{color:#374151;font-size:16px;}
.btn{display:inline-block;padding:8px 12px;border-radius:10px;border:none;background:var(--accent);color:white;text-decoration:none;font-weight:600;cursor:pointer;}
.btn.small{padding:6px 10px;font-size:14px;border-radius:8px;}
.content{display:flex;flex-direction:column;gap:20px;}
.ann-list{display:flex;flex-direction:column;gap:10px;}
.ann-card{background:var(--ann-bg);border:1px solid var(--ann-border);color:var(--ann-text);padding:12px;border-radius:10px;box-shadow:var(--shadow);font-weight:600;}
.header-line{font-size:22px;font-weight:700;color:#0f172a;margin-top:6px;margin-bottom:6px;}
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;}
.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px;display:flex;flex-direction:column;gap:12px;border:1px solid rgba(37,99,235,0.06);}
.card .title{font-size:18px;font-weight:600;color:#0f172a;}
.field-label{font-size:13px;font-weight:700;color:var(--accent);margin-top:2px;margin-bottom:6px;}
.meta{display:flex;gap:12px;align-items:center;color:#374151;font-size:14px;flex-wrap:wrap;}
.players{color:#111827;font-weight:500;}
.notes{color:#374151;font-size:14px;background:#fbfdff;padding:12px;border-radius:8px;border:1px solid #eef6ff;}
/* forms */
.card form input,.card form select,.card form textarea{display:block;width:100%;max-width:520px;margin-bottom:14px;padding:10px 12px;border-radius:8px;border:1px solid #e6eef8;font-size:15px;background:#ffffff;}
.card form textarea{min-height:3.2em; resize:vertical; overflow:auto;}
.segmented{display:flex;gap:8px;max-width:520px;width:100%;}
.segmented input[type=radio]{display:none;}
.segmented label{flex:1;text-align:center;padding:10px 12px;border-radius:10px;border:1px solid #e6eef8;background:#E5E7EB;cursor:pointer;font-weight:600;transition:.2s;}
.segmented input[type=radio]:checked+label{background:var(--accent-strong);border-color:var(--accent-strong);color:#fff;}
.flash-message{padding:10px;border-radius:10px;background:#eef7ff;color:#1e3a8a;border:1px solid #dbeafe;}
/* calendar */
.calendar{background:#fff;border-radius:12px;box-shadow:var(--shadow);padding:16px;border:1px solid #eef3fb;max-width:720px;}
.cal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;}
.cal-cell{background:#fafbfc;border:1px solid #eef3fb;padding:10px;border-radius:8px;text-align:center;min-height:50px;cursor:pointer;}
.cal-cell.dim{opacity:.45;}
.cal-cell.has-meeting{background:#eef6ff;border-color:#2563EB;color:#1D4ED8;font-weight:700;}
.cal-dayname{font-size:12px;color:#6b7280;text-align:center;margin-bottom:6px;}
@media (max-width:1000px){.cards{grid-template-columns:repeat(2,1fr)}.sidebar{width:220px;padding:20px}}
@media (max-width:680px){.app-shell{flex-direction:column}.sidebar{width:100%;flex-direction:row;align-items:center;gap:10px;padding:12px;overflow:auto}.brand-text{display:none}.main{padding:12px}.cards{grid-template-columns:1fr}.nav{flex-direction:row;gap:6px}.nav-item{padding:8px 10px;font-size:13px}.sidebar-foot{display:none}}

/* Wyróżnienie sobót w kalendarzu archiwum */
.cal-cell.saturday { background-color: #dbeafe; }


/* Kalendarz archiwum – wyrównanie siatki do dni tygodnia */
.cal-daynames, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; }
.cal-dayname { text-align: center; font-weight: 600; padding: 6px 0; }
.cal-grid .cal-cell { min-height: 48px; border: 1px solid #eee; box-sizing: border-box; display:flex; align-items:center; justify-content:center; }
.cal-grid .cal-cell.dim { background: transparent; border: none; }
.cal-grid .cal-cell a { display:block; width:100%; height:100%; text-decoration:none; color:#111; font-weight:600; display:flex; align-items:center; justify-content:center; }
.cal-grid .cal-cell .day-num { opacity:.6; }
.cal-grid .cal-cell.saturday { background-color: #dbeafe; } /* jasny niebieski */


/* Poprawka – soboty zawsze niebieskie i widoczne */
.cal-cell.saturday {
  background-color: #dbeafe !important;
  border-color: #c7d2fe;
}
.cal-cell.saturday a, .cal-cell.saturday .day-num {
  color: #1e3a8a;
  font-weight: 700;
}


/* Archiwum – listowy widok spotkań */
.archive-list .card {
  border: 1px solid #e5e7eb;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.archive-list .table-item:not(:last-child) {
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 10px;
  margin-bottom: 10px;
}


/* === Ujednolicenie przycisków === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  line-height: 1.2;
  height: 38px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

button.btn {
  border: none;
}

.btn:hover {
  opacity: 0.9;
}

/* === Zielony przycisk dla linku do instrukcji === */
.btn-green {
  background-color: #22c55e;
  color: #fff !important;
  border: none;
}
.btn-green:hover {
  background-color: #16a34a;
}


/* === Pełna spójność wysokości i stylu przycisków === */
.btn, button.btn, input[type=submit].btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 14px !important;
  line-height: 1 !important;
  height: 40px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  transition: background-color 0.2s ease, opacity 0.2s ease !important;
}

/* Ujednolicenie wyglądu przycisków w formach */
button.btn {
  border: none !important;
  background-color: inherit;
}

.btn:hover {
  opacity: 0.9;
}

/* Zielony przycisk 🎥 Zobacz instrukcję */
.btn-green {
  background-color: #22c55e !important;
  color: #ffffff !important;
  border: none !important;
}
.btn-green:hover {
  background-color: #16a34a !important;
}


/* --- Ujednolicenie rozmiaru czcionki przycisków --- */
.btn, button.btn, input[type=submit].btn, a.btn {
  font-size: 0.95rem !important;
}

/* Ostrożność: <a> może mieć własne style - wzmocnij jako przycisk */
a.btn { display: inline-flex !important; align-items:center !important; justify-content:center !important; }


/* === SPM: readonly date field === */
input[readonly] {
  background-color: #f9fafb;
  color: #111827;
  cursor: default;
}


/* === SPM: logo emoji 🎲 === */
.logo {
  font-size: 2.8rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}
.logo:hover {
  opacity: 0.8;
}
@media (max-width: 768px) {
  .logo {
    font-size: 2.2rem;
  }
}

/* --- Dodane: lepsza widoczność przycisków --- */
button, .btn, input[type="submit"], .button {
  background-color: #1e3a8a;
  color: #ffffff !important;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}
button:hover, .btn:hover, input[type="submit"]:hover, .button:hover {
  background-color: #3b82f6;
  color: #ffffff !important;
}
a.btn, a.button {
  text-decoration: none;
  display: inline-block;
}
#add-table-btn, .add-table-btn, .reserve-seat, .zajmij-miejsce, .dodaj-stolik {
  background-color: #1e3a8a;
  color: #ffffff !important;
}

/* --- Ujednolicony styl przycisków --- */
button, input[type="submit"], input[type="button"], .btn, .button, .submit, .form-button {
  background-color: #1e3a8a !important;
  color: #ffffff !important;
  border: none !important;
  padding: 8px 16px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-weight: 500;
}
button:hover, input[type="submit"]:hover, input[type="button"]:hover, .btn:hover, .button:hover, .submit:hover {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
}

/* --- Styl dla informacji o miejscach --- */
.seat-info {
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-block;
  font-weight: bold;
  margin-bottom: 8px;
}
.seat-info.green { background-color: #16a34a; }
.seat-info.yellow { background-color: #eab308; color: black; }
.seat-info.red { background-color: #dc2626; }
