/* ====== RESET ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", Arial, sans-serif;
}

/* ====== ZMIENNE KOLORÓW ====== */
:root {
  --brand-red: #DD1B13;
  --brand-dark: #0A0F1C;
  --text: #1B1B1B;
  --background: #F9FAFB;
  --card: #FFFFFF;
  --border: #E4E4E4;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ====== STRONA ====== */
html,
body {
  height: 100%;
}

body {
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
  margin: 0;
}

/* ====== KONTENER (landing / logowanie) ====== */
.container {
  max-width: 1080px;
  width: 100%;
  margin: 40px auto;        /* centruje na stronie */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 40px;
}

/* ====== LOGO (landing) ====== */
.logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  margin-bottom: 20px;
}

/* ====== NAGŁÓWEK (landing) ====== */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.header h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

.header p {
  color: #555;
  font-size: 0.95rem;
}

/* ====== GRID (dwie karty na landing) ====== */
.grid {
  display: grid;
  gap: 20px;
  justify-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ====== KARTA (landing) ====== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  width: 100%;
  max-width: 480px;
  text-align: left;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.card p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 12px;
}

/* ====== DROBNY TEKST ====== */
.lead,
.muted,
.hint {
  font-size: 0.9rem;
  color: #6B7280;
}

/* ====== FORMULARZE – bazowe ====== */
form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .row {
    grid-template-columns: 1fr 1fr;
  }
}

.col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-size: 0.9rem;
  color: #111827;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  resize: none;
  background: #FFFFFF;
  color: #111827;
  margin: 0;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  min-height: 80px;
}

input:focus,
textarea:focus {
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 2px rgba(10, 15, 28, 0.12);
}

