:root {
  --bg: #f7f8fb;
  --text: #0f172a;
  --redcolor: #db1215;
  --bluecolor: #00328b;
  --card: #ffffff;
  --muted: #6b7280;

  --hero-btn-bg: var(--redcolor);
  --hero-btn-text: #ffffff;
  --hero-btn-hover: #b90f12;

  --radius: 12px;
  --shadow: 0 6px 20px rgba(0,0,0,0.08);
  --container: 1200px;
}

html {
  overflow-y: scroll;
}

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

body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-left: 5px;
  padding-right:5px;
}

/* ---------------------------------------
   HEADER
--------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--card);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: height 260ms ease;
}

.site-header.header--small {
  height: var(--header-small);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;

  height: 100%;
  padding: 10px 16px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  transition: all 260ms ease;
}

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

.logo {
  width: 60px;
  height: 60px;
  transition: all 260ms ease;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-header.header--small .logo {
  width: 45px;
  height: 45px;
}

.brand-text {
  line-height: 1;
}

.org-full {
  font-weight: 700;
  font-size: 15px;
}

.org-short {
  font-size: 13px;
  color: var(--muted);
}

.main-nav {
  position: relative;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 18px;

  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-list a:hover {
  color: var(--redcolor);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text);
}

/* ======================
   MOBILE
====================== */

@media (max-width: 1050px) {

  .site-header {
    position: fixed;
    left: 0;
    right: 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-list {
    position: absolute;
    top: 100%;
    right: 10px;
    flex-direction: column;
    align-items: flex-start;
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 10px 0;
    min-width: 180px;

    display: none; 
  }

  .nav-list.open {
    display: flex;
  }

  .nav-list a {
    width: 100%;
    padding: 10px 16px;
  }

  .nav-list a:hover {
    color: var(--redcolor);
    background: rgba(0,0,0,0.05);
  }

  .header-inner {
    flex-direction: row;
  }

  .auth-actions {
    display: none;
  }

  .mobile-only {
    display: block;
  }

  .logout-link {
    color: var(--redcolor);
    font-weight: 700;
  }

}

/* ======================
   LOGIN
====================== */

.login-body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 70px;
  height: 100vh;
  background: var(--bg);
}

.login-form {
  background: var(--card);
  padding: 30px 25px;
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(12,18,32,0.06);
  text-align: center;
  width: 320px;
  border: 1px solid rgba(0,0,0,0.08);
}

.login-form h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: var(--redcolor);
}

.login-form p {
  font-size: 0.95rem;
  margin-bottom: 20px;
  color: var(--muted);
}

.login-form input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 6px;
  font-size: 1rem;
  background-color: #fff;
  color: var(--text);
}

.login-form button {
  width: 100%;
  padding: 10px;
  background: var(--redcolor);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.login-form button + button {
  margin-top: 10px;
}

.login-form button:hover {
  background: var(--hero-btn-hover);
}

.password-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
}

.password-wrapper input {
  width: 100%;
  padding: 10px 40px 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  background-color: var(--light);
  color: var(--text);
  box-sizing: border-box;
}

.password-wrapper .toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-90%);
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #555;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.password-wrapper .toggle-password:hover {
  color: #000;
  transform: translateY(-90%) scale(1.1);
}

.login-form .error {
  color: var(--redcolor);
  margin-bottom: 10px;
  font-weight: 600;
}

/* ======================
   PLÁNOVAČ
====================== */

.container {
  max-width: var(--container);
  margin: 30px auto;
  padding: 0 16px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 25px;
}

