:root {
  color-scheme: light;
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --ink: #172033;
  --muted: #64748b;
  --line: #d9e1ec;
  --blue: #1f5fae;
  --green: #10a37f;
  --red: #c2413a;
  --amber: #d69b12;
  --shadow: 0 16px 36px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(15, 62, 137, 0.96) 0%, rgba(24, 91, 166, 0.96) 66%, rgba(231, 174, 28, 0.96) 100%),
    #123f88;
  color: #ffffff;
}

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

.brand-mark {
  display: grid;
  width: 56px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  padding: 5px;
  box-shadow: 0 10px 22px rgba(4, 22, 52, 0.18);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: #a9b6c7;
}

.nav {
  display: grid;
  gap: 8px;
}

.hidden {
  display: none !important;
}

.public-site {
  min-height: 100vh;
  background: #f4f7fb;
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(217, 225, 236, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.public-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 850;
  text-decoration: none;
}

.public-brand img {
  width: 68px;
  height: 48px;
  object-fit: contain;
  padding: 5px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(23, 32, 51, 0.08);
}

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

.public-nav a,
.public-login-button {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.public-login-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.public-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 36px;
  align-items: end;
  min-height: min(680px, calc(100vh - 82px));
  padding: clamp(52px, 8vw, 96px) clamp(18px, 5vw, 72px);
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 220, 80, 0.62), transparent 28%),
    linear-gradient(120deg, #0b367c 0%, #1f5fae 38%, #d99d15 72%, #113b84 100%);
  background-size: 160% 160%;
  animation: heroGradientFlow 18s ease-in-out infinite;
}

.public-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("assets/tk-logo.jpg") right clamp(18px, 6vw, 86px) center / min(58vw, 660px) no-repeat;
  opacity: 0.42;
  filter: grayscale(1) contrast(1.85);
  mix-blend-mode: multiply;
}

.public-hero::after {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: -32%;
  z-index: -1;
  width: 34%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.42) 46%, transparent 100%);
  transform: rotate(14deg);
  animation: logoLightSweep 9s ease-in-out infinite;
}

.hero-content {
  max-width: 760px;
}

.public-eyebrow {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.public-hero .public-eyebrow {
  color: #ffd96a;
}

.public-hero h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(2.45rem, 6vw, 5.4rem);
  line-height: 0.98;
}

.public-hero p {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.public-primary,
.public-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
}

.public-primary {
  border: 0;
  background: var(--amber);
  color: #172033;
}

.public-secondary {
  border: 1px solid rgba(255, 255, 255, 0.46);
  color: #ffffff;
}

.hero-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.hero-card strong {
  font-size: 1.15rem;
}

.hero-card span,
.hero-card a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.public-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px clamp(18px, 4vw, 36px);
}

.public-intro,
.split-section,
.contact-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 36px;
  align-items: start;
}

.public-section h2 {
  margin-bottom: 12px;
  font-size: clamp(1.65rem, 3vw, 2.65rem);
  line-height: 1.08;
}

.public-section p {
  color: var(--muted);
  line-height: 1.65;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.service-card,
.info-panel,
.quote-panel,
.contact-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.service-card {
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.service-card:hover {
  border-color: rgba(31, 95, 174, 0.34);
  box-shadow: 0 22px 44px rgba(23, 32, 51, 0.12);
  transform: translateY(-3px);
}

.service-card img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.service-card div {
  padding: 20px;
}

.service-card span {
  color: var(--amber);
  font-weight: 900;
}

.service-card h3 {
  margin: 12px 0 8px;
  font-size: 1.08rem;
}

.service-card ul {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.service-card li {
  position: relative;
  padding-left: 18px;
  color: #243044;
  font-size: 0.93rem;
  font-weight: 720;
  line-height: 1.45;
}

.service-card li::before {
  content: "";
  position: absolute;
  top: 0.58em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}

.service-detail-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(31, 95, 174, 0.08), rgba(214, 155, 18, 0.12)),
    #ffffff;
  box-shadow: var(--shadow);
}

.service-detail-panel h3 {
  margin: 0;
  font-size: 1.38rem;
  line-height: 1.18;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-tags li {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(31, 95, 174, 0.16);
  border-radius: 999px;
  background: #ffffff;
  color: #243044;
  font-size: 0.92rem;
  font-weight: 800;
}

.public-service-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 62px clamp(18px, 4vw, 36px) 86px;
}

.service-page-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: grid;
  align-content: end;
  padding: clamp(32px, 6vw, 56px);
  border-radius: 8px;
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 18%, rgba(255, 215, 90, 0.42), transparent 24%),
    linear-gradient(105deg, rgba(10, 38, 83, 0.96), rgba(31, 95, 174, 0.78)),
    url("https://images.pexels.com/photos/8482826/pexels-photo-8482826.jpeg?auto=compress&cs=tinysrgb&w=1400") center / cover;
  box-shadow: var(--shadow);
}

