/* ── DochádzkaPRO — Shared Styles ── */

@font-face {
  font-family: 'Pangram';
  src: url('../fonts/Pangram-Regular.woff2') format('woff2');
  font-weight: 400;
}
@font-face {
  font-family: 'Pangram';
  src: url('../fonts/Pangram-Bold.woff2') format('woff2');
  font-weight: 700;
}
@font-face {
  font-family: 'Pangram';
  src: url('../fonts/Pangram-Black.woff2') format('woff2');
  font-weight: 800;
}

:root {
  --bg:      #f4f6f9;
  --surface: #ffffff;
  --card:    #ffffff;
  --border:  #e2e6ed;
  --accent:  #00c488;
  --accent2: #0070f3;
  --warn:    #ff6b35;
  --text:    #1a1d23;
  --muted:   #7a8394;
  --danger:  #e53e5a;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  min-height: 100vh;
}

/* ── Typography ── */
.logo {
  font-family: 'Pangram', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
}
.logo span { color: var(--accent); }

/* ── Layout ── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 50;
  padding: 24px 0;
  box-shadow: 2px 0 12px rgba(0,0,0,.05);
}
.sidebar-logo {
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.nav-section {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 16px 20px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  transition: all .2s;
  border-left: 3px solid transparent;
}
.nav-item:hover { color: var(--text); background: rgba(0,196,136,.06); }
.nav-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(0,196,136,.08);
}
.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.user-badge { font-size: 11px; color: var(--muted); }
.user-badge strong { color: var(--accent); display: block; font-size: 13px; }

.main {
  margin-left: 220px;
  padding: 28px;
  min-height: 100vh;
}
.page { display: none; }
.page.active { display: block; }

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.card-title {
  font-family: 'Pangram', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

/* ── Buttons ── */
.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-family: 'Pangram', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
}
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #00b07a; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-secondary:hover { background: rgba(0,196,136,.08); }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-warn     { background: var(--warn); color: #fff; }
.btn-sm       { padding: 6px 11px; font-size: 10px; }

/* ── Forms ── */
label {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
input, select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  outline: none;
  transition: border .2s;
  margin-bottom: 14px;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,196,136,.1); }

/* ── Table ── */
table { width: 100%; border-collapse: collapse; }
th {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 9px 10px;
  border-bottom: 2px solid var(--border);
  background: var(--bg);
}
td {
  padding: 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
tr:last-child td { 
  border-bottom: none; 
}
tr:hover td { 
  background: rgba(0,196,136,.03);
 }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.badge-green  { background: rgba(0,196,136,.12); color: #008f63;  border: 1px solid rgba(0,196,136,.3); }
.badge-red    { background: rgba(229,62,90,.12);  color: var(--danger);  border: 1px solid rgba(229,62,90,.2); }
.badge-orange { background: rgba(255,107,53,.12); color: #c0440a;    border: 1px solid rgba(255,107,53,.2); }
.badge-blue   { background: rgba(0,112,243,.10);  color: #0050c0; border: 1px solid rgba(0,112,243,.2);min-width:max-content; }

.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-green  { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.dot-red    { background: var(--danger); }

/* ── Utility ── */
.flex { display: flex; }
.gap-2 { gap: 8px; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.loading { text-align: center; padding: 28px; color: var(--muted); font-size: 12px; }
.err {
  background: rgba(229,62,90,.08);
  border: 1px solid rgba(229,62,90,.3);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 14px;
  display: none;
}
.gps-small { font-size: 10px; color: var(--muted); line-height: 1.4; }

/* ── Progress bar ── */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width .4s;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 460px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
}
.modal-title { font-family: 'Pangram', sans-serif; font-size: 17px; font-weight: 800; margin-bottom: 18px; color: var(--text); }
.modal-close { position: absolute; top: 14px; right: 14px; background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Mobile topbar ── */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  margin: -12px -12px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.mobile-logout {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  font-family: 'Pangram', sans-serif;
}

/* ── Mobile responsive ── */
@media (max-width: 768px) {
  .sidebar {
    top: auto; left: 0; right: 0; bottom: 0;
    width: 100%; height: 64px;
    flex-direction: row;
    align-items: center;
    padding: 0;
    border-right: none;
    border-top: 1px solid var(--border);
    z-index: 100;
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  }
  .sidebar-logo { display: none; }
  .nav-section  { display: none; }
  .sidebar-footer { display: none; }
  
  .nav-item.active { 
    border-top-color: var(--accent);
    border-left: none;
    background: rgba(0,196,136,.06);
   }

  .main { 
    margin-left: 0;
    padding: 12px; 
    padding-bottom: 80px;
   }

  .mobile-topbar {
     display: flex;
     }

  .card {
    padding: 14px; 
    overflow-x: auto; 
  }
  table { 
    min-width: 520px;
   }
  input[type="date"] {
    min-width: 0; 
    width: 100%; 
    box-sizing: border-box;
     
  }
  .flex.justify-between {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  .flex.justify-between .btn { 
    width: 100%;
   }

  .row2 { 
    grid-template-columns: 1fr;
   }

  .modal { 
    padding: 22px 18px; 
  }
}