/* =============================
   GLOBAL & LAYOUT
   ============================= */
* { box-sizing: border-box; }
body, html {
  margin: 0; padding: 0; height: 100%;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: #f4f6f8; color: #333;
}
#root {
  height: 100%; display: flex; flex-direction: column; overflow: hidden;
}
h1, h2, h3 { color: #2c3e50; margin: 0 0 15px; }
.status-msg { text-align: center; color: #e74c3c; font-weight: bold; margin-bottom: 15px; }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* =============================
   NAWIGACJA GÓRNA (TOP BAR)
   ============================= */
.top-nav {
  background: #1f2937; color: #fff; padding: 12px 20px;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2); flex-shrink: 0;
}
.nav-tabs { display: flex; gap: 10px; }
.nav-btn {
  background: transparent; color: #d1d5db; border: none; padding: 8px 16px;
  border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 0.95rem;
  transition: all 0.2s;
}
.nav-btn:hover { background: #374151; color: #fff; }
.nav-btn.active { background: #2563eb; color: #fff; }
.nav-user { font-size: 0.9rem; display: flex; align-items: center; gap: 15px; }
.user-role { color: #60a5fa; font-weight: bold; text-transform: uppercase; }

/* =============================
   OBSZAR ROBOCZY
   ============================= */
.content-area {
  flex: 1; overflow-y: auto; padding: 20px; position: relative;
}

/* =============================
   EKRAN LOGOWANIA
   ============================= */
.login-screen {
  height: 100vh; display: flex; align-items: center; justify-content: center; background: #1f2937;
}
.login-box {
  background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.3); width: 350px;
}
.login-box h1 { text-align: center; margin-bottom: 25px; font-weight: 900; }
.login-input {
  width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #d1d5db;
  border-radius: 4px; font-size: 1rem; background: #f9fafb; outline: none;
}
.login-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,0.2); }

/* =============================
   LISTA ZAMÓWIEŃ (GRID)
   ============================= */
.order-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 15px; max-width: 1200px; margin: 0 auto;
}
.order-card-mini {
  background: #fff; padding: 20px; border-radius: 6px; border-left: 5px solid #3b82f6;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05); cursor: pointer; transition: transform 0.1s, box-shadow 0.1s;
}
.order-card-mini:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.order-card-mini .lbl { color: #6b7280; font-size: 0.85rem; margin: 0 0 5px; }
.order-card-mini .oid { font-size: 1.5rem; font-weight: 900; color: #1f2937; margin: 0 0 10px; }
.order-card-mini .del { font-weight: bold; color: #4b5563; margin: 0; font-size: 0.95rem;}

/* =============================
   KARTA ZAMÓWIENIA (DETALE)
   ============================= */
.order-detail-container { padding-bottom: 120px; } /* Miejsce na dolny pasek */
.order-detail-card {
  max-width: 800px; margin: 0 auto; background: #fff; border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08); padding: 25px;
}
.order-header {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 2px solid #f3f4f6; padding-bottom: 15px; margin-bottom: 20px;
}
.order-header h2 { margin: 0; font-size: 1.8rem; font-weight: 900; }
.order-info p { margin: 5px 0; font-size: 1rem; color: #374151; }
.order-info span { font-weight: bold; color: #2563eb; }

/* =============================
   PRODUKTY (LISTA)
   ============================= */
.product-list { margin-top: 25px; display: flex; flex-direction: column; gap: 15px; }
.product-item {
  display: flex; align-items: center; background: #f9fafb; border: 1px solid #e5e7eb;
  border-radius: 6px; padding: 15px;
}
.product-item__img {
  width: 70px; height: 70px; background: #e5e7eb; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; margin-right: 20px;
  color: #9ca3af; font-size: 0.8rem; flex-shrink: 0; border: 1px solid #d1d5db;
}
.product-item__details p { margin: 4px 0; }
.product-item__name { font-size: 1.1rem; font-weight: bold; color: #1f2937; }
.product-item__sku { font-size: 0.85rem; color: #6b7280; }
.product-item__qty { font-size: 1.2rem; font-weight: 900; color: #1f2937; margin-top: 5px; }

/* =============================
   PRZYCISKI I BOTTOM BAR
   ============================= */
.btn {
  display: inline-block; text-align: center; font-weight: bold; text-transform: uppercase;
  border: none; border-radius: 4px; cursor: pointer; transition: all 0.2s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-small { padding: 6px 12px; font-size: 0.85rem; }
.btn-nav { padding: 8px 16px; font-size: 0.95rem; background: #9ca3af; color: #fff; }
.btn-nav:hover:not(:disabled) { background: #6b7280; }

/* Dolny przyklejony pasek */
.bottom-action-bar {
  position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
  border-top: 2px solid #e5e7eb; box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
  padding: 10px 20px; z-index: 100;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.bottom-action-bar .btn-full { width: 100%; max-width: 800px; padding: 12px; font-size: 1.1rem; background: #6b7280; color: #fff; }
.bottom-action-bar .btn-full:hover { background: #4b5563; }
.action-buttons { display: flex; gap: 10px; width: 100%; max-width: 800px; }
.btn-huge { flex: 1; padding: 18px; font-size: 1.2rem; letter-spacing: 1px; }

.btn-yellow { background: #facc15; color: #000; }
.btn-yellow:hover { background: #eab308; }
.btn-green { background: #22c55e; color: #fff; }
.btn-green:hover { background: #16a34a; }
.btn-blue { background: #2563eb; color: #fff; }
.btn-blue:hover { background: #1d4ed8; }
.btn-red { background: #ef4444; color: #fff; }
.btn-red:hover { background: #dc2626; }