.container form {
  display: grid;
  gap: 14px;
  font-size: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

label {
  font-weight: 600;
}

input,
select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 15px;
  background: #fff;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--redcolor);
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.btn-redcolor {
  background: var(--redcolor);
  color: #fff;
  transition: 0.2s;
}

.btn-redcolor:hover {
  background: #a30f11;
}

/* ======================
   TABUĽKA
====================== */

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

.table-head,
.row {
  display: grid;
  grid-template-columns: 190px 100px 1fr 160px 1.4fr 60px;
  align-items: center;
}

.table-head {
  padding: 12px 14px;
  font-weight: 700;
  background: rgba(219,18,21,0.08);
  border-radius: 10px;
}

.row {
  padding: 12px 14px;
  background: #f5f5f5;
  border-radius: 10px;
}

.cell {
  word-break: break-word;
  overflow-wrap: break-word;
  font-size: 14px;
  padding-right: 10px;
}

.row .cell:first-child {
  font-weight: 600;
}

.row:hover {
  background: #f9fafb;
}

.table-controls {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.btn-toggle {
  display: inline-block;
  margin: 10px 0 20px;
  padding: 8px 14px;
  background: var(--bluecolor);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: 0.2s;
}

.btn-toggle:hover {
  background: #001f5a;
}

/* ======================
   ALERTY
====================== */

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-weight: 600;
}

.alert-success {
  background: #e7f8ee;
  color: #166534;
}

.alert-error {
  background: #fde2e2;
  color: #991b1b;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-box {
  background: var(--bg);
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
}

.fc .fc-button {
  background: var(--redcolor);
  transition: 0.2s;
}

.fc .fc-button:hover {
  background: #a30f11;
}

/* ======================
   BLOCKED
====================== */

.blocked-body {
  text-align: center;
  margin-top: 50px;
}

.blocked-countdown {
  font-weight: bold;
  color: var(--redcolor);
}


/* ======================
   PORTÁL
====================== */

.portal {
  margin-top: 30px;
}

.portal-hero {
  text-align: center;
  padding: 30px 20px;
}

.portal-hero h1 {
  margin-bottom: 8px;
}

.portal-hero p {
  color: var(--muted);
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.portal-card {
  display: block;
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.portal-card .icon {
  font-size: 30px;
  margin-bottom: 10px;
}

.portal-card h2 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.portal-card p {
  color: var(--muted);
  font-size: 14px;
}

.portal-card.disabled {
  opacity: 0.5;
  pointer-events: none;
}



/* ======================
   DARK MODE
====================== */

@media (prefers-color-scheme: dark) {

  :root {
    --bg: #283440;
    --bg2: #212b36;
    --text: #e6eef8;
    --card: #242c33;
    --muted: #9aa3b2;
  }

  body {
    background: var(--bg);
    color: var(--text);
  }

  .login-form {
    background: var(--card);
    border: 1px solid rgba(255,255,255,0.1);
  }

  .login-form input {
    background: #1a2228;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
  }

  .card {
    background: var(--card);
  }

  input,
  select {
    background: #1a2228;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
  }

  .row {
    background: var(--bg);
  }

  .row:hover {
    background: #26303a;
  }

  .table-head {
    background: rgba(219,18,21,0.2);
  }

  .alert-success {
    background: #064e3b;
    color: #d1fae5;
  }

  .alert-error {
    background: #7f1d1d;
    color: #fee2e2;
  }

  .modal-box {
    background: var(--bg);
  }

  .fc .fc-col-header-cell {
    background: var(--bg);
  }

  .blocked-countdown {
    color: var(--redcolor);
  }

  .site-header {
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .main-nav a {
    color: var(--text);
  }

  .main-nav a:hover {
    color: var(--redcolor);
  }

  .logout-btn {
    border: 1px solid var(--redcolor);
    color: var(--redcolor);
  }

  .logout-btn:hover {
    background: var(--redcolor);
    color: #fff;
  }

}


/* ======================
   RESPONSIVE
====================== */

@media (max-width: 700px) {
  body {
    padding-top: 50px;
  }

  .table-head {
    display: none;
  }

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

  .cell {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 16px;
    padding: 4px 0;
  }

  .cell::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    margin-right: 10px;
  }

  .cell[data-label="Akcie"] {
    justify-content: flex-start;
    gap: 12px;
  }

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

  .fc .fc-toolbar {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
  }

  .fc .fc-button {
    padding: 4px 6px;
    font-size: 11px;   
  }

  .fc .fc-toolbar-title {
    font-size: 14px;
    text-align: center;
    flex: 1;
  }

  .fc .fc-today-button {
    padding: 4px 8px;
    font-size: 12px;
  }

  .fc .fc-prev-button,
  .fc .fc-next-button {
    padding: 4px 6px;
    font-size: 14px;
  }
}
