* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    text-align: center;
    padding: 2rem;
}

.logo {
    width: 300px;
    max-width: 80vw;
    height: auto;
    margin-bottom: 2rem;
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.btn {
    display: block;
    width: 250px;
    padding: 16px 32px;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-login {
    background-color: #e53935;
    color: white;
}

.btn-login:hover {
    background-color: #c62828;
    transform: translateY(-2px);
}

/* Employee Login */
.login-container {
    text-align: center;
    width: 90%;
    max-width: 400px;
}

.login-logo {
    width: 150px;
    margin-bottom: 1.5rem;
}

.login-container h2 {
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 600;
}

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-container input {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.login-container input:focus {
    border-color: #e53935;
}

.login-container button[type="submit"] {
    padding: 12px;
    background-color: #e53935;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-container button[type="submit"]:hover {
    background-color: #c62828;
}

#errorMsg {
    color: #e53935;
    font-size: 0.9rem;
    margin-top: 1rem;
    display: none;
}

/* Employee Container */
#employeeContainer {
    text-align: center;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.employee-logo {
    width: 120px;
    margin-bottom: 1rem;
}

#employeeTitle {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
    width: 100%;
}

.date-search {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-date-input {
    width: 60px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    font-family: inherit;
    text-align: center;
}

.search-date-input:focus {
    border-color: #e53935;
}

.date-sep {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.section-title {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
    text-align: left;
    width: 100%;
    padding-left: 0.5rem;
    border-bottom: 2px solid #e53935;
    padding-bottom: 0.5rem;
}

.cards-list {
    list-style: none;
    padding: 0;
    background: #f9f9f9;
    border-radius: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #eee;
    max-height: 400px;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cards-list::-webkit-scrollbar {
    display: none;
}

.cards-list li {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 1rem;
    text-align: left;
    transition: background-color 0.2s;
    cursor: pointer;
}

.cards-list li .card-week {
    display: block;
    font-weight: 600;
    font-size: 1rem;
}

.cards-list li .card-date {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.2rem;
}

.cards-list li:last-child {
    border-bottom: none;
}

.cards-list li:hover {
    background-color: #f0f0f0;
}

/* Card View */
#cardViewContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.time-card {
    border: 2px solid #333;
    padding: 2rem;
    background: #fff;
    max-width: 800px;
    margin: 0 auto;
}

.time-card h1 {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    color: #333;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.card-fields {
    flex: 1;
}

.card-fields p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: #333;
}

.card-fields span {
    display: inline-block;
    min-width: 150px;
    border-bottom: 1px solid #333;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: #333;
}

.card-logo {
    width: 100px;
    height: auto;
    display: block;
    margin: 0 auto 1rem auto;
}

.hours-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.hours-table th,
.hours-table td {
    border: 1px solid #333;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.hours-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.hours-table .day-col {
    width: 100px;
    text-align: left;
    padding-left: 0.75rem;
}

.hours-table .total-row td {
    font-weight: 700;
    background-color: #f5f5f5;
}

.amount-section {
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

.amount-section p {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.amount-section span {
    display: inline-block;
    min-width: 200px;
    border-bottom: 1px solid #333;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: #333;
}

.menu-btn {
    padding: 14px 32px;
    background-color: #e53935;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}

.menu-btn:hover {
    background-color: #c62828;
}

#goBackBtn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 1.5rem auto 0 auto;
    padding: 14px 32px;
    background-color: #e53935;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
    text-align: center;
    box-sizing: border-box;
}

#goBackBtn:hover {
    background-color: #c62828;
}

/* Mobile portrait responsive card view */
@media (max-width: 600px) and (orientation: portrait) {
    #cardViewContainer {
        padding: 0.5rem;
    }

    #cardViewContainer .time-card {
        padding: 1rem;
        border-radius: 12px;
        border-width: 1px;
    }

    #cardViewContainer .card-logo {
        width: 200px;
        height: auto;
        display: block;
        margin: 0 auto 1rem auto;
    }

    #cardViewContainer .time-card h1 {
        font-size: 0.95rem;
        letter-spacing: 0.5px;
        margin-bottom: 1rem;
        text-align: center;
    }

    #cardViewContainer .card-header {
        flex-direction: column;
        align-items: center;
        margin-bottom: 1rem;
    }

    #cardViewContainer .card-fields {
        width: 100%;
    }

    #cardViewContainer .card-fields p {
        font-size: 0.85rem;
        text-align: center;
        margin-bottom: 0.4rem;
    }

    #cardViewContainer .card-fields span {
        min-width: 130px;
        font-size: 0.85rem;
        text-align: center;
        border-bottom: 1px solid #333;
    }

    #cardViewContainer .hours-table {
        font-size: 0.7rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 auto;
        width: 100%;
    }

    #cardViewContainer .hours-table thead {
        display: table-header-group;
    }

    #cardViewContainer .hours-table th,
    #cardViewContainer .hours-table td {
        padding: 0.4rem 0.3rem;
        font-size: 0.7rem;
        white-space: nowrap;
        text-align: center;
    }

    #cardViewContainer .hours-table .day-col {
        width: 60px;
        padding-left: 0.4rem;
        text-align: left;
    }

    #cardViewContainer .hours-table th {
        font-size: 0.65rem;
        background-color: #f5f5f5;
        font-weight: 600;
    }

    #cardViewContainer .amount-section {
        flex-direction: column;
        align-items: center;
        gap: 0.4rem;
        text-align: center;
        margin-top: 0.75rem;
    }

    #cardViewContainer .amount-section p {
        font-size: 0.9rem;
        text-align: center;
    }

    #cardViewContainer .amount-section span {
        min-width: 150px;
        font-size: 0.9rem;
        text-align: center;
        border-bottom: 1px solid #333;
    }

    #goBackBtn {
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 1rem auto 0 auto;
        padding: 14px 28px;
        font-size: 1rem;
        border-radius: 10px;
        text-align: center;
        box-sizing: border-box;
    }
}
