:root {
    --dock-h: 96px;
    --tile: 48px;
    --max-scale: 0.9;
}
.dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    z-index: 10050;
    pointer-events: none;
}
.dock__wrap {
    position: relative;
    pointer-events: auto;
    width: 100%;
    padding: 12px 24px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    border-radius: 0;
    background: rgb(20 22 28 / 0.55);
    backdrop-filter: saturate(140%) blur(14px);
    border: 1px solid rgb(255 255 255 / 0.08);
    box-shadow: 0 18px 40px rgb(0 0 0 / 0.35);
}
.dock__wrap::before {
    display: none;
}
.dock__menu {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 36px;
    margin: 0;
    padding: 0;
}
.dock__item {
    width: calc(var(--tile) * var(--max-scale));
    display: flex;
    justify-content: center;
}
.dock__item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #e7e9ee;
}
.dock-label {
    font-size: clamp(12px, 1.3vw, 16px);
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgb(0 0 0 / 0.45);
    opacity: 0;
    transform: translateY(2px);
    transition: 0.15s;
}
.dock__item:hover .dock-label {
    opacity: 1;
    transform: translateY(0);
}
.icon-tile {
    width: var(--tile);
    height: var(--tile);
    border-radius: 14px;
    display: grid;
    place-items: center;
    box-shadow:
        0 10px 22px rgb(0 0 0 / 0.35),
        inset 0 0 0 1px rgb(255 255 255 / 0.06);
    transition:
        transform 0.09s ease,
        filter 0.2s ease;
    will-change: transform;
    transform-origin: 50% 100%;
}
.icon-tile:hover {
    filter: brightness(1.06);
}
.icon-tile svg {
    width: 26px;
    height: 26px;
    stroke: #fff;
    stroke-width: 2.2;
}
.icon-tile svg * {
    stroke-linecap: round;
    stroke-linejoin: round;
}
.dock--reg .icon-tile {
    background: linear-gradient(180deg, #34d399, #059669);
}
.dock--baza .icon-tile {
    background: linear-gradient(180deg, #93c5fd, #3b82f6);
}
.dock--cen .icon-tile {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
}
.dock--zak .icon-tile {
    background: linear-gradient(180deg, #a78bfa, #7c3aed);
}
.dock--out .icon-tile {
    background: linear-gradient(180deg, #fb7185, #e11d48);
}
.dock--ter .icon-tile {
    background: linear-gradient(180deg, #60a5fa, #1e40af);
}
.dock-user-pill {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 9999px;
    background: rgb(20 22 28 / 0.8);
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgb(0 0 0 / 0.18);
    z-index: 2;
    pointer-events: auto;
}
.dock-user-pill .role {
    font-weight: 700;
}
.dock-user-pill svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}
.calendar-header { 
  margin-top: 15px; 
  text-align: center; 
  margin-bottom: 25px; 
  background-color: #fff; 
  padding: 20px; 
  border-radius: 12px; 
  box-shadow: 0 4px 15px rgb(0 0 0 / 0.08); 
  max-width: 900px; 
  margin-left: auto; 
  margin-right: auto; 
  font-family: Arial, sans-serif; 
}
@media (max-width: 768px) {
    .calendar-header {
        padding: 8px 12px;
        gap: 8px;
        min-height: 48px;
        border-radius: 10px;
    }
    .calendar-header .calendar-title {
        font-size: 13px;
        line-height: 1;
        margin: 0;
    }
    .calendar-header .calendar-subtitle,
    .calendar-header .date-range {
        display: none;
    }
    .calendar-header .calendar-controls {
        gap: 6px;
        flex-wrap: wrap;
    }
    .calendar-header .btn,
    .calendar-header button {
        height: 25px;
        padding: 0 10px;
        font-size: 14px;
        border-radius: 8px;
    }
    .calendar-header svg {
        width: 12px;
        height: 12px;
    }
}
@media (max-width: 480px) {
    .calendar-header {
        padding: 4px 8px;
        gap: 4px;
        min-height: 36px;
        border-radius: 8px;
    }
    .calendar-header .calendar-title {
        font-size: 11px;
    }
    .calendar-header .calendar-controls {
        gap: 4px;
    }
    .calendar-header .btn,
    .calendar-header button {
        height: 22px;
        padding: 0 6px;
        font-size: 12px;
        border-radius: 6px;
    }
    .calendar-header svg {
        width: 10px;
        height: 10px;
    }
}
@media (max-width: 768px) {
    :root {
        --tile: 36px;
        --max-scale: 1;
        --dock-h: 70px;
    }
    .dock__wrap {
        padding: 8px 10px;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
    .dock__menu {
        gap: 10px;
    }
    .icon-tile svg {
        width: 15px;
        height: 15px;
    }
    .dock-label {
        font-size: 9px;
        opacity: 1;
    }
}
@media (max-width: 400px) {
    :root {
        --tile: 32px;
        --dock-h: 62px;
    }
    .dock-label {
        display: none;
    }
    .dock__menu {
        gap: 8px;
    }
    .admin-footer {
        bottom: calc(var(--dock-h) - 2px);
    }
}
@media (max-width: 480px) {
    .dock {
        bottom: 30px;
    }
    .dock-user-pill {
        position: fixed;
        right: 12px;
        bottom: max(8px, env(safe-area-inset-bottom));
        transform: none;
        z-index: 10070;
        padding: 4px 8px;
        gap: 6px;
        font-size: 12px;
        width: 80%;
        height: 32px;
    }
    .dock-user-pill .who {
        max-width: 40vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .admin-container,
    .admin-main-content,
    .unos-klijenata,
    .zakazivanje-page {
        padding-bottom: calc(var(--dock-h, 62px) + 30px + 40px);
        scroll-padding-bottom: calc(var(--dock-h, 62px) + 30px + 40px);
    }
}
@media (max-width: 480px) {
    :root {
        --dock-lift: 80px;
    }
    .dock {
        bottom: 0;
    }
    .dock__wrap {
        padding: 2px 2px;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
        min-height: 128px;
    }
    .dock__menu {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: var(--dock-lift);
        gap: 10px;
        z-index: 1;
    }
    .dock-user-pill {
        position: absolute;
        left: 50%;
        right: auto;
        bottom: max(8px, env(safe-area-inset-bottom));
        transform: translateX(-50%);
        z-index: 2;
        padding: 4px 8px;
        gap: 6px;
        font-size: 12px;
        justify-content: center;
        text-align: center;
        max-width: 90vw;
    }
    .dock-user-pill .who {
        max-width: 40vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .admin-container,
    .admin-main-content,
    .unos-klijenata,
    .zakazivanje-page {
        padding-bottom: calc(var(--dock-h, 62px) + var(--dock-lift) + 24px);
        scroll-padding-bottom: calc(var(--dock-h, 62px) + var(--dock-lift) + 24px);
    }
}
@media (max-width: 768px) {
    .modal {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 20000;
        align-items: flex-start;
        justify-content: center;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 12px 8px;
    }
    .modal.show {
        display: flex;
    }
    .modal-backdrop {
        z-index: 19999;
    }
    .modal-content {
        width: 96%;
        max-width: 560px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .appointments-wrapper {
        flex: 1 1 auto;
        min-height: 100px;
        overflow: auto;
    }
}

.reminder-fixed {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.dock-reminder__label {
    font-size: 15px;
    opacity: 0.8;
    margin-right: 0.25rem;
}
.dock-reminder__select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    background: #fff;
}
@media (max-width: 720px) {
    .reminder-fixed {
        top: max(0px, env(safe-area-inset-top));
        right: max(0px, env(safe-area-inset-right));
        left: auto;
        bottom: auto;
        padding: 6px 8px;
        border: 1px solid #ddd;
        border-radius: 0.5rem;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        z-index: 3000;
    }
    .dock-reminder__label {
        display: none;
    }
}

.who--link {
    text-decoration: underline;
    color: inherit;
}
.who--link:hover {
    text-decoration: none;
}
.sys-banner {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid #fecaca;
}
/* Ekrani ispod 992px (tableti i manji laptopi) */
@media (max-width: 992px) {
  .calendar-header {
    max-width: 700px;
    padding: 15px;
    border-radius: 10px;
  }
}

/* Ekrani ispod 768px (veći telefoni) */
@media (max-width: 768px) {
  .calendar-header {
    max-width: 95%;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  }
}

/* Ekrani ispod 480px (mali telefoni) */
@media (max-width: 480px) {
  .calendar-header {
    max-width: 90%;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 10px;
  }
}

/* Ekrani ispod 360px (najmanji uređaji) */
@media (max-width: 360px) {
  .calendar-header {
    max-width: 88%;
    padding: 6px 8px;
    border-radius: 5px;
    font-size: 7px;
  }
}
.role-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.role-link:hover {
  color: #1d4ed8;
}