.service-page-hero.fire-page {
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 198, 90, 0.44), transparent 26%),
    linear-gradient(105deg, rgba(10, 38, 83, 0.96), rgba(198, 98, 12, 0.72)),
    url("https://images.pexels.com/photos/5965211/pexels-photo-5965211.jpeg?auto=compress&cs=tinysrgb&w=1400") center / cover;
}

.service-page-hero.training-page {
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 226, 120, 0.44), transparent 26%),
    linear-gradient(105deg, rgba(10, 38, 83, 0.96), rgba(214, 155, 18, 0.72)),
    url("https://images.pexels.com/photos/4487447/pexels-photo-4487447.jpeg?auto=compress&cs=tinysrgb&w=1400") center / cover;
}

.service-page-hero h1 {
  max-width: 760px;
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1;
}

.service-page-hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
  line-height: 1.6;
}

.service-visual-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.service-visual-row article {
  position: relative;
  overflow: hidden;
  min-height: 172px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.service-visual-row img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.service-visual-row span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.16);
}

.fire-visuals span {
  color: #7a260c;
}

.training-visuals span {
  color: #174a87;
}

.service-page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
}

.service-page-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.public-service-page[data-service-page="varstvopridelu"] .service-page-panel {
  border-top: 4px solid var(--blue);
}

.public-service-page[data-service-page="pozarnavarnost"] .service-page-panel {
  border-top: 4px solid #c75b18;
}

.public-service-page[data-service-page="usposabljanja"] .service-page-panel {
  border-top: 4px solid var(--amber);
}

.service-page-panel.wide {
  grid-column: 1 / -1;
  background:
    linear-gradient(135deg, rgba(31, 95, 174, 0.08), rgba(214, 155, 18, 0.12)),
    #ffffff;
}

.service-page-panel h2 {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
}

.service-page-panel p {
  color: var(--muted);
  line-height: 1.65;
}

.service-page-cta {
  margin-top: 22px;
}

.visual-section {
  max-width: none;
  padding-right: 0;
  padding-left: clamp(18px, 4vw, calc((100vw - 1180px) / 2 + 36px));
  background: linear-gradient(180deg, #ffffff 0%, #eef4fb 100%);
}

.visual-section .section-heading {
  max-width: 760px;
  margin-right: clamp(18px, 4vw, 36px);
}

.visual-slider {
  overflow: hidden;
  margin-top: 24px;
}

.slide-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: publicSlide 28s linear infinite;
}

.visual-slider:hover .slide-track {
  animation-play-state: paused;
}

