@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&display=swap");

*{
    box-sizing: border-box;
}

body{
    background: #f8e7d6;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: "Fredoka",sans-serif;
    height: 100vh;
    margin: -20px 0 50px;
}

/* PIN Login Styles */
.login-type-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: "Fredoka", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #929292;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.tab-button.active {
    color: #7f5539;
    border-bottom-color: #7f5539;
    background-color: rgba(127, 85, 57, 0.05);
}

.tab-button:hover:not(.active) {
    color: #b4955a;
    background-color: rgba(127, 85, 57, 0.02);
}

.login-section {
    display: none;
}

.login-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* PIN input styling */
#employee-id, #employee-pin {
    width: 100%;
    padding: 15px 20px;
    font-size: 14px;
    letter-spacing: 1px;
}

#employee-pin {
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

body input[pattern="[0-9]{4,6}"] {
    background-image: repeating-linear-gradient(90deg, transparent 0px, transparent 29px, #eee 31px);
}

body input[pattern="[0-9]{4,6}"]:focus {
    background-image: none;
}

h1{
    font-size: bold;
    /* margin: 0; */
    margin-top: 20px;
}

.heding{
    color: #7f5539;
}

h2{
    text-align: center;
}

p{
    font-size: 14px;
    font-weight: 100;
    line-height: 20px;
    letter-spacing: 0.5px;
    margin: 20px 0 30px;
}

span{
    font-size: 12px;
}

a{
    color: var(#7f5539);
    font-size: 14px;
    text-decoration: none;
    margin: 15px 0;
}

button{
    border-radius: 20px;
    color: white;
    background: #b08968;
    border: 1px solid #b08968;
    font-size: 12px;
    font-weight: bold;
    padding: 12px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 80ms ease-in;
}

button:hover{
    cursor: pointer;
    background: #f8e7d6;
    color: #7f5539;
}

button:active{
    transform: scale(0.95);
}

button:focus{
    outline: none;
}

button.ghost{
    background-color: transparent;
    border-color: #f8e7d6;
}

form{
    background-color: #f8e7d6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    text-align: center;
}

input{
    background-color: #f8e7d6;
    border: 1px solid #7f5539;
    border-radius: 11px;
    padding: 12px 15px;
    margin: 10px 0;
    width: 90%;
}

input:focus{
    border: none;
    outline: 3px solid #b08968;
}

.container{
    background-color: #f8e7d6;
    border-radius: 10px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22) ;
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 480px;
}

.form-container{
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.signin-container{
    left: 0;
    width: 50%;
    z-index: 2;
}

.container.right-panel-active .signin-container{
    transform: translateX(100%);
}

.register-container{
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.right-panel-active .register-container{
    transform: translate(100%);
    opacity: 1;
    z-index: 5;
    animation: show 0.6s;
}

@keyframes show{
    0%,
    49.99%{
        opacity: 0;
        z-index: 1;
    }
    50%,
    100%{
        opacity: 1;
        z-index: 5;
    }
}

.overlay-container{
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.container.right-panel-active .overlay-container{
    transform: translateX(-100%);
}

.overlay{
    /* background: rgb(238, 164, 103);
    background: #b08968;
    background: #b08968; */
    background-image: url("../assest/image/logo.png");
    opacity:120%;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 0 0;
    color: white;
    position: relative;
    left: -40%;
    height: 120%;
    width: 120%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.container.right-panel-active .overlay{
    transform: translateX(50%);
}

.overlay-panel{
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.overlay-left{
    transform: translateX(-20%);
}

.container.right-panel-active .overlay-left{
    transform: translateX(0);
}

.overlay-right{
    right: 0;
    transform: translateX(0);
}

.container.right-panel-active .overlay-right{
    transform: translateX(20%);
}

#register:hover{
   color: white;
}

#signIn1:hover{
    color: white;
}

#reg{
    margin-top: 20px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8); /* semi-transparent white */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* make sure it's on top */
    display: none; /* hide it by default */
}

.loader {
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 60px; /* Size of the loader */
    height: 60px; /* Size of the loader */
    animation: spin 1s linear infinite; /* Animation */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* notification message */
.toast {
    visibility: hidden;
    min-width: 250px;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 16px;
    position: fixed;
    z-index: 9999; 
    top: 20px;  
    right: 20px; 
    font-size: 17px;
}
  
.toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}
  
.toast-success {
    background-color: #28a745;
}

.toast-error {
    background-color: #dc3545; 
}
  
@keyframes fadein {
    from {opacity: 0;}
    to {opacity: 1;}
}
  
@keyframes fadeout {
    from {opacity: 1;}
    to {opacity: 0;}
}

/* ========== RESPONSIVE LOGIN PAGE ========== */

/* Tablet Landscape (1024px+) */
@media screen and (min-width: 1024px) {
    .container {
        width: 900px;
        max-width: 90%;
        min-height: 550px;
    }
    
    form {
        padding: 0 60px;
    }
}

/* Tablet Portrait (768px - 1023px) */
@media screen and (max-width: 1023px) and (min-width: 768px) {
    .container {
        width: 100%;
        max-width: 600px;
        min-height: 480px;
    }
    
    form {
        padding: 0 40px;
    }
    
    input {
        width: 95%;
    }
    
    button {
        padding: 10px 30px;
        font-size: 11px;
    }
    
    p {
        font-size: 13px;
        margin: 15px 0 20px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
}

/* Large Mobile / Small Tablet (481px - 767px) */
@media screen and (max-width: 767px) and (min-width: 481px) {
    body {
        height: auto;
        min-height: 100vh;
        padding: 20px;
        margin: 0;
        justify-content: flex-start;
    }
    
    .container {
        width: 100%;
        max-width: 500px;
        min-height: 500px;
        margin: 20px auto;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    }
    
    .form-container {
        position: static;
        width: 100% !important;
        transform: none !important;
    }
    
    .signin-container {
        left: 0;
        width: 100%;
        z-index: 2;
    }
    
    .register-container {
        left: 0;
        width: 100%;
        opacity: 0;
        z-index: 1;
        display: none;
    }
    
    .container.right-panel-active .register-container {
        display: block;
        opacity: 1;
        z-index: 2;
    }
    
    .container.right-panel-active .signin-container {
        display: none;
    }
    
    .overlay-container {
        display: none;
    }
    
    form {
        padding: 0 30px;
        min-height: auto;
        height: auto;
    }
    
    h1 {
        font-size: 1.3rem;
        margin: 15px 0 10px;
    }
    
    p {
        font-size: 12px;
        margin: 12px 0 18px;
    }
    
    input {
        width: 100%;
        padding: 11px 15px;
        font-size: 1rem; /* Prevents iOS zoom */
        margin: 8px 0;
        border-radius: 8px;
    }
    
    input:focus {
        outline: none;
        border: 2px solid #7f5539;
        box-shadow: 0 0 5px rgba(127, 85, 57, 0.2);
    }
    
    button {
        padding: 11px 30px;
        font-size: 12px;
        margin-top: 10px;
        min-height: 44px;
        border-radius: 25px;
        width: auto;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    button:active {
        transform: scale(0.96);
    }
    
    .login-type-tabs {
        margin-bottom: 20px;
        padding: 0 -30px;
    }
    
    .tab-button {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    #employee-pin {
        font-size: 20px;
        letter-spacing: 3px;
        text-align: center;
    }
    
    a {
        font-size: 12px;
        margin: 12px 0;
    }
    
    span {
        font-size: 11px;
    }
}

/* Mobile Devices (< 481px) */
@media screen and (max-width: 480px) {
    body {
        background: #f8e7d6;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        font-family: "Fredoka", sans-serif;
        height: auto;
        min-height: 100vh;
        margin: 0;
        padding: 15px;
    }
    
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    .container {
        background-color: #f8e7d6;
        border-radius: 15px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        position: relative;
        overflow: hidden;
        width: 100%;
        max-width: 100%;
        min-height: auto;
        margin: 20px auto;
    }
    
    .form-container {
        position: static;
        top: auto;
        height: auto;
        transition: none;
    }
    
    .signin-container {
        left: 0;
        width: 100%;
        z-index: 2;
    }
    
    .container.right-panel-active .signin-container {
        transform: none;
        display: none;
    }
    
    .register-container {
        left: 0;
        width: 100%;
        opacity: 1;
        z-index: 1;
        display: none;
    }
    
    .container.right-panel-active .register-container {
        transform: none;
        opacity: 1;
        z-index: 2;
        display: block;
    }
    
    .overlay-container {
        display: none !important;
    }
    
    form {
        background-color: #f8e7d6;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        padding: 25px 20px;
        height: auto;
        text-align: center;
        min-height: auto;
    }
    
    h1 {
        font-size: 1.25rem;
        margin: 10px 0 5px;
        color: #7f5539;
        font-weight: 600;
    }
    
    .login-description,
    p {
        font-size: 12px;
        font-weight: 400;
        line-height: 18px;
        margin: 10px 0 15px;
        color: #666;
    }
    
    input {
        background-color: white;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 12px 15px;
        margin: 8px 0;
        width: 100%;
        font-size: 1rem; /* Prevents iOS zoom */
        font-family: "Fredoka", sans-serif;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    input:focus {
        border: 2px solid #7f5539;
        outline: none;
        box-shadow: 0 0 8px rgba(127, 85, 57, 0.3);
        background-color: #fff;
    }
    
    #employee-pin {
        font-family: 'Courier New', monospace;
        letter-spacing: 2px;
        text-align: center;
        font-size: 18px;
        font-weight: 600;
    }
    
    button {
        border-radius: 8px;
        color: white;
        background: #b08968;
        border: none;
        font-size: 13px;
        font-weight: 600;
        padding: 12px 24px;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        transition: all 0.2s ease;
        width: 100%;
        margin-top: 5px;
        min-height: 44px;
        cursor: pointer;
    }
    
    button:active {
        background: #9d7452;
        transform: scale(0.98);
    }
    
    button:hover {
        background: #9d7452;
    }
    
    button.ghost {
        background-color: transparent;
        border: 1px solid #b08968;
        color: #b08968;
    }
    
    button.ghost:hover {
        background-color: rgba(176, 137, 104, 0.1);
    }
    
    .login-type-tabs {
        display: flex;
        margin-bottom: 15px;
        border-bottom: 2px solid #ddd;
        gap: 0;
    }
    
    .tab-button {
        flex: 1;
        padding: 10px 12px;
        background: transparent;
        border: none;
        cursor: pointer;
        font-family: "Fredoka", sans-serif;
        font-size: 12px;
        font-weight: 500;
        color: #999;
        transition: all 0.2s ease;
        border-bottom: 3px solid transparent;
    }
    
    .tab-button.active {
        color: #7f5539;
        border-bottom-color: #7f5539;
        background-color: rgba(127, 85, 57, 0.05);
    }
    
    a {
        color: #2563eb;
        font-size: 12px;
        text-decoration: none;
        margin: 10px 0;
        display: inline-block;
    }
    
    span {
        font-size: 11px;
        color: #999;
    }
    
    .loading-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.4);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 99999;
        display: none;
    }
    
    .loader {
        border: 6px solid #f3f3f3;
        border-top: 6px solid #b08968;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        animation: spin 1s linear infinite;
    }
    
    .toast {
        min-width: auto;
        width: 85%;
        left: 7.5%;
        right: auto;
        padding: 12px 15px;
        border-radius: 8px;
        font-size: 13px;
        bottom: auto;
        top: 15px;
    }
}

/* Extra small devices (< 361px) */
@media screen and (max-width: 360px) {
    body {
        padding: 10px;
    }
    
    .container {
        margin: 15px auto;
        border-radius: 12px;
    }
    
    form {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 1.1rem;
    }
    
    p {
        font-size: 11px;
    }
    
    input {
        padding: 10px 12px;
        font-size: 14px;
        margin: 6px 0;
        border-radius: 6px;
    }
    
    button {
        padding: 10px 15px;
        font-size: 12px;
        min-height: 40px;
    }
    
    #employee-pin {
        font-size: 16px;
        letter-spacing: 1px;
    }
}
  
  
  
  
