
/* Wymuś widoczność tekstu w submenu nawet gdy sidebar jest zwinięty */
.sidebar.small .submenu .label {
  display: inline-block !important;
  color: #fff !important;
}

.sidebar.small .submenu {
  display: none;
  position: fixed;
  background: #1f2937;
  border-radius: 12px;
  padding: 8px;
  min-width: 140px;
  z-index: 9999;
}

.sidebar.small .submenu .nav {
  background: #0f172a !important;
  padding: 10px 14px;
  margin: 4px 0;
  border-radius: 8px;
  white-space: nowrap;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.sidebar.small .submenu .icon {
  width: 20px;
  font-size: 14px;
}

.sidebar.small .submenu .label {
  display: inline !important;
  font-size: 13px;
}
/* GLOBAL VARIABLES */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #111827;
  --bg-hover: #1f2937;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-red: #ef4444;
  --accent-green: #22c55e;
  --accent-orange: #f59e0b;
  --border: #334155;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --radius-lg: 18px;
  --transition: all 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* BUTTONS */
button, .btn {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

button:hover, .btn:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

button:active {
  transform: translateY(0);
}

.btn-red {
  background: var(--accent-red);
}

.btn-red:hover {
  background: #dc2626;
}

.btn-green {
  background: var(--accent-green);
}

.btn-green:hover {
  background: #16a34a;
}

.btn-orange {
  background: var(--accent-orange);
}

.btn-orange:hover {
  background: #ea580c;
}

.btn-gray {
  background: var(--bg-secondary);
}

.btn-gray:hover {
  background: var(--bg-hover);
}

/* CARDS */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

/* INPUTS */
input, select, textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* TABLES */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 12px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

tr:hover {
  background: var(--bg-hover);
}

/* BADGES */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-red { background: var(--accent-red); color: white; }
.badge-green { background: var(--accent-green); color: white; }
.badge-orange { background: var(--accent-orange); color: white; }
.badge-blue { background: var(--accent-blue); color: white; }
.badge-gray { background: var(--bg-secondary); color: var(--text-secondary); }

/* ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

/* MAPA SPECIFIC */
.leaflet-container {
  background: #1e293b !important;
}

.leaflet-control-zoom a {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

/* KALENDARZ */
.fc {
  background: var(--bg-card) !important;
  border-radius: var(--radius-lg) !important;
}

.fc .fc-toolbar-title {
  color: var(--text-primary) !important;
}

/* SIDEBAR */
.sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #0a0f1a 100%) !important;
}

.nav {
  transition: var(--transition) !important;
}

.nav:hover {
  background: var(--accent-blue) !important;
  transform: translateX(4px);
}


/* Submenu wysuwane w prawo */
.submenu {
  position: fixed;
  left: 280px;
  top: 200px;
  background: var(--bg-card, #1e293b);
  border-radius: 12px;
  padding: 8px;
  min-width: 160px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  border: 1px solid var(--border, #334155);
}

.sidebar.small .submenu {
  left: 78px;
  top: 130px;
}

.submenu .nav {
  background: var(--bg-hover, #0f172a) !important;
  padding: 10px 14px;
  margin: 0;
  white-space: nowrap;
}

.submenu .nav:hover {
  background: var(--accent, #3b82f6) !important;
  transform: translateX(4px);
}

/* Animacja wysuwania */
.submenu.show {
  display: flex;
  animation: slideRight 0.2s ease-out;
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Submenu - domyślnie ukryte */
.submenu {
  display: none;
  position: fixed;
  background: #1e293b;
  border-radius: 12px;
  padding: 8px;
  min-width: 140px;
  flex-direction: column;
  gap: 6px;
  z-index: 10000;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  border: 1px solid #334155;
}

.submenu .nav {
  background: #0f172a !important;
  padding: 10px 14px;
  margin: 0;
}

.submenu .nav:hover {
  background: #3b82f6 !important;
}

/* Submenu wysuwane w prawo */
.submenu {
  position: fixed;
  background: #1e293b;
  border-radius: 12px;
  padding: 8px;
  min-width: 140px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 10000;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  border: 1px solid #334155;
}

.submenu.show {
  display: flex;
  animation: slideRight 0.2s ease-out;
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.submenu .nav {
  background: #0f172a !important;
  padding: 10px 14px;
  margin: 0;
  white-space: nowrap;
}

.submenu .nav:hover {
  background: #3b82f6 !important;
  transform: translateX(4px);
}

/* Submenu - domyślnie ukryte */
.submenu {
  display: none;
  position: fixed;
  background: #1e293b;
  border-radius: 12px;
  padding: 8px;
  min-width: 140px;
  flex-direction: column;
  gap: 6px;
  z-index: 10000;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  border: 1px solid #334155;
}

.submenu .nav {
  background: #0f172a !important;
  padding: 10px 14px;
  margin: 0;
}

.submenu .nav:hover {
  background: #3b82f6 !important;
}