.slide-track figure {
  width: min(70vw, 440px);
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.slide-track img {
  display: block;
  width: 100%;
  height: 270px;
  object-fit: cover;
}

.slide-track figcaption {
  padding: 16px 18px;
  color: var(--ink);
  font-weight: 850;
}

.info-panel,
.quote-panel {
  padding: 24px;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  padding-left: 24px;
  color: var(--ink);
  font-weight: 750;
  position: relative;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.quote-panel {
  background: #102f69;
  color: #ffffff;
}

.quote-panel p {
  color: rgba(255, 255, 255, 0.82);
}

.contact-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.contact-grid article {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 18px;
  border-color: rgba(255, 217, 106, 0.28);
  background:
    linear-gradient(135deg, rgba(15, 62, 137, 0.96), rgba(31, 95, 174, 0.94) 62%, rgba(214, 155, 18, 0.9)),
    #1f5fae;
  color: #ffffff;
}

.contact-grid span {
  color: #ffd96a;
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.contact-grid a,
.contact-grid strong {
  color: #ffffff;
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inquiry-form {
  display: grid;
  grid-column: 1 / -1;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.inquiry-form label,
.inquiry-form .form-row {
  display: grid;
  gap: 8px;
}

.inquiry-form label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.inquiry-form .form-row {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.inquiry-form input,
.inquiry-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
}

.inquiry-form input {
  min-height: 44px;
  padding: 0 12px;
}

.inquiry-form textarea {
  min-height: 132px;
  padding: 12px;
  resize: vertical;
}

.inquiry-button {
  margin-top: 20px;
}

.public-footer {
  padding: 42px clamp(18px, 4vw, 56px) 24px;
  border-top: 1px solid rgba(217, 225, 236, 0.9);
  background:
    linear-gradient(135deg, rgba(10, 38, 83, 0.96), rgba(31, 95, 174, 0.92) 62%, rgba(214, 155, 18, 0.9)),
    #102f69;
  color: #ffffff;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto 28px;
}

.footer-brand img {
  width: 88px;
  height: 64px;
  object-fit: contain;
  padding: 7px;
  border-radius: 8px;
  background: #ffffff;
}

.footer-brand strong,
.footer-brand span {
  display: block;
}

.footer-brand strong {
  font-size: 1.18rem;
}

.footer-brand span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 750;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
}

.footer-grid div {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.footer-grid span {
  color: #ffd96a;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.footer-grid a,
.footer-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.footer-grid a:hover {
  color: #ffffff;
}

.footer-internal-link {
  justify-self: start;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.58) !important;
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: underline !important;
  text-underline-offset: 4px;
}

.footer-internal-link:hover {
  color: rgba(255, 255, 255, 0.86) !important;
}

.footer-bottom {
  max-width: 1180px;
  margin: 30px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
}

@keyframes heroGradientFlow {
  0%,
  100% {
    background-position: 0% 48%;
  }

  50% {
    background-position: 100% 52%;
  }
}

@keyframes logoLightSweep {
  0%,
  22% {
    left: -36%;
    opacity: 0;
  }

  42% {
    opacity: 0.66;
  }

  64%,
  100% {
    left: 112%;
    opacity: 0;
  }
}

@keyframes publicSlide {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-50% - 9px));
  }
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  border-color: rgba(255, 213, 74, 0.48);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.admin-access {
  display: grid;
  gap: 8px;
}

.dark-button {
  width: 100%;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 213, 74, 0.36);
  color: #ffffff;
}

.dark-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.danger-admin-button {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(194, 65, 58, 0.18);
}

.danger-admin-button:hover {
  background: rgba(194, 65, 58, 0.28);
}

.workspace {
  padding: 28px;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
}

.top-actions,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.ghost-button,
.icon-button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
}

.primary-button {
  padding: 0 16px;
  background: var(--blue);
  color: #ffffff;
}

.ghost-button {
  padding: 0 14px;
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.icon-button {
  display: grid;
  width: 42px;
  place-items: center;
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
  font-size: 1.25rem;
}

.filters {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr 0.85fr 0.85fr;
  gap: 12px;
  margin-bottom: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

input,
select {
  height: 42px;
  padding: 0 10px;
}

textarea {
  min-height: 88px;
  padding: 10px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45, 108, 223, 0.13);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

#clockView.active ~ #statusView,
#clockView.active ~ #workplanView,
#clockView.active ~ #myEntriesView {
  display: block;
  margin-top: 14px;
}

#clockView.active:not(.employee-unlocked) ~ #statusView,
#clockView.active:not(.employee-unlocked) ~ #workplanView,
#clockView.active:not(.employee-unlocked) ~ #myEntriesView {
  display: none;
}

#clockView.active ~ #workplanView .workplan-pin {
  display: none;
}

