/* ===========================
   RESET
=========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:Arial,Helvetica,sans-serif;
    background:#f3f5f9;
    color:#222;
    min-height:100vh;
}

/* ===========================
   CONTAINER
=========================== */

.container{
    width:min(95%,1400px);
    margin:auto;
    padding:20px;
}

/* ===========================
   HEADER
=========================== */

.header{
    background:linear-gradient(135deg,#2563eb,#0f766e);
    color:#fff;
    text-align:center;
    padding:25px;
    border-radius:16px;
    margin-bottom:25px;
    box-shadow:0 10px 25px rgba(0,0,0,.15);
}

.header h1{
    font-size:32px;
    margin-bottom:10px;
}

.header p{
    opacity:.9;
    font-size:16px;
}

/* ===========================
   CARD
=========================== */

.card{
    background:#fff;
    border-radius:16px;
    padding:25px;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
    margin-bottom:25px;
}

/* ===========================
   SECTION TITLE
=========================== */

.section-title{
    margin-bottom:18px;
    color:#1e293b;
}

/* ===========================
   FORM GRID
=========================== */

.form-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:18px;
}

.form-group{
    display:flex;
    flex-direction:column;
}

.form-group label{
    font-weight:bold;
    margin-bottom:8px;
    color:#334155;
}

.form-group input,
.form-group select,
.form-group textarea{

    width:100%;
    padding:14px;
    border:1px solid #d6dce5;
    border-radius:10px;
    font-size:15px;
    transition:.3s;
    outline:none;
    background:#fff;

}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus{

    border-color:#2563eb;
    box-shadow:0 0 0 4px rgba(37,99,235,.15);

}

/* ===========================
   BUTTONS
=========================== */

button{
    cursor:pointer;
    border:none;
    transition:.3s;
    font-size:15px;
}

.primary-btn,
.success-btn,
.warning-btn,
.not-paid-btn,
.paid-btn{

    padding:14px 22px;
    border-radius:10px;
    color:#fff;
    margin-top:20px;

}

.primary-btn{
    background:#2563eb;
}

.primary-btn:hover{
    background:#1d4ed8;
}

.success-btn{
    background:#16a34a;
}

.success-btn:hover{
    background:#15803d;
}

.warning-btn{
    background:#f59e0b;
}

.warning-btn:hover{
    background:#d97706;
}

.paid-btn{
    background:#059669;
}

.paid-btn:hover{
    background:#047857;
}
.not-paid-btn{
    background:#dc2626;
}

.not-paid-btn:hover{
    background:#b91c1c;
}

/* ===========================
   SUMMARY
=========================== */

.summary-section{

    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
    margin-bottom:30px;

}

.summary-card{

    background:#fff;
    border-radius:16px;
    padding:20px;
    text-align:center;
    box-shadow:0 8px 20px rgba(0,0,0,.08);

}

.summary-card h3{
    color:#64748b;
    font-size:15px;
}

.summary-card h2{

    margin-top:10px;
    color:#2563eb;
    font-size:34px;

}

/* ===========================
   WORKER CARDS
=========================== */

.worker-container{

    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(330px,1fr));
    gap:20px;

}

.worker-card{

    background:#fff;
    border-radius:16px;
    padding:20px;
    box-shadow:0 10px 25px rgba(0,0,0,.08);
    transition:.3s;

}

.worker-card:hover{

    transform:translateY(-6px);

}

.worker-card h3{

    margin-bottom:12px;
    color:#2563eb;

}

.worker-card p{

    margin:8px 0;
    color:#444;

}

.worker-actions{

    display:flex;
    gap:10px;
    margin-top:18px;

}

.worker-actions button{

    flex:1;
    padding:12px;
    border-radius:8px;
    color:#fff;

}

.worker-actions .view{

    background:#2563eb;

}

.worker-actions .work{

    background:#16a34a;

}

.worker-actions .delete{

    background:#ef4848;

}
/* ===========================
   WORKER INFO
=========================== */

.worker-info{

    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:15px;
    margin:20px 0;

}

.worker-info p{

    background:#f8fafc;
    padding:12px;
    border-radius:8px;

}

/* ===========================
   TABLE
=========================== */

table{

    width:100%;
    border-collapse:collapse;
    margin-top:20px;

}

table th{

    background:#2563eb;
    color:#fff;
    padding:14px;

}

table td{

    padding:14px;
    border-bottom:1px solid #e2e8f0;
    text-align:center;

}

table tr:nth-child(even){

    background:#f8fafc;

}

table tr:hover{

    background:#eef4ff;

}

/* ===========================
   PAYMENT
=========================== */

.payment-card{

    text-align:center;

}

.payment-card h1{

    font-size:50px;
    color:#16a34a;
    margin:20px 0;

}

.payment-buttons{

    display:flex;
    gap:20px;
    justify-content:center;
    flex-wrap:wrap;

}

/* ===========================
   HIDDEN
=========================== */

.hidden{

    display:none;

}

/* ===========================
   SCROLLBAR
=========================== */

::-webkit-scrollbar{

    width:10px;

}

::-webkit-scrollbar-thumb{

    background:#2563eb;
    border-radius:20px;

}

::-webkit-scrollbar-track{

    background:#ddd;

}

/* ===========================
   TABLET
=========================== */

@media (max-width:992px){

.summary-section{

grid-template-columns:repeat(2,1fr);

}

.form-grid{

grid-template-columns:1fr;

}

.worker-info{

grid-template-columns:1fr;

}

}

