/* =========================================================
   SEP KIOSK LOGIN — CLEAN RESPONSIVE VERSION
   Designed for mobile portrait, Surface/Dell portrait,
   22"/27" desktop landscape and short landscape kiosk screens.

   Numeric keypad uses CSS Grid instead of HTML tables.
   ========================================================= */

:root {
    --bg-text: #f1eee8;
    --bg-muted: #cfc9c1;
    --artisan: #aa805c;
    --artisan-dark: #7d573a;
    --circle: rgba(82, 87, 91, 0.34);
    --button-bg: #eeeae4;
    --button-bg-hover: #f4f1ec;
    --button-text: #202326;
    --line: #a77a52;
    --wood-1: #704b31;
    --wood-2: #a87950;
    --wood-3: #c09267;
    --wood-4: #835738;
}

* { box-sizing: border-box; }

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    position: relative;
    background: #171b1e url("../assets/bg-dark-landscape.jpg") center center / cover no-repeat;
    color: var(--bg-text);
    font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

/* =========================================================
   WOOD RINGS
   ========================================================= */

.wood-rings {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: clamp(42vh, 68vh, 82vh);
    width: auto;
    opacity: 0.50;
    z-index: 10;
    pointer-events: none;
}

/* =========================================================
   TOP LEFT — CLOCK / DATE
   ========================================================= */

.top-left {
    position: fixed;
    left: 1.7vw;
    top: 1.3vh;
    z-index: 100;
}

.clock {
    font-size: clamp(4vh, 4.15vw, 7.2vh);
    line-height: 0.95;
    font-weight: 300;
    letter-spacing: -0.04em;
    color: #f2eee8;
    white-space: nowrap;
}

.date {
    margin-top: 1.65vh;
    font-size: clamp(1.55vh, 1.15vw, 2.25vh);
    line-height: 1;
    font-weight: 300;
    letter-spacing: 0.20em;
    color: var(--bg-muted);
    white-space: nowrap;
}

.date-line {
    margin-top: 1vh;
    width: 10.8vw;
    min-width: 105px;
    max-width: 190px;
    height: 0.35vh;
    min-height: 2px;
    border-radius: 99px;
    background: var(--line);
}

/* =========================================================
   TOP RIGHT — BRANDING
   ========================================================= */

.branding {
    text-align: right;
    box-sizing: border-box;
    position: fixed;

    top: 2.0vh;
    right: 1.1vw;

    width: 18vw;

    min-width: 180px;
    max-width: 330px;

    z-index: 100;
}

.client-logo {
    display: block;
    max-width: 100%;
    max-height: 16vh;
    height: auto;
}

.sep-row {
    margin-top: 0.9vh;

    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: 0.45vw;
}

.powered-by {
    font-size: clamp(1.5vh, 1.05vw, 2.1vh);

    font-weight: 300;

    color: #ece8e1;

    white-space: nowrap;
}

.sep-logo {
    display: block;
    width: 7.8vw;
    min-width: 70px;
    max-width: 210px;
    height: auto;
}

.brand-copy {
    margin-top: 1.8vh;
    font-size: clamp(1.45vh, 1.05vw, 2vh);
    line-height: 1.45;
    font-weight: 300;
    color: #ddd7d0;
}

/* =========================================================
   CENTRAL LOGIN COMPOSITION
   ========================================================= */

.login-stage {
    position: fixed;
    left: 49%;
    top: 49%;
    width: 44vw;
    height: 67vh;
    transform: translate(-50%, -50%);
    z-index: 20;
    pointer-events: none;
}

.card-circle {
    position: absolute;
    left: 50%;
    top: 39%;
    transform: translate(-50%, -50%);
    width: min(39vh, 25vw);
    height: min(39vh, 25vw);
    border-radius: 50%;
    background: var(--circle);
    z-index: 20;
}

.pause-circle {
    position: absolute;
    left: 50%;
    top: 39%;
    transform: translate(-50%, -50%);
    width: min(39vh, 25vw);
    height: min(39vh, 25vw);
    border-radius: 50%;
    background: rgba(190, 45, 45, 0.38);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8%;
}

.pause-circle span {
    display: block;
    width: 8%;
    height: 38%;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 3px;
}

.card-hand {
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    width: min(39vw, 74vh);
    height: auto;
    z-index: 30;
}

.login-message {
    position: absolute;
    left: 50%;
    top: 76%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 40;
    white-space: nowrap;
}

.login-main,
.login-main-pause {
    font-size: clamp(3vh, 2.65vw, 5.2vh);
    line-height: 1;
    font-weight: 300;
    color: #f0ece6;
}

.login-sub {
    margin-top: 1.15vh;
    font-size: clamp(1.75vh, 1.45vw, 2.8vh);
    line-height: 1;
    font-weight: 300;
    color: #cfc8c0;
}