#clockView.active ~ #workplanView .workplan-badge {
  display: none;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.kpi,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.kpi {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.kpi span,
.panel-heading span {
  color: var(--muted);
  font-size: 0.88rem;
}

.kpi strong {
  font-size: 1.55rem;
  line-height: 1.1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.admin-control-panel {
  margin-top: 14px;
}

.panel {
  padding: 14px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.live-clock {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.live-clock span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.live-clock strong {
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
}

canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 170px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  background: #edf7f3;
  color: #067a5d;
  font-size: 0.78rem;
  font-weight: 800;
}

.status.review {
  background: #fff7df;
  color: var(--amber);
}

.status.missing {
  background: #fdeceb;
  color: var(--red);
}

.row-action {
  border: 0;
  background: transparent;
  color: var(--red);
  font-weight: 800;
}

.compact-button {
  min-height: 32px;
  padding: 0 10px;
}

.employee-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.clock-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr);
  gap: 14px;
}

.clock-layout.locked {
  grid-template-columns: minmax(280px, 560px);
  justify-content: center;
}

#clockView.employee-unlocked .clock-layout.locked {
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
}

.clock-panel {
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(110deg, rgba(16, 62, 137, 0.96), rgba(31, 95, 174, 0.96), rgba(224, 170, 31, 0.94), rgba(16, 62, 137, 0.96));
  background-size: 260% 260%;
  animation: panelGradient 18s ease-in-out infinite;
}

@keyframes panelGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.clock-panel .panel-heading span,
.clock-panel label,
.clock-panel .worker-badge small {
  color: rgba(255, 255, 255, 0.78);
}

.clock-panel #placeTypeGroup legend,
.clock-panel #kmToggleRow,
.clock-panel .km-fields label {
  color: #ffffff;
}

.clock-panel #placeTypeGroup label {
  color: var(--ink);
}

.clock-panel #kmToggleRow span {
  color: var(--ink);
}

.clock-panel .form-message {
  color: #ffffff;
}

.status-panel {
  height: 100%;
}

.workplan-panel {
  height: 100%;
}

#clockView.employee-unlocked .clock-panel {
  max-width: none;
  min-height: 330px;
}

#clockView.employee-unlocked .clock-session {
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
  min-height: 230px;
}

#clockView.employee-unlocked #shiftActionForm {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 0.9fr);
  align-items: stretch;
  gap: 14px;
}

#clockView.employee-unlocked #placeTypeGroup {
  grid-column: 1;
  grid-row: span 2;
}

#clockView.employee-unlocked #kmToggleRow {
  grid-column: 2;
  align-self: start;
}

#clockView.employee-unlocked #kmFields {
  grid-column: 1 / -1;
}

#clockView.employee-unlocked #shiftActionButton,
#clockView.employee-unlocked #changeWorker {
  min-height: 58px;
  font-size: 1.05rem;
}

#clockView.employee-unlocked #shiftActionButton {
  grid-column: 2;
  font-size: 1.18rem;
}

#clockView.employee-unlocked #changeWorker {
  grid-column: 2;
}

#clockView.employee-unlocked #placeTypeGroup label {
  min-height: 70px;
  font-size: 1.08rem;
  font-weight: 850;
}

#clockView.active.employee-unlocked ~ #statusView,
#clockView.active.employee-unlocked ~ #workplanView {
  display: inline-block;
  vertical-align: top;
  margin-top: 14px;
  min-height: 360px;
}

#clockView.active.employee-unlocked ~ #workplanView {
  width: calc(60% - 8px);
}

#clockView.active.employee-unlocked ~ #statusView {
  width: calc(40% - 8px);
  margin-left: 14px;
}

