*{
    box-sizing:border-box;
}


body{

    margin:0;

    font-family:Arial, Helvetica, sans-serif;

    background:#f4f6f8;

}



#app{

    min-height:100vh;

}



/***************************************
 LOGIN
***************************************/


.login-screen{

    text-align:center;

    width:100%;

    max-width:420px;

    padding:30px;

    margin:auto;

}



.logo{

    width:220px;

    max-width:80%;

    margin-bottom:30px;

}



h1{

    font-size:32px;

    margin:10px 0;

}



.subtitle{

    font-size:18px;

    color:#666;

    margin-bottom:35px;

}



.login-buttons{

    display:flex;

    flex-direction:column;

    gap:20px;

}



.login-card{

    border:none;

    border-radius:20px;

    padding:25px;

    font-size:22px;

    cursor:pointer;

    background:white;

    box-shadow:
    0 5px 20px rgba(0,0,0,0.12);

    transition:.2s;

}



.login-card:hover{

    transform:translateY(-3px);

}



.icon{

    font-size:45px;

    margin-bottom:10px;

}



/***************************************
 EMPLOYEE HOME
***************************************/


.employee-home{

    min-height:100vh;

    display:flex;

    flex-direction:column;

    align-items:center;

    padding:25px;

}



.home-logo{

    width:180px;

    margin-bottom:20px;

}



.welcome{

    text-align:center;

}



.welcome h1{

    margin:0;

    font-size:26px;

}



.welcome h2{

    margin:8px;

}



.status-card{

    width:85%;

    max-width:360px;

    padding:25px;

    border-radius:25px;

    background:white;

    box-shadow:
    0 5px 20px rgba(0,0,0,.1);

    text-align:center;

}



.status-row{

    display:flex;

    justify-content:space-between;

    margin-top:15px;

}



.status{

    font-size:30px;

    margin:20px;

}



.hours{

    font-size:22px;

}



.punch-button,
.punch-main{

    margin-top:25px;

    width:85%;

    max-width:330px;

    padding:20px;

    border:none;

    border-radius:30px;

    font-size:22px;

    cursor:pointer;

}



.menu-grid{

    display:grid;

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

    gap:15px;

    width:90%;

    max-width:380px;

    margin-top:25px;

}



.menu-card{

    padding:20px 10px;

    text-align:center;

    border-radius:18px;

    background:white;

    font-size:25px;

}



.menu-card span{

    display:block;

    font-size:13px;

    margin-top:10px;

}

.punch-main.punch-start {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
}

.punch-main.punch-start:hover {
    background: #15803d;
    border-color: #15803d;
}