.login-accent {
    width: 3.8vw;
    min-width: 45px;
    max-width: 72px;
    height: 0.35vh;
    min-height: 2px;
    margin: 2vh auto 0;
    border-radius: 99px;
    background: var(--line);
}

/* =========================================================
   BOTTOM LOGIN BUTTON
   ========================================================= */

.pin-button {
    position: fixed;
    left: 0.8vw;
    bottom: 1.3vh;
    width: clamp(300px, 22vw, 390px);
    height: clamp(6vh, 7vh, 8vh);
    padding: 0 1.2vw 0.2vw;
    border: 1px solid rgba(170, 128, 91, 0.65);
    border-radius: 1.15vw;
    background: linear-gradient(to bottom, #f4f1eb 0%, #e8e3dc 100%);
    color: var(--button-text);
    font-family: inherit;
    font-size: clamp(2vh, 1.45vw, 3vh);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1vw;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 0.55vh 1.1vh rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.pin-button::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0.65vh;
    min-height: 4px;
    background: linear-gradient(
        90deg,
        var(--wood-1) 0%,
        var(--wood-2) 18%,
        var(--wood-3) 34%,
        var(--wood-4) 52%,
        #b17d51 70%,
        #704a30 100%
    );
}

.pin-button:active { transform: translateY(0.2vh); }

.keypad-icon {
    width: 2.1vh;
    height: 2.1vh;
    min-width: 18px;
    min-height: 18px;
    max-width: 30px;
    max-height: 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.32vh;
}

.keypad-icon span {
    display: block;
    border-radius: 50%;
    background: #24282b;
}

/* =========================================================
   BOTTOM STATUS / LINE
   ========================================================= */

.bottom-line {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 9vh;
    height: 0.22vh;
    min-height: 1px;
    background: var(--line);
    z-index: 90;
}

.status {
    position: fixed;
    left: 2.7vw;
    bottom: 2.8vh;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 1vw;
    color: #ded8d0;
    font-size: clamp(1.6vh, 1.1vw, 2.2vh);
    font-weight: 300;
}

.status-dot {
    width: 2vh;
    height: 2vh;
    min-width: 14px;
    min-height: 14px;
    border-radius: 50%;
    background: #8a9a68;
    box-shadow: 0 0 0.8vh rgba(138, 154, 104, 0.2);
}

.status-label {
    font-weight: 500;
    margin-right: 0.2vw;
}

.bottom-sep-logo {
    position: fixed;
    right: 1.6vw;
    bottom: 2.6vh;
    width: 4.26vh;
    height: 3.7vh;
    min-width: 30px;
    min-height: 25px;
    background: transparent;
    z-index: 100;
    cursor: pointer;
}

.info-button {
    position: fixed;
    right: 1.6vw;
    bottom: 2.6vh;
    width: 3.3vh;
    height: 3.3vh;
    min-width: 25px;
    min-height: 25px;
    border: 0.2vh solid #e7e2dc;
    border-radius: 50%;
    color: #e7e2dc;
    background: transparent;
    font-family: Georgia, serif;
    font-size: 2vh;
    line-height: 1;
    z-index: 100;
    cursor: pointer;
}

/* =========================================================
   NUMERIC KEYPAD
   ========================================================= */

#loginKartica {
    position: fixed;
    left: 50%;
    top: 40%;
    transform: translate(-50%, -50%);

    width: min(400px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);

    z-index: 21;
}


/* ---------------------------------------------------------
   UID + PIN
   --------------------------------------------------------- */

.login-inputs {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.65vh, 8px);
}


.login-keypad {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(4px, 0.65vh, 8px);
}

.login-input {
    display: block;
    width: 100%;
    height: clamp(44px, min(5.5vh, 12vw), 68px);
    min-height: 0;
    border: 1px solid rgba(145, 108, 77, 0.45);
    border-radius: clamp(9px, 1vw, 14px);
    background: rgba(238, 234, 228, 0.96);
    color: #24272a;
    text-align: center;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(20px, min(3vh, 5vw), 34px);
    font-weight: 400;
    outline: none;
    box-shadow: 0 4px 9px rgba(0, 0, 0, 0.18);
}

.login-input::placeholder {
    color: #77716b;
    opacity: 1;
}

.kdugme {
    position: relative;
    width: 100%;
    height: clamp(48px, min(7vh, 8vw), 82px);
    min-height: 0;
    padding: 0 4px 0.35vh;
    border: 1px solid rgba(145, 108, 77, 0.45);
    border-radius: clamp(10px, 1vw, 16px);
    background: var(--button-bg);
    color: var(--button-text);
    font-family: "Montserrat", sans-serif;
    font-size: clamp(24px, min(3vw, 4.2vh), 42px);
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.kdugme::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: clamp(4px, 0.45vw, 7px);
    background: linear-gradient(
        90deg,
        #704b31 0%,
        #a87950 20%,
        #c09267 38%,
        #835738 55%,
        #b17d51 74%,
        #704a30 100%
    );
    border-radius: 0 0 clamp(9px, 0.9vw, 15px) clamp(9px, 0.9vw, 15px);
}