#clockView.active.employee-unlocked ~ #myEntriesView {
  display: block;
  width: 100%;
  margin-top: 14px;
}

.my-entries-panel table {
  min-width: 760px;
}

.main-panel-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.dark-panel-button {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.dark-panel-button:hover {
  background: rgba(255, 255, 255, 0.23);
}

.clock-panel .worker-badge {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
}

.clock-panel .worker-badge > span {
  background: #ffffff;
  color: var(--blue);
}

.clock-panel .worker-badge strong {
  color: #ffffff;
  font-size: 1.18rem;
}

.workplan-pin {
  max-width: 420px;
}

.workplan-actions {
  display: flex;
  gap: 10px;
}

.absence-list {
  display: grid;
  gap: 10px;
}

.inquiry-list {
  display: grid;
  gap: 12px;
}

.inquiry-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.inquiry-card.new-inquiry {
  border-color: rgba(214, 155, 18, 0.34);
  background: #fffaf0;
}

.inquiry-card-top,
.inquiry-contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.inquiry-card-top {
  justify-content: space-between;
}

.inquiry-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.inquiry-card p {
  margin: 12px 0;
  color: var(--ink);
  line-height: 1.55;
}

.inquiry-contact a {
  color: var(--blue);
  font-weight: 850;
  text-decoration: none;
}

.absence-history {
  display: grid;
  gap: 10px;
}

.absence-history h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
}

.absence-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.absence-card.vacation {
  border-color: rgba(45, 108, 223, 0.26);
  background: #f4f7ff;
}

.absence-card.sick {
  border-color: rgba(194, 65, 58, 0.22);
  background: #fff6f5;
}

.absence-card strong,
.absence-card small {
  display: block;
}

.absence-card small {
  margin-top: 3px;
  color: var(--muted);
}

.absence-card span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.absence-badges,
.absence-admin-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.approval-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-weight: 850;
}

.approval-status.approved {
  background: #dff8ee;
  color: var(--green);
}

.approval-status.rejected {
  background: #fdeceb;
  color: var(--red);
}

.approval-status.pending {
  background: #fff7df;
  color: var(--amber);
}

.danger-button {
  color: var(--red);
}

.danger-primary-button {
  background: var(--red);
}

.warning-copy {
  margin-bottom: 16px;
  color: var(--muted);
  line-height: 1.45;
}

.planner-panel {
  display: grid;
  gap: 14px;
}

.planner-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.planner-month-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.planner-month-controls h2 {
  min-width: 180px;
  text-align: center;
}

.planner-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.2fr) auto;
  align-items: end;
  gap: 10px;
}

.planner-unlock {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 126px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.calendar-day:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45, 108, 223, 0.1);
}

.muted-day {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.day-number {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 850;
}

.day-events {
  display: grid;
  gap: 5px;
}

.planner-event {
  display: grid;
  gap: 2px;
  padding: 7px;
  border-radius: 8px;
  background: #edf7f3;
  color: #067a5d;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.25;
}

.planner-event small {
  color: rgba(6, 122, 93, 0.76);
  font-weight: 700;
}

.planner-event.private-event {
  background: #eef3ff;
  color: var(--blue);
}

.planner-event.private-event small {
  color: #4d6694;
}

.large-action {
  width: 100%;
  min-height: 54px;
  font-size: 1.02rem;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--green);
  font-weight: 800;
}

.form-message.logout-message {
  color: var(--red);
}

.clock-session {
  display: grid;
  gap: 18px;
}

.worker-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.worker-badge > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 850;
}

.worker-badge strong,
.worker-badge small {
  display: block;
}

.worker-badge small {
  margin-top: 3px;
  color: var(--muted);
}

.segmented-field {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0;
  border: 0;
}

