/* Kolory marki swiatgsm.com */
:root {
  --primary-color: #0066CC;
  --primary-dark: #0052A3;
  --primary-light: #3385D6;
  --success-color: #28A745;
  --danger-color: #DC3545;
  --warning-color: #FFC107;
  --info-color: #17A2B8;
  --dark-color: #343A40;
  --light-bg: #F8F9FA;
  --border-color: #DEE2E6;
}

html, body {
  height: 100%;
}

body { 
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.95rem; 
  background-color: var(--light-bg);
  color: var(--dark-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Główna zawartość - zajmuje dostępną przestrzeń i wypycha footer na dół */
body > .container,
body > .container-fluid,
nav + .container {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

table td, table th { vertical-align: middle; }

/* Navbar - kolory marki */
.navbar-brand {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff !important;
}

.navbar-brand:hover {
  color: #fff !important;
  opacity: 0.9;
}

.nav-link {
  color: #fff !important;
  font-size: 0.9rem;
  transition: opacity 0.2s ease;
  padding: 0.5rem 0.75rem !important;
}

.nav-link:hover {
  color: #fff !important;
  opacity: 0.8;
}

/* Przyciski - nowoczesny wygląd */
.btn {
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
  color: #fff;
}

.btn-outline-primary {
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  background-color: transparent;
  box-shadow: 0 2px 4px rgba(0, 102, 204, 0.2);
}

.btn-outline-primary:hover {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border-color: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.btn-warning:hover {
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 102, 0, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #218838 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #218838 0%, var(--success-color) 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
  border-radius: 6px;
}

.btn-sm::before {
  width: 0;
  height: 0;
}

.btn-sm:hover::before {
  width: 200px;
  height: 200px;
}

/* Badge - nowoczesny wygląd */
.badge {
  padding: 0.5em 0.75em;
  font-weight: 500;
  border-radius: 6px;
  font-size: 0.85em;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.badge.bg-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

.badge.bg-warning {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%) !important;
}

.badge.bg-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #218838 100%) !important;
}

.badge.bg-info {
  background: linear-gradient(135deg, var(--info-color) 0%, #138496 100%) !important;
}

.badge.bg-danger {
  background: linear-gradient(135deg, var(--danger-color) 0%, #C82333 100%) !important;
}

.badge.bg-secondary {
  background: linear-gradient(135deg, #6C757D 0%, #5A6268 100%) !important;
}

.badge.bg-dark {
  background: linear-gradient(135deg, var(--dark-color) 0%, #23272B 100%) !important;
}

/* Niestandardowe kolory dla statusów serwisów */
.badge.bg-purple {
  background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%) !important;
  color: #fff !important;
}

.badge.bg-light-green {
  background: linear-gradient(135deg, #90EE90 0%, #7DD87D 100%) !important;
  color: #000 !important;
}

.badge.bg-light-blue {
  background: linear-gradient(135deg, #87CEEB 0%, #6BB6D6 100%) !important;
  color: #000 !important;
}

/* Linki */
a {
  color: var(--primary-color);
  transition: all 0.2s ease;
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

a.btn {
  text-decoration: none;
}

a.btn:hover {
  text-decoration: none;
}

/* Nagłówki */
h1, h2, h3, h4, h5, h6 {
  color: var(--dark-color);
  font-weight: 600;
}

h3 {
  margin-bottom: 1rem;
}

/* Karty - nowoczesny wygląd */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-bottom: none;
  padding: 1rem 1.25rem;
  font-weight: 600;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  color: var(--dark-color);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.shadow-sm {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Tabele - nowoczesny wygląd */
.table {
  border-collapse: separate;
  border-spacing: 0;
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table thead th {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 1rem 0.75rem;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  position: relative;
}

.table thead th:first-child {
  border-top-left-radius: 12px;
}

.table thead th:last-child {
  border-top-right-radius: 12px;
}

.table tbody td {
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--border-color);
  vertical-align: middle;
  transition: background-color 0.2s ease;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background-color: rgba(0, 102, 204, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
  background-color: rgba(0, 102, 204, 0.03);
}

.table-striped > tbody > tr:nth-of-type(odd):hover > td {
  background-color: rgba(0, 102, 204, 0.12);
}

.table-bordered {
  border: 1px solid var(--border-color);
}

.table-bordered td,
.table-bordered th {
  border: 1px solid var(--border-color);
}

.table-responsive {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Formularze - nowoczesny wygląd */
.form-control,
.form-select {
  border-radius: 8px;
  border: 2px solid var(--border-color);
  padding: 0.625rem 1rem;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.15);
  outline: none;
}

.form-control:hover,
.form-select:hover {
  border-color: var(--primary-light);
}

.form-label {
  font-weight: 500;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

/* Alerty */
.alert {
  border-radius: 10px;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 1rem 1.25rem;
}

.alert-primary {
  background-color: rgba(0, 102, 204, 0.1);
  border-left: 4px solid var(--primary-color);
  color: var(--primary-dark);
}

.alert-info {
  background-color: rgba(23, 162, 184, 0.1);
  border-left: 4px solid var(--info-color);
  color: #0C5460;
}

.alert-success {
  border-left: 4px solid var(--success-color);
}

.alert-warning {
  border-left: 4px solid var(--warning-color);
}

.alert-danger {
  border-left: 4px solid var(--danger-color);
}

/* Stopka */
.footer {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: #fff;
  margin-top: auto !important;
  padding: 2rem 0;
  flex-shrink: 0;
  width: 100%;
}

.footer a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.footer h5 {
  color: #fff;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer .divider {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 1.5rem 0;
}

.footer-bottom {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 1.5rem 0;
  margin-top: 2rem;
}

/* Responsywność dla mobile */
@media (max-width: 768px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  h3, h4 {
    font-size: 1.25rem;
  }
  
  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }
  
  .table {
    font-size: 0.85rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem 0.25rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .row.g-3 > * {
    margin-bottom: 0.75rem;
  }
  
  .footer {
    padding: 1.5rem 0;
  }
  
  .footer h5 {
    font-size: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }
  
  .footer h5:first-child {
    margin-top: 0;
  }
}

/* Responsywne tabele - ukryj niektóre kolumny na mobile */
@media (max-width: 576px) {
  .table-responsive {
    font-size: 0.8rem;
  }
  
  .table th,
  .table td {
    padding: 0.4rem 0.2rem;
    white-space: nowrap;
  }
  
  /* Ukryj mniej ważne kolumny na bardzo małych ekranach */
  .table .d-none-mobile {
    display: none !important;
  }
}