.kdugme:hover { background: var(--button-bg-hover); }

.kdugme:active {
    transform: translateY(2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.20);
}

.kdugme-icon i {
    position: relative;
    z-index: 2;
    font-size: clamp(22px, min(2.2vw, 4vh), 32px);
    color: #292c2f;
}
/* ---------------------------------------------------------
   NUMERIC KEYPAD
   --------------------------------------------------------- */

.login-keypad {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: clamp(4px, 0.65vh, 8px);

    margin-top: clamp(4px, 0.65vh, 8px);
}

/* =========================================================
   CARD ICON
   ========================================================= */

.card-icon {
    width: 2.4vw;
    height: 2.4vw;
    min-width: 28px;
    min-height: 28px;
    max-width: 42px;
    max-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #25282b;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

.login-error {
    position: fixed;
    left: 50%;
    bottom: 10.2vh;
    transform: translateX(-50%);
    z-index: 100;
    width: 90vw;
    text-align: center;
    font-size: clamp(1.55vh, 1.15vw, 2.2vh);
    line-height: 1.2;
    font-weight: 400;
    color: red;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.login-error.show { opacity: 1; }

/* =========================================================
   PORTRAIT
   ========================================================= */

@media (orientation: portrait) {

    .top-left {
        left: 4vw;
        top: 2vh;
    }

    .clock {
        font-size: clamp(4.8vh, 9vw, 7.5vh);
    }

    .date {
        margin-top: 1.3vh;
        font-size: clamp(1.45vh, 2.5vw, 2vh);
        letter-spacing: 0.13em;
    }

    .date-line {
        width: 18vw;
        min-width: 80px;
    }

    .branding {
        top: 2vh;
        right: 3vw;
        width: 34vw;
        min-width: 130px;
        max-width: 250px;
    }

    .sep-logo {
        width: 11vw;
        min-width: 55px;
    }

    .brand-copy {
        margin-top: 1.2vh;
        font-size: clamp(1.25vh, 2.2vw, 1.8vh);
    }

    .login-stage {
        left: 50%;
        top: 49%;
        width: 92vw;
        height: 67vh;
    }

    .card-circle,
    .pause-circle {
        top: 37%;
        width: min(58vw, 34vh);
        height: min(58vw, 34vh);
    }

    .card-hand {
        top: 37%;
        width: min(82vw, 58vh);
    }

    .login-message {
        top: 72%;
    }

    .login-main {
        font-size: clamp(3vh, 7vw, 4.8vh);
    }

    .login-main-pause {
        font-size: clamp(2.1vh, 5.1vw, 3.6vh);
    }

    .login-sub {
        font-size: clamp(1.65vh, 4vw, 2.3vh);
    }

    .login-accent {
        width: 13vw;
        margin-top: 1.8vh;
    }

    .wood-rings {
        height: 43vh;
        opacity: 0.5;
    }

    .pin-button {
        left: 3vw;
        bottom: 1.5vh;
        width: 52vw;
        height: 6.8vh;
        border-radius: 2.4vw;
        padding-bottom: 0.6vw;
        font-size: clamp(1.8vh, 4.2vw, 2.5vh);
        gap: 2vw;
    }

    .bottom-line { bottom: 8.8vh; }

    .status {
        left: 4vw;
        bottom: 3vh;
        gap: 2vw;
        font-size: clamp(1.35vh, 2.8vw, 1.9vh);
    }

    .info-button {
        right: 3vw;
        bottom: 2.6vh;
    }

     #loginKartica {
        width: min(400px, calc(100vw - 32px));
        max-width: calc(100vw - 32px);
        top: 40%;
    }

    .login-keypad {
        gap: clamp(4px, 1vw, 8px);
    }

    .login-input {
        height: clamp(44px, min(5.5vh, 12vw), 64px);
    }

    .kdugme {
        height: clamp(48px, min(7vh, 16vw), 72px);
        border-radius: clamp(10px, 2.4vw, 16px);
        font-size: clamp(24px, 7vw, 38px);
    }

    .kdugme-icon i {
        font-size: clamp(21px, 6vw, 30px);
    }
}

/* =========================================================
   VERY SHORT LANDSCAPE
   ========================================================= */

@media (orientation: landscape) and (max-height: 600px) {

    .login-stage {
        top: 50%;
        height: 72vh;
    }

    .card-circle,
    .pause-circle {
        width: 38vh;
        height: 38vh;
    }

    .card-hand { width: 39vw; }

    .login-message { top: 75%; }

    .pin-button { bottom: 5.8vh; }

    .bottom-line { bottom: 6vh; }

    #loginKartica { top: 40%; }

    .login-keypad { gap: 4px; }

    .login-input {
        height: clamp(40px, 6vh, 54px);
    }

    .kdugme {
        height: clamp(44px, 8vh, 58px);
    }
}