.segmented-field legend {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.segmented-field label,
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.segmented-field input,
.check-row input {
  width: auto;
  height: auto;
}

.km-fields {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 12px;
}

.error-message {
  color: var(--red);
}

.active-shifts {
  display: grid;
  gap: 10px;
}

.shift-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.shift-card.working {
  border-color: rgba(16, 163, 127, 0.35);
  background: #f1fbf7;
}

.shift-card.away {
  background: #ffffff;
}

.shift-card strong,
.shift-card small {
  display: block;
}

.shift-card small {
  margin-top: 3px;
  color: var(--muted);
}

.shift-card .worker-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.shift-card.working .worker-status {
  background: #dff8ee;
  color: var(--green);
}

.shift-card.away .worker-status {
  background: #fdeceb;
  color: var(--red);
}

.shift-card.vacation-status .worker-status {
  background: #e9f0ff;
  color: var(--blue);
}

.shift-card.sick-status .worker-status {
  background: #fff7df;
  color: #9a6700;
}

.empty {
  margin-bottom: 0;
  color: var(--muted);
}

.employee-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.employee-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.employee-edit {
  justify-self: start;
}

.employee-pin {
  margin: 0;
  color: var(--muted);
}

.employee-card strong {
  font-size: 1.05rem;
}

.employee-card small {
  color: var(--muted);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mini-stats span {
  padding: 9px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.8rem;
}

.mini-stats b {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 1rem;
}

.stacked-form {
  display: grid;
  gap: 13px;
}

.employee-access-card {
  background:
    linear-gradient(135deg, rgba(31, 95, 174, 0.08), rgba(214, 155, 18, 0.16)),
    #ffffff;
}

.access-intro {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}

.access-mark {
  display: grid;
  width: 104px;
  height: 76px;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(23, 32, 51, 0.08);
}

.access-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.access-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

dialog {
  width: min(920px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 26px 70px rgba(23, 32, 51, 0.28);
}

.narrow-dialog {
  width: min(420px, calc(100vw - 28px));
}

dialog::backdrop {
  background: rgba(23, 32, 51, 0.48);
}

.entry-form {
  padding: 22px;
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.full {
  grid-column: 1 / -1;
}

.entry-place-field {
  grid-column: 1 / -1;
  margin: 0;
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 20px;
}

.dialog-actions .row-action {
  margin-right: auto;
}

@media (max-width: 1040px) {
  .public-hero,
  .public-intro,
  .split-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

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

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

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

  .service-detail-panel {
    grid-template-columns: 1fr;
  }

  .service-visual-row {
    grid-template-columns: 1fr;
  }

  .service-page-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
  }

  .nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .filters,
  .kpi-grid,
  .dashboard-grid,
  .employee-layout,
  .clock-layout,
  #clockView.employee-unlocked .clock-session,
  #clockView.employee-unlocked #shiftActionForm,
  .planner-toolbar,
  .planner-filters {
    grid-template-columns: 1fr 1fr;
  }

  .planner-toolbar {
    display: grid;
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .public-header,
  .public-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .public-nav {
    gap: 8px;
  }

  .public-hero {
    min-height: auto;
    padding-top: 44px;
  }

  .inquiry-form .form-row {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .contact-grid,
  .service-grid,
  .service-detail-panel,
  .service-visual-row,
  .service-page-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .service-page-hero {
    min-height: 320px;
  }

  .hero-actions {
    display: grid;
  }

  .workspace,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
  }

  .primary-button {
    flex: 1;
  }

  .filters,
  .kpi-grid,
  .dashboard-grid,
  .employee-layout,
  .clock-layout,
  #clockView.employee-unlocked .clock-session,
  #clockView.employee-unlocked #shiftActionForm,
  .planner-toolbar,
  .planner-filters,
  .planner-unlock,
  .workplan-actions,
  .form-grid,
  .nav {
    grid-template-columns: 1fr;
  }

  .workplan-actions {
    display: grid;
  }

  .calendar-weekdays {
    display: none;
  }

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

  .calendar-day {
    min-height: 96px;
  }

  #clockView.active.employee-unlocked ~ #statusView,
  #clockView.active.employee-unlocked ~ #workplanView {
    width: 100%;
    margin-left: 0;
  }

  table {
    min-width: 780px;
  }
}