.punch-main.punch-finish {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

.punch-main.punch-finish:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.punch-main:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.punch-main.punch-summary {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.punch-main {
    transition:
        transform 0.12s ease,
        opacity 0.12s ease,
        background-color 0.2s ease;
}

.punch-main:active {

    transform: scale(0.94);

    box-shadow:
        0 4px 12px
        rgba(15, 23, 42, 0.18);

}

.punch-main.punch-processing {
    transform: scale(0.98);
    opacity: 0.88;
    cursor: wait;
}

.punch-main:disabled {
    cursor: wait;
}

.punch-spinner {
    display: inline-block;
    width: 17px;
    height: 17px;
    margin-right: 8px;
    vertical-align: -3px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: punchSpinner 0.7s linear infinite;
}

@keyframes punchSpinner {

    to {
        transform: rotate(360deg);
    }

}


/***************************************
 MAIN APP
***************************************/


.employee-app{

    min-height:100vh;

    display:flex;

    flex-direction:column;

    justify-content:space-between;

}



.app-header{

    text-align:center;

    padding:20px;

}



.app-logo{

    width:110px;

    max-width:35vw;

}



.user-name{

    margin-top:10px;

    font-size:20px;

    font-weight:bold;

}



.attendance-area{

    flex:1;

    display:flex;

    flex-direction:column;

    align-items:center;

    justify-content:center;

}



/***************************************
 BOTTOM NAV
***************************************/


.bottom-nav{

    display:flex;

    justify-content:space-around;

    padding:15px;

    background:white;

}



.nav-item{

    border:none;

    background:none;

    display:flex;

    flex-direction:column;

    align-items:center;

    font-size:12px;

}



.nav-item span{

    font-size:25px;

}



/***************************************
 LOADER
***************************************/

.loader-screen{

    width:100%;
    min-height:100vh;
    min-height:100dvh;

    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;

    padding:
        env(safe-area-inset-top)
        24px
        env(safe-area-inset-bottom);

    background:#ffffff;

    color:#172033;

}


.loader-logo{

    width:150px;
    height:150px;

    object-fit:contain;

    padding:20px;

    background:#ffffff;

    border-radius:32px;

    box-shadow:
        0 12px 35px
        rgba(15, 23, 42, 0.12);

    animation:
        breathing
        1.8s
        infinite
        ease-in-out;

}


.loader-text{

    margin-top:28px;

    font-size:16px;
    font-weight:600;

    color:#526071;

}


@keyframes breathing{

    0%{

        transform:scale(0.97);
        opacity:0.82;

    }

    50%{

        transform:scale(1.03);
        opacity:1;

    }

    100%{

        transform:scale(0.97);
        opacity:0.82;

    }

}



/***************************************
 RECEIPT
***************************************/


.receipt-wrapper{

    padding:20px;

}



.attendance-receipt{

    background:white;

    border-radius:20px;

    padding:25px;

    box-shadow:
    0 8px 25px rgba(0,0,0,.15);

}



.receipt-header{

    text-align:center;

    margin-bottom:25px;

}



.receipt-header h2{

    margin:0;

}



.receipt-id{

    background:#f1f5f9;

    border-radius:15px;

    padding:15px;

    text-align:center;

    margin-bottom:20px;

}



.receipt-id span{

    display:block;

    font-size:13px;

}



.receipt-id strong{

    font-size:20px;

}



.receipt-row{

    display:flex;

    justify-content:space-between;

    padding:12px 0;

    border-bottom:1px solid #eee;

}



.receipt-comment{

    margin-top:20px;

    background:#fafafa;

    border-radius:15px;

    padding:15px;

}



.receipt-comment p{

    margin-top:10px;

}



.success-message{

    margin-top:25px;

    text-align:center;

    font-weight:bold;

}

/***************************************
 LANGUAGE SELECTOR
***************************************/


.language-footer{

    margin-top:35px;

    display:flex;

    justify-content:center;

}



.language-select-button{

    background:transparent;

    border:none;

    font-size:14px;

    color:#555;

    cursor:pointer;

    padding:8px 14px;

    border-radius:20px;

}



.language-select-button:hover{

    background:rgba(0,0,0,.05);

}



/***************************************
 MODALS
***************************************/


#app-modal{

    position:fixed;

    inset:0;

    z-index:9999;

}



.modal-overlay{

    width:100%;

    height:100%;

    background:
    rgba(0,0,0,.35);

    display:flex;

    justify-content:center;

    align-items:flex-end;

}



.modal-window{

    width:100%;

    max-width:500px;

    background:white;

    border-radius:28px 28px 0 0;

    padding:25px;

    animation:
    slideUp .35s ease forwards;

    box-shadow:
    0 -5px 25px rgba(0,0,0,.15);

}



@keyframes slideUp{

    from{

        transform:translateY(100%);

    }


    to{

        transform:translateY(0);

    }

}



.modal-handle{

    width:50px;

    height:5px;

    background:#ccc;

    border-radius:10px;

    margin:0 auto 20px;

}



.settings-button{

    width:100%;

    padding:15px;

    margin-top:12px;

    border:none;

    border-radius:14px;

    font-size:16px;

    background:#f5f5f5;

    text-align:left;

    cursor:pointer;

}



.settings-button:active{

    transform:scale(.98);

}



.settings-button.logout{

    color:#b00020;

}



.language-list{

    max-height:60vh;

    overflow-y:auto;

}



.confirm-window{

    background:white;

    width:85%;

    max-width:350px;

    padding:25px;

    border-radius:20px;

    text-align:center;

    animation:
    popupIn .25s ease;

}



.confirm-actions{

    display:flex;

    gap:15px;

    justify-content:center;

    margin-top:20px;

}



.danger{

    background:#c62828;

    color:white;

}



@keyframes popupIn{

    from{

        transform:scale(.8);

        opacity:0;

    }


    to{

        transform:scale(1);

        opacity:1;

    }

}



/***************************************
 APPROVAL SUMMARY
***************************************/


.approval-summary{

    background:#f5f5f5;

    border-radius:12px;

    padding:15px;

    margin:20px 0;

}



.approval-summary h3{

    text-align:center;

    margin-bottom:15px;

}



.summary-line{

    display:flex;

    justify-content:space-between;

    padding:8px 0;

    font-size:16px;

}



.summary-line.total{

    border-top:1px solid #ccc;

    margin-top:10px;

    padding-top:12px;

    font-size:18px;

}



/***************************************
 DOCUMENTS PAGE
***************************************/


.documents-page{

    padding:15px;

    padding-bottom:90px;

    direction:rtl;

}



/***************************************
 TOP BAR
***************************************/


.documents-topbar{

    display:flex;

    align-items:center;

    justify-content:center;

    position:relative;

    margin-bottom:20px;

}



.documents-topbar h1{

    margin:0;

    font-size:22px;

    font-weight:700;

}



.report-back{

    position:absolute;

    left:0;

    width:42px;

    height:42px;

    border-radius:50%;

    border:none;

    background:#f1f1f1;

    font-size:24px;

    cursor:pointer;

}



/***************************************
 GRID / LIST SWITCH
***************************************/


.documents-toolbar{

    display:flex;

    justify-content:center;

    gap:10px;

    margin-bottom:20px;

}



.documents-toolbar button{

    border:none;

    padding:10px 20px;

    border-radius:20px;

    background:#eeeeee;

    cursor:pointer;

    font-size:14px;

}



.documents-toolbar button:active{

    background:#1f7aec;

    color:white;

}



/***************************************
 GRID VIEW
***************************************/


.documents-grid{

    display:grid;

    grid-template-columns:
    repeat(2,1fr);

    gap:15px;

}



.document-tile{

    background:white;

    border-radius:16px;

    padding:12px;

    box-shadow:

    0 4px 12px rgba(0,0,0,.12);

    position:relative;

    text-align:center;

}



.document-thumb{

    height:130px;

    border-radius:12px;

    background:#f5f5f5;

    display:flex;

    justify-content:center;

    align-items:center;

    overflow:hidden;

    margin-bottom:10px;

}



.document-thumb img{

    width:100%;

    height:100%;

    object-fit:cover;

}



.pdf-preview{

    font-size:60px;

}



.tile-number{

    position:absolute;

    top:8px;

    right:8px;

    width:28px;

    height:28px;

    border-radius:50%;

    background:#1f7aec;

    color:white;

    display:flex;

    justify-content:center;

    align-items:center;

    font-weight:bold;

}



.tile-name{

    font-size:13px;

    min-height:40px;

    overflow:hidden;

    margin-bottom:10px;

}



.tile-button{

    display:block;

    width:100%;

    padding:8px;

    border-radius:12px;

    background:#1f7aec;

    color:white;

    text-decoration:none;

    font-size:13px;

}



/***************************************
 LIST VIEW
***************************************/


.documents-list{

    display:flex;

    flex-direction:column;

    gap:10px;

}



.document-list-row{

    background:white;

    border-radius:12px;

    padding:14px;

    display:flex;

    align-items:center;

    gap:10px;

    box-shadow:

    0 3px 10px rgba(0,0,0,.1);

}



.list-number{

    font-weight:bold;

    font-size:18px;

    min-width:30px;

}



.document-list-row a{

    flex:1;

    color:#333;

    text-decoration:none;

    overflow:hidden;

    text-overflow:ellipsis;

    white-space:nowrap;

}



.empty-documents{

    text-align:center;

    padding:40px;

    color:#777;

    font-size:18px;

}



/***************************************
 MOBILE
***************************************/


@media(max-width:600px){


    .documents-grid{

        grid-template-columns:
        repeat(2,1fr);

    }


    .document-thumb{

        height:110px;

    }


    .tile-name{

        font-size:12px;

    }

}

/* ==========================
   BOTTOM NAV HOME LOGO
========================== */


.bottom-nav{

    display:flex;

    justify-content:space-around;

    align-items:center;

    padding:12px 10px;

    background:white;

    box-shadow:
    0 -3px 15px rgba(0,0,0,.08);

}



.nav-home{

    width:70px;

    height:70px;

    border-radius:50%;

    border:none;

    background:white;

    display:flex;

    align-items:center;

    justify-content:center;

    margin-top:-35px;

    box-shadow:

    0 5px 20px rgba(0,0,0,.2);

    cursor:pointer;

}



.nav-logo{


    width:55px;

    height:55px;

    object-fit:contain;


}



.nav-home:active{


    transform:scale(.95);


}

/****************************************
 * APPLICATION INSTALL BANNER
 ****************************************/

.app-install-banner{

    position:fixed;

    left:14px;
    right:14px;
    bottom:
        calc(
            14px +
            env(safe-area-inset-bottom)
        );

    z-index:10000;

    max-width:520px;

    margin:0 auto;

    display:flex;
    align-items:center;
    gap:12px;

    padding:12px 14px;

    background:#ffffff;

    border:
        1px solid
        rgba(15,23,42,0.10);

    border-radius:20px;

    box-shadow:
        0 14px 40px
        rgba(15,23,42,0.22);

    transform:
        translateY(
            calc(
                100% +
                40px
            )
        );

    opacity:0;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;

}


.app-install-banner.visible{

    transform:
        translateY(0);

    opacity:1;

}


.install-banner-icon{

    width:50px;
    height:50px;

    flex-shrink:0;

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

    overflow:hidden;

    border-radius:14px;

    background:#ffffff;

}


.install-banner-icon img{

    width:100%;
    height:100%;

    object-fit:contain;

}


.install-banner-content{

    min-width:0;
    flex:1;

    display:flex;
    flex-direction:column;

    text-align:left;

}


.install-banner-content strong{

    font-size:16px;
    color:#172033;

}


.install-banner-content span{

    margin-top:3px;

    font-size:12px;
    line-height:1.35;

    color:#64748b;

}


.install-banner-button{

    flex-shrink:0;

    min-height:42px;

    padding:0 14px;

    border:none;
    border-radius:13px;

    background:#2563eb;
    color:#ffffff;

    font-size:14px;
    font-weight:700;

    cursor:pointer;

}


.install-banner-button:active{

    transform:scale(0.96);

}


.install-banner-close{

    flex-shrink:0;

    width:30px;
    height:30px;

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

    border:none;
    border-radius:50%;

    background:#f1f5f9;
    color:#64748b;

    font-size:22px;
    line-height:1;

    cursor:pointer;

}


/****************************************
 * IOS INSTALL HELP
 ****************************************/

.ios-install-overlay{

    position:fixed;
    inset:0;

    z-index:11000;

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

    padding:
        20px
        16px
        calc(
            20px +
            env(safe-area-inset-bottom)
        );

    background:
        rgba(
            15,
            23,
            42,
            0.48
        );

}


.ios-install-dialog{

    position:relative;

    width:100%;
    max-width:430px;

    padding:28px 22px 22px;

    background:#ffffff;

    border-radius:28px;

    box-shadow:
        0 20px 60px
        rgba(15,23,42,0.30);

    text-align:center;

}


.ios-install-close{

    position:absolute;

    top:14px;
    right:14px;

    width:34px;
    height:34px;

    border:none;
    border-radius:50%;

    background:#f1f5f9;
    color:#475569;

    font-size:24px;

    cursor:pointer;

}


.ios-install-logo{

    width:82px;
    height:82px;

    object-fit:contain;

    border-radius:20px;

}


.ios-install-dialog h2{

    margin:
        14px
        0
        22px;

    font-size:24px;

    color:#172033;

}


.ios-install-step{

    display:flex;
    align-items:center;
    gap:14px;

    margin-bottom:14px;

    padding:14px;

    border-radius:16px;

    background:#f8fafc;

    text-align:left;

}


.ios-step-number{

    width:34px;
    height:34px;

    flex-shrink:0;

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

    border-radius:50%;

    background:#2563eb;
    color:#ffffff;

    font-weight:700;

}


.ios-install-step p{

    margin:0;

    color:#334155;

    font-size:15px;
    line-height:1.4;

}


.ios-install-done{

    width:100%;

    margin-top:10px;
    padding:15px;

    border:none;
    border-radius:15px;

    background:#2563eb;
    color:#ffffff;

    font-size:16px;
    font-weight:700;

    cursor:pointer;

}


@media(max-width:420px){

    .app-install-banner{

        left:8px;
        right:8px;

        gap:9px;

        padding:10px;

    }


    .install-banner-icon{

        width:44px;
        height:44px;

    }


    .install-banner-button{

        padding:0 10px;

    }


    .install-banner-content span{

        font-size:11px;

    }

}

/****************************************
 * GLOBAL PRESS FEEDBACK
 ****************************************/

button,
.punch-main,
.login-button,
.back-button,
.install-banner-button,
.install-banner-close,
.ios-install-done,
.ios-install-close {

    -webkit-tap-highlight-color: transparent;

    transition:
        transform 0.1s ease,
        opacity 0.1s ease,
        box-shadow 0.1s ease;

    touch-action: manipulation;

}


/****************************************
 * PRESS EFFECT
 ****************************************/

button:active,
.punch-main:active,
.login-button:active,
.back-button:active,
.install-banner-button:active,
.install-banner-close:active,
.ios-install-done:active,
.ios-install-close:active {

    transform: scale(0.96);

    opacity: 0.85;

}


/****************************************
 * DISABLED BUTTON
 ****************************************/

button:disabled {

    transform: none;

    opacity: 0.65;

    cursor: wait;

}

/* R4-H2 Hotfix 10: full-width phone-layout Hebrew comment keyboard. */
.punch-hebrew-keyboard-toggle{
    width:auto;
    margin:6px 0 10px;
    padding:8px 14px;
    border:1px solid #b7c7d6;
    border-radius:9px;
    background:#fff;
    color:#183b56;
    font-weight:700;
}
.punch-hebrew-keyboard{
    display:grid;
    gap:7px;
    width:min(520px,calc(100vw - 16px));
    max-width:none;
    margin:0 0 14px;
    padding:8px 6px;
    position:relative;
    left:50%;
    transform:translateX(-50%);
    box-sizing:border-box;
    border:1px solid #d7e1ea;
    border-radius:12px;
    background:#f6f9fb;
}
.punch-hebrew-keyboard[hidden]{display:none;}
.punch-hebrew-keyboard-row,
.punch-hebrew-keyboard-actions{
    display:flex;
    justify-content:center;
    gap:4px;
}
.punch-hebrew-keyboard button{
    flex:1 1 0;
    min-width:0;
    min-height:48px;
    padding:4px 2px;
    border:1px solid #b9c9d7;
    border-radius:7px;
    background:#fff;
    color:#102f43;
    font-size:21px;
    font-weight:700;
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
    direction:rtl;
}
.punch-hebrew-keyboard button:active{background:#dcecf7;transform:translateY(1px);}
.punch-hebrew-keyboard-actions button:first-child{flex:4;}
.punch-hebrew-keyboard-actions button:last-child{flex:1;min-width:54px;}
