/* Aerocenter PIN prijava (ap-*) i zaposlenici (az-*). Dodir prvo: veliki ciljevi, bez hovera kao jedinog stanja. */

.ap-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: radial-gradient(120% 80% at 50% -10%, #1C3354 0%, #0B1626 55%, #070E18 100%) fixed;
    color: #F3F6FA;
    font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}
.ap-body *, .ap-body *::before, .ap-body *::after { box-sizing: border-box; }

.ap-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}
.ap-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.ap-brand { display: flex; align-items: center; gap: 1rem; }
.ap-plane { width: 44px; height: 44px; color: #E8B820; transform: rotate(45deg); flex: none; }
.ap-title { font-size: 1.75rem; font-weight: 750; margin: 0; letter-spacing: .01em; }
.ap-sub { margin: .25rem 0 0; color: #9FB0C6; font-size: 1.05rem; }
.ap-clock { font-size: 2rem; font-weight: 650; font-variant-numeric: tabular-nums; color: #CFD9E6; }

.ap-current, .ap-alert {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    padding: .9rem 1.1rem;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}
.ap-alert--error { background: rgba(220, 38, 38, .18); border-color: rgba(248, 113, 113, .5); }
.ap-link { color: #F0C63E; font-weight: 650; text-decoration: none; padding: .5rem .25rem; display: inline-block; }

.ap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1.1rem;
}
.ap-tile {
    --c: #2563EB;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 190px;
    padding: 1.25rem .75rem;
    border: 0;
    border-radius: 22px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--c) 92%, #fff 8%) 0%, color-mix(in srgb, var(--c) 78%, #000 22%) 100%);
    color: #fff;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .18);
    transition: transform 120ms ease, filter 120ms ease;
    touch-action: manipulation;
}
.ap-tile:active { transform: scale(.96); filter: brightness(1.1); }
.ap-tile:focus-visible { outline: 4px solid #E8B820; outline-offset: 3px; }
.ap-tile--tenant { --c: #334155; }
.ap-initials {
    display: inline-flex; align-items: center; justify-content: center;
    width: 84px; height: 84px; border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    font-size: 2rem; font-weight: 750; letter-spacing: .03em;
}
.ap-initials--sm { width: 56px; height: 56px; font-size: 1.35rem; flex: none; background: var(--c, #2563EB); color: #fff; }
.ap-name { font-size: 1.2rem; font-weight: 700; text-align: center; line-height: 1.2; }
.ap-role { font-size: .9rem; opacity: .85; }
.ap-lock {
    position: absolute; top: .7rem; right: .7rem;
    background: rgba(0, 0, 0, .45); border-radius: 999px; padding: .2rem .6rem; font-size: .8rem; font-weight: 650;
}

.ap-empty { text-align: center; padding: 4rem 1rem; color: #CFD9E6; }
.ap-empty strong { font-size: 1.3rem; display: block; margin-bottom: .5rem; }
.ap-empty p { color: #9FB0C6; }
.ap-foot { margin-top: auto; padding-top: 2rem; text-align: center; }

/* Tipkovnica */
.ap-pad {
    position: fixed; inset: 0; z-index: 50;
    display: flex; align-items: center; justify-content: center;
    background: rgba(4, 9, 16, .72);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    padding: 1rem;
}
.ap-pad[hidden] { display: none; }
.ap-pad-card {
    width: min(400px, 100%);
    background: #12233A;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 28px;
    padding: 1.6rem 1.5rem 1.4rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
    margin: 0;
}
.ap-pad-who { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.ap-pad-name { font-size: 1.35rem; font-weight: 700; }
.ap-pad-hint { color: #9FB0C6; margin-top: .15rem; }
.ap-dots { display: flex; justify-content: center; gap: 1.1rem; margin: .5rem 0 .75rem; }
.ap-dots span {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid #9FB0C6; transition: background 100ms ease, border-color 100ms ease;
}
.ap-dots span.is-on { background: #E8B820; border-color: #E8B820; }
.ap-pad-msg { min-height: 1.5em; text-align: center; color: #FCA5A5; font-weight: 600; margin: 0 0 .9rem; font-size: .98rem; }
.ap-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.ap-key {
    min-height: 76px;
    border: 0; border-radius: 18px;
    background: rgba(255, 255, 255, .09);
    color: #fff;
    font: inherit; font-size: 1.9rem; font-weight: 650;
    cursor: pointer;
    touch-action: manipulation;
    transition: background 80ms ease, transform 80ms ease;
}
.ap-key:active, .ap-key.is-pressed { background: rgba(255, 255, 255, .24); transform: scale(.96); }
.ap-key:focus-visible { outline: 3px solid #E8B820; outline-offset: 2px; }
.ap-key--text { font-size: 1.05rem; color: #CFD9E6; background: transparent; }
.ap-key svg { width: 30px; height: 30px; }
.ap-key:disabled { opacity: .35; }
.ap-pad-card.is-shake { animation: ap-shake 380ms ease; }
.ap-pad-card.is-busy .ap-dots span.is-on { animation: ap-pulse 700ms ease infinite alternate; }
@keyframes ap-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-14px); } 40% { transform: translateX(12px); }
    60% { transform: translateX(-8px); } 80% { transform: translateX(5px); }
}
@keyframes ap-pulse { from { opacity: 1; } to { opacity: .4; } }
@media (prefers-reduced-motion: reduce) {
    .ap-pad-card.is-shake, .ap-pad-card.is-busy .ap-dots span.is-on { animation: none; }
    .ap-tile, .ap-key { transition: none; }
}
@media (max-width: 560px) {
    .ap-grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
    .ap-tile { min-height: 150px; }
    .ap-initials { width: 64px; height: 64px; font-size: 1.5rem; }
    .ap-clock { display: none; }
    .ap-title { font-size: 1.4rem; }
}

/* ── Zaposlenici (unutar admin layouta) ───────────────────────── */

.az-list { display: grid; gap: .75rem; }
.az-row {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    background: var(--card); border: 1px solid var(--line); border-radius: 10px;
    padding: .9rem 1rem;
}
.az-row.is-off { opacity: .6; }
.az-avatar {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--c, #2563EB); color: #fff; font-weight: 750; font-size: 1.15rem;
}
.az-main { flex: 1 1 14rem; min-width: 0; }
.az-name { font-weight: 700; font-size: 1.05rem; }
.az-meta { color: var(--steel); font-size: .88rem; margin-top: .15rem; overflow-wrap: anywhere; }
.az-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.az-actions .ws-btn, .az-big .ws-btn { min-height: 44px; }
.az-colors { display: flex; flex-wrap: wrap; gap: .6rem; }
.az-color { position: relative; }
.az-color input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.az-color span {
    display: block; width: 44px; height: 44px; border-radius: 50%;
    background: var(--c); border: 3px solid transparent; box-shadow: 0 0 0 1px var(--line);
}
.az-color input:checked + span { border-color: var(--card); box-shadow: 0 0 0 3px var(--ink); }
.az-color input:focus-visible + span { outline: 3px solid var(--tag); outline-offset: 2px; }
.az-pin { font-size: 1.4rem !important; letter-spacing: .5em; text-align: center; max-width: 11rem; font-variant-numeric: tabular-nums; }
.az-roles { display: flex; gap: .6rem; flex-wrap: wrap; }
.az-roles label {
    display: flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1rem;
    border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 600;
}
.az-roles input { width: 20px; height: 20px; }