.g-recaptcha {
  transform: scale(1);
  transform-origin: left top;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

/* ====== STATUSY FORMULARZA ====== */
.status {
  font-size: 0.9rem;
  margin-top: 4px;
  min-height: 1.2em;
}

.status--success {
  color: #15803d;
}

.status--error {
  color: var(--brand-red);
}

.status--error a {
  color: #B91C1C !important;
  font-weight: 600;
  text-decoration: underline;
}

.status--error a:hover {
  color: #7F1D1D !important;
  text-decoration: none;
}

/* ====== PRZYCISKI ====== */
button,
.btn {
  background: var(--brand-dark);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.05s ease;
  width: 100%;
}

button:hover,
.btn:hover {
  background: var(--brand-red);
}

button:active,
.btn:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ====== STOPKA (landing) ====== */
.footer small {
  display: block;
  color: #888;
  font-size: 0.85rem;
  text-align: center;
}

/* ====== DASHBOARD – STARY UKŁAD (do ewentualnego użycia) ====== */

.dashboard-shell {
  max-width: 1120px;
  margin: 32px auto;
  padding: 0 16px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.sidebar {
  width: 260px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar__logo {
  height: 28px;
}

.sidebar__title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #F3F4F6;
}

.sidebar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--brand-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
}

.sidebar__user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.sidebar__user-email {
  font-size: 0.8rem;
  color: #6B7280;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar__link {
  display: block;
  font-size: 0.9rem;
  padding: 8px 10px;
  border-radius: 8px;
  color: #4B5563;
  text-decoration: none;
}

.sidebar__link:hover {
  background: #F3F4F6;
  color: var(--text);
}

.sidebar__link--active {
  background: #0A0F1C;
  color: #fff;
}

.sidebar__logout {
  margin-top: auto;
}

.btn--full {
  width: 100%;
}

.dashboard-main-old {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-main__header-old h1 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.dashboard-card {
  max-width: none;
}

.dashboard-card--wide {
  grid-column: 1 / -1;
}

.dashboard-list {
  list-style: none;
  font-size: 0.9rem;
  color: #4B5563;
}

.dashboard-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.dashboard-list span {
  color: #6B7280;
}

.dashboard-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn--ghost {
  background: #F3F4F6;
  color: var(--brand-dark);
  width: 100%;
}

.btn--ghost:hover {
  background: #E5E7EB;
}

@media (max-width: 900px) {
  .dashboard-shell {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    flex-direction: column;
  }
}

/* ====== DASHBOARD – AKTUALNY PANEL ====== */

/* strona panelu – kolumna: topbar + reszta */
.dashboard-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout całego panelu (pod jasnym topbarem) */
.dashboard-layout {
  width: 100%;
  padding: 0;
  display: flex;
  gap: 24px;
  align-items: stretch;
  flex: 1;
  box-sizing: border-box;
}

/* Na małych ekranach – pod sobą */
@media (max-width: 900px) {
  .dashboard-layout {
    flex-direction: column;
    margin: 16px;
  }
}

/* Lewa kolumna – sidebar */
.dashboard-sidebar {
  width: 260px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Menu w sidebarze */
.dashboard-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Linki w menu */
.dashboard-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: #F3F4F6;
  color: #111827;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

.dashboard-sidebar__link span:first-child {
  width: 18px;
  display: inline-flex;
  justify-content: center;
}

/* Hover */
.dashboard-sidebar__link:hover {
  background: #E5E7EB;
  transform: translateY(-1px);
}

/* Aktywna pozycja */
.dashboard-sidebar__link--active {
  background: #020617;
  color: #F9FAFB;
}

.dashboard-sidebar__link--active:hover {
  background: #020617;
  transform: none;
}

/* Ustawienia przyklejone do dołu, wyloguj pod nimi */
.dashboard-sidebar__settings {
  margin-top: auto;
}

.dashboard-sidebar__logout {
  margin-top: 8px;
}

/* Główna część panelu – PRAWA KOLUMNA
   tu usunięto max-width, żeby mogła być szeroka */
.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Nagłówek w głównej kolumnie */
.dashboard-main__header h1 {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

/* Grid z kartami */
.dashboard-main__grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-card {
  max-width: none;
}

.dashboard-card--wide {
  grid-column: 1 / -1;
}

/* Listy w kartach */
.dashboard-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: #4B5563;
}

.dashboard-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.dashboard-list span {
  color: #6B7280;
}

/* Badge z licznikiem */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 0 6px;
  margin-left: auto;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #DC2626;
  color: #ffffff;
}

/* ====== FORMULARZE W PANELU ====== */

.form-grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.form-field .label {
  font-size: 0.85rem;
  color: #4B5563;
  margin-bottom: 4px;
}

.form-field input,
.form-field select,
.form-field textarea {
  border-radius: 10px;
  border: 1px solid #E5E7EB;
  padding: 8px 10px;
  font-size: 0.9rem;
  background: #F9FAFB;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #0A0F1C;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

.radio-group-inline {
  display: inline-flex;
  gap: 8px;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  border: 1px solid #E5E7EB;
  padding: 4px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  background: #F9FAFB;
}

.radio-pill input {
  margin: 0;
}

.radio-pill:hover {
  background: #EEF2FF;
  border-color: #0A0F1C;
}

.radio-pill input:checked + span {
  font-weight: 600;
}

.btn-sm {
  padding: 2px 8px;
  font-size: 0.8rem;
  border-radius: 999px;
}

/* ====== TOPBAR – JASNY NA CAŁĄ SZEROKOŚĆ ====== */

.dashboard-topbar {
  width: 100%;
  background: #F3F4F6;         /* jak jasne przyciski */
  color: #111827;
  border-bottom: 1px solid #E5E7EB;
}

.dashboard-topbar__inner {
  width: 100%;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-topbar__left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.dashboard-topbar__logo {
  height: 64px;
  width: auto;
  object-fit: contain;
}

.dashboard-topbar__right {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.95rem;
}

.dashboard-topbar__label {
  opacity: 0.8;
}

.dashboard-topbar__user {
  font-weight: 600;
}

@media (max-width: 640px) {
  .dashboard-topbar__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* ====== TABELA: odstępy + striping ====== */

.table-wrapper table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px; /* mała przerwa między wierszami */
}

.table {
  width: 100%;
}

.table thead th {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  color: #111827;
  white-space: nowrap;
}

.table tbody td {
  padding: 6px 16px;
  font-size: 0.9rem;
  text-align: left;
  vertical-align: middle;
}

/* co drugi wiersz – jak nieaktywne menu (#F3F4F6) */
.table tbody tr:nth-child(odd) {
  background-color: #F3F4F6;
}

.table tbody tr:nth-child(even) {
  background-color: #FFFFFF;
}

/* delikatne zaokrąglenia wierszy, żeby wyglądało jak „pills” */
.table tbody tr:first-child td {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.table tbody tr:last-child td {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* ====== TABELA CEN / WRAPPER ====== */

.table-price {
  display: block;
  padding: 8px 10px;
  border: 1px solid #D1D5DB;      /* ramka jak w inputach */
  border-radius: 10px;
  background-color: #F9FAFB;
  min-height: 40px;
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.dashboard-card .form-field textarea {
  width: 100%;
}
/* ====== ODSTĘPY W TABELACH / LISTACH ====== */

.table-wrapper table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 6px 3px;   /* poziome odstępy 12px, pionowe 6px */
}

.table-wrapper th,
.table-wrapper td {
  padding: 4px 8px;
  text-align: left;
  vertical-align: middle;
}

.table-wrapper th {
  font-weight: 600;
  color: #111;
}

.table-wrapper td {
  color: #333;
}
/* Karty w panelu – maksymalna szerokość dla czytelności na dużych ekranach */
.dashboard-main .dashboard-card {
  max-width: 1600px;   /* możesz zmienić na 1100 / 1300, jak wolisz */
  margin: 0 left;      /* wyśrodkowanie karty w prawej kolumnie */
}