/* ===========================
   MOBILE
=========================== */

@media (max-width:768px){

.container{

padding:12px;

}

.header{

padding:18px;

}

.header h1{

font-size:25px;

}

.card{

padding:18px;

}

.summary-section{

grid-template-columns:1fr;

}

.worker-container{

grid-template-columns:1fr;

}

.payment-buttons{

flex-direction:column;

}

.payment-buttons button{

width:100%;

}

table{

display:block;
overflow-x:auto;
white-space:nowrap;

}

}

/* ===========================
   SMALL MOBILE
=========================== */

@media (max-width:480px){

.header h1{

font-size:21px;

}

.header p{

font-size:14px;

}

.form-group input,
.form-group select{

padding:12px;
font-size:14px;

}

button{

font-size:14px;

}

.summary-card h2{

font-size:28px;

}

.payment-card h1{

font-size:36px;

}

}
/* Small Phones */
@media (max-width:480px){

    .summary-section{
        grid-template-columns:repeat(4,1fr);
        gap:4px;
    }

    .summary-card{
        padding:8px 3px;
        border-radius:8px;
    }

    .summary-card h3{
        font-size:10px;
        line-height:1.2;
    }

    .summary-card h2{
        font-size:16px;
        margin-top:4px;
    }
}
/* Tablet */
@media (max-width:768px){

    .summary-section{
        grid-template-columns:repeat(4,1fr);
        gap:6px;
    }

    .summary-card{
        padding:10px 4px;
    }

    .summary-card h3{
        font-size:11px;
    }

    .summary-card h2{
        font-size:18px;
    }
}

/* ===========================
   HISTORY MODAL
=========================== */

.history-modal{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 9999;
    overflow-y: auto;
}

.history-modal.show{
    display: flex;
}

/* ===========================
   MODAL BOX
=========================== */

.history-box{
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 15px 40px rgba(0,0,0,.25);
    animation: modalFade .3s ease;
}

/* ===========================
   CLOSE BUTTON
=========================== */

#closeHistory{
    position: absolute;
    top: 15px;
    right: 18px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f2f2f2;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    transition: .3s;
}

#closeHistory:hover{
    background: #e53935;
    color: #fff;
}

/* ===========================
   HISTORY CARD
=========================== */

.history-card{
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
    background: #fafafa;
}

.history-card h3{
    margin-bottom: 12px;
    color: #2563eb;
}

.history-card p{
    margin: 8px 0;
    line-height: 1.5;
}

/* ===========================
   TABLE
=========================== */

.history-card table{
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    min-width: 450px;
}

.history-card th,
.history-card td{
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

.history-card th{
    background: #2563eb;
    color: #fff;
}

.history-card tr:nth-child(even){
    background: #f7f7f7;
}

/* Scroll table on small screens */

.history-card{
    overflow-x: auto;
}

/* ===========================
   ANIMATION
=========================== */

@keyframes modalFade{

    from{
        transform: translateY(30px);
        opacity:0;
    }

    to{
        transform: translateY(0);
        opacity:1;
    }

}

/* ===========================
   TABLET
=========================== */

@media (max-width: 992px){

    .history-box{
        max-width: 95%;
        padding: 20px;
    }

}

/* ===========================
   MOBILE
=========================== */

@media (max-width: 768px){

    .history-modal{
        padding: 12px;
        align-items: flex-start;
    }

    .history-box{
        width: 100%;
        max-height: 95vh;
        padding: 16px;
        border-radius: 12px;
        margin-top: 20px;
    }

    #closeHistory{
        width: 34px;
        height: 34px;
        font-size: 20px;
        right: 10px;
        top: 10px;
    }

    .history-card{
        padding: 14px;
    }

    .history-card h3{
        font-size: 18px;
    }

    .history-card p{
        font-size: 14px;
    }

}

/* ===========================
   SMALL MOBILE
=========================== */

@media (max-width: 480px){

    .history-box{
        padding: 14px;
    }

    .history-card{
        padding: 12px;
    }

    .history-card h3{
        font-size: 16px;
    }

    .history-card p{
        font-size: 13px;
    }

    .history-card table{
        min-width: 350px;
    }

    .history-card th,
    .history-card td{
        padding: 8px;
        font-size: 12px;
    }

}

/* ===========================
   INFORMATION CARD
=========================== */

.info-card{

    background:#fff8e6;
    border-left:6px solid #f59e0b;
    padding:20px;
    border-radius:12px;
    margin-bottom:25px;
    box-shadow:0 5px 15px rgba(0,0,0,.08);

}

.info-card h2{

    color:#b45309;
    margin-bottom:15px;

}

.info-list{

    list-style:none;
    padding:0;
    margin:0;

}

.info-list li{

    display:flex;
    align-items:flex-start;
    gap:12px;

    padding:10px 0;

    border-bottom:1px dashed #e5e7eb;

    line-height:1.6;

}

.info-list li:last-child{

    border-bottom:none;

}

.info-list i{

    color:#2563eb;
    min-width:20px;
    margin-top:3px;

}

@media(max-width:768px){

.info-card{

padding:15px;

}

.info-list li{

font-size:14px;

}

}
@media (max-width: 480px){
    
    .info-card{
        padding:12px;
    }

    .info-list li{
        font-size:13px;
    }   
}