.hram-kiosk {
    --hram-brand: #f97316;
    --hram-brand-light: #fb923c;
    --hram-brand-dark: #c2410c;
    --hram-bg: #0d0d14;
    --hram-card: #16161f;
    --hram-surface: #1e1e2b;
    --hram-surface-2: #23233250;
    --hram-text: #e8e8f0;
    --hram-muted: #94a3b8;
    --hram-border: #2a2a3c;
    --hram-success: #34d399;
    --hram-danger: #f87171;
    --hram-warning: #fbbf24;

    box-sizing: border-box;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #1f1409 0%, #14101a 55%, var(--hram-bg) 100%);
    padding: 24px 16px 60px;
    font-family: "Tajawal", "Cairo", "Segoe UI", Tahoma, sans-serif;
    position: relative;
}

.hram-kiosk *, .hram-kiosk *::before, .hram-kiosk *::after {
    box-sizing: border-box;
}

.hram-kiosk__inner {
    width: 100%;
    max-width: 560px;
    background: var(--hram-card);
    border: 1px solid var(--hram-border);
    border-radius: 24px;
    box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
    padding: 32px 28px 36px;
    position: relative;
    overflow: hidden;
}

.hram-kiosk__inner::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--hram-brand), var(--hram-warning), var(--hram-brand));
}

.hram-kiosk__header {
    text-align: center;
    margin-bottom: 20px;
}

.hram-kiosk__logo {
    max-height: 64px;
    margin-bottom: 8px;
}

.hram-kiosk__company {
    font-size: 22px;
    font-weight: 800;
    color: var(--hram-text);
    margin: 4px 0 2px;
}

.hram-kiosk__subtitle {
    color: var(--hram-muted);
    font-size: 14px;
    margin: 0;
}

.hram-kiosk__footer {
    margin-top: 18px;
    color: rgba(255,255,255,0.35);
    font-size: 12px;
}

.hram-step {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: hram-fade .25s ease;
}

.hram-step--active {
    display: flex;
}

@keyframes hram-fade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.hram-step__label {
    font-size: 17px;
    font-weight: 700;
    color: var(--hram-text);
    margin: 4px 0 20px;
}

/* PIN dots + keypad */
.hram-pin-dots {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-bottom: 24px;
}

.hram-pin-dots span {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--hram-border);
    background: transparent;
    transition: all .15s ease;
}

.hram-pin-dots span.filled {
    background: var(--hram-brand);
    border-color: var(--hram-brand);
    transform: scale(1.1);
}

.hram-pin-dots.hram-shake {
    animation: hram-shake .4s;
}

@keyframes hram-shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-8px); }
    40%, 60% { transform: translateX(8px); }
}

.hram-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 320px;
}

.hram-keypad button {
    padding: 18px 0;
    font-size: 22px;
    font-weight: 700;
    border-radius: 16px;
    border: 1px solid var(--hram-border);
    background: var(--hram-surface);
    color: var(--hram-text);
    cursor: pointer;
    transition: transform .1s ease, background .15s ease, border-color .15s ease;
}

.hram-keypad button:active {
    transform: scale(0.94);
    background: var(--hram-brand);
    border-color: var(--hram-brand);
    color: #fff;
}

.hram-key--ghost {
    font-size: 14px !important;
    color: var(--hram-muted) !important;
}

/* Search + employee grid */
.hram-search {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--hram-border);
    font-size: 16px;
    margin-bottom: 18px;
    background: var(--hram-surface);
    color: var(--hram-text);
}

.hram-search::placeholder { color: var(--hram-muted); }

.hram-search:focus {
    outline: none;
    border-color: var(--hram-brand);
    box-shadow: 0 0 0 1px var(--hram-brand);
}

.hram-employee-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-height: 46vh;
    overflow-y: auto;
    padding-bottom: 4px;
}

.hram-employee-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border-radius: 16px;
    border: 1px solid var(--hram-border);
    background: var(--hram-surface);
    cursor: pointer;
    transition: all .15s ease;
}

.hram-employee-card:active,
.hram-employee-card:hover {
    transform: scale(0.98);
    border-color: var(--hram-brand);
    background: var(--hram-card);
}

.hram-employee-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--hram-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    overflow: hidden;
}

.hram-employee-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hram-employee-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--hram-text);
}

.hram-employee-dept {
    font-size: 12px;
    color: var(--hram-muted);
}

.hram-empty {
    grid-column: 1 / -1;
    color: var(--hram-muted);
    padding: 24px 0;
}

/* Camera */
.hram-camera {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 3 / 4;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    margin-bottom: 18px;
    position: relative;
}

.hram-camera video,
.hram-camera img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.hram-camera__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.hram-hidden {
    display: none !important;
}

/* Buttons */
.hram-btn {
    padding: 14px 22px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: transform .1s ease, opacity .15s ease;
}

.hram-btn:active {
    transform: scale(0.96);
}

.hram-btn--primary {
    background: linear-gradient(135deg, var(--hram-brand), var(--hram-brand-dark));
    color: #fff;
    box-shadow: 0 4px 14px rgba(249,115,22,0.35);
}

.hram-btn--ghost {
    background: var(--hram-surface);
    color: var(--hram-text);
    border: 1px solid var(--hram-border);
}

.hram-btn--text {
    background: transparent;
    color: var(--hram-muted);
}

/* Spinner */
.hram-spinner {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 4px solid var(--hram-border);
    border-top-color: var(--hram-brand);
    animation: hram-spin 0.8s linear infinite;
    margin-bottom: 18px;
}

@keyframes hram-spin {
    to { transform: rotate(360deg); }
}

/* Success */
.hram-success-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--hram-success);
    color: #fff;
    font-size: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    animation: hram-pop .3s ease;
}

.hram-success-icon--warn {
    background: var(--hram-warning);
    font-weight: 800;
}

@keyframes hram-pop {
    from { transform: scale(0.4); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Punctuality (late / early leave) notice on the success screen */
.hram-punctuality-notice {
    margin: 4px 0 10px;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    max-width: 90%;
    line-height: 1.5;
    border: 1px solid transparent;
    animation: hram-pop .3s ease;
}

.hram-punctuality-notice--late {
    background: rgba(251,191,36,0.14);
    color: var(--hram-warning);
    border-color: rgba(251,191,36,0.4);
}

.hram-punctuality-notice--early_leave {
    background: rgba(248,113,113,0.14);
    color: var(--hram-danger);
    border-color: rgba(248,113,113,0.4);
}

.hram-success-time {
    font-size: 26px;
    font-weight: 800;
    color: var(--hram-text);
    margin: 0 0 6px;
}

.hram-reset-countdown {
    color: var(--hram-muted);
    font-size: 13px;
}

/* Locked */
.hram-lock-icon {
    font-size: 44px;
    margin-bottom: 12px;
}

/* Toast */
.hram-kiosk__toast {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%) translateY(-140%);
    background: var(--hram-danger);
    color: #fff;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    max-width: 90%;
    text-align: center;
    z-index: 20;
    transition: transform .25s ease;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.hram-kiosk__toast.hram-toast--show {
    transform: translateX(-50%) translateY(0);
}

.hram-kiosk__toast.hram-toast--success {
    background: var(--hram-success);
}

@media (max-width: 480px) {
    .hram-kiosk__inner {
        padding: 24px 18px 30px;
        border-radius: 18px;
    }
    .hram-employee-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 700px) {
    .hram-kiosk__inner {
        max-width: 640px;
        padding: 44px 48px 48px;
    }
    .hram-employee-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
