body{
    margin:0;
    font-family:"Microsoft JhengHei";
    background:#f5f7fb;
}

.login-page{
    display:flex;
    justify-content:center;
    align-items:center;
    height:100vh;
    background:
    linear-gradient(135deg,#b80000,#ff4d4d);
}

.login-box{
    width:380px;
    background:white;
    padding:40px;
    border-radius:25px;
    box-shadow:0 10px 40px rgba(0,0,0,0.2);
}

.login-title{
    text-align:center;
    font-size:34px;
    color:#c40000;
    font-weight:bold;
    margin-bottom:10px;
}

.login-sub{
    text-align:center;
    color:#999;
    margin-bottom:35px;
}

.input{
    width:100%;
    padding:15px;
    border:1px solid #ddd;
    border-radius:12px;
    margin-bottom:15px;
    font-size:16px;
    box-sizing:border-box;
}

.login-btn{
    width:100%;
    border:none;
    background:#c40000;
    color:white;
    padding:15px;
    border-radius:12px;
    font-size:18px;
    cursor:pointer;
}

.login-btn:hover{
    background:#990000;
}

.error{
    color:red;
    margin-top:15px;
    text-align:center;
}

.navbar{
    background:#b80000;
    padding:15px 20px;
    display:flex;
    gap:20px;
    flex-wrap:wrap;
}

.navbar a{
    color:white;
    text-decoration:none;
    font-weight:bold;
}

.container{
    padding:25px;
}

.card-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
}

.card{
    background:white;
    border-radius:20px;
    padding:25px;
    box-shadow:0 5px 20px rgba(0,0,0,0.08);
}

.card-title{
    color:#777;
    margin-bottom:10px;
}

.big-number{
    font-size:42px;
    color:#c40000;
    font-weight:bold;
}

.table{
    width:100%;
    border-collapse:collapse;
    background:white;
    border-radius:15px;
    overflow:hidden;
}

.table th{
    background:#c40000;
    color:white;
    padding:14px;
}

.table td{
    padding:14px;
    border-bottom:1px solid #eee;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    height:42px;
    padding:0 18px;

    background:#c40000;
    color:white;

    border-radius:10px;
    text-decoration:none;
    border:none;
    cursor:pointer;

    font-size:15px;
    line-height:1;

    box-sizing:border-box;
}

.btn:hover{
    background:#900000;
}

@media(max-width:768px){

    .container{
        padding:15px;
    }

    .table{
        font-size:14px;
    }

    .login-box{
        width:90%;
        padding:30px;
    }
}

h1{
    margin-top:0;
    margin-bottom:25px;
}

.card p{
    margin-bottom:8px;
    font-weight:bold;
    color:#666;
}

select.input{
    background:white;
}
.btn.danger{
    background:#555;
}

.btn.danger:hover{
    background:#222;
}

.alert{
    padding:15px;
    border-radius:12px;
    margin-bottom:20px;
}

.alert-warning{
    background:#fff3cd;
    color:#856404;
}

.alert-success{
    background:#d4edda;
    color:#155724;
}

.action-buttons{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}
.table{
    table-layout: fixed;
}

.table th,
.table td{
    text-align:center;
    vertical-align:middle;
    word-break:break-word;
}

.action-cell{
    width:120px;
}

.small-btn{
    display:block;
    width:80px;
    margin:4px auto;
    padding:8px 10px;
    text-align:center;
}
.salary-table-wrap{
    width:100%;
    overflow-x:auto;
    background:white;
    border-radius:15px;
}

.salary-table{
    width:100%;
    min-width:1240px;
    border-collapse:collapse;
    table-layout:fixed;
    background:white;
}

.salary-table th{
    background:#c40000;
    color:white;
    padding:14px 8px;
    text-align:center;
    vertical-align:middle;
    font-weight:bold;
    white-space:normal;
}

.salary-table td{
    padding:14px 8px;
    border-bottom:1px solid #eee;
    text-align:center;
    vertical-align:middle;
    word-break:break-word;
}

.salary-table td:nth-child(1),
.salary-table td:nth-child(2){
    text-align:left;
}

.money-red{
    color:#c40000;
    font-weight:bold;
}

.action-cell{
    text-align:center;
}

.small-btn{
    display:block;
    width:78px;
    margin:4px auto;
    padding:8px 6px;
    box-sizing:border-box;
}

/* ===== 薪資管理表格固定版 ===== */

.salary-table-wrap{
    width:100%;
    overflow-x:auto;
    background:#fff;
    border-radius:16px;
}

.salary-table{
    width:100%;
    min-width:1250px;
    border-collapse:collapse;
    table-layout:fixed;
    background:#fff;
}

.salary-table th,
.salary-table td{
    padding:14px 10px;
    border-bottom:1px solid #eee;
    text-align:center;
    vertical-align:middle;
    font-size:16px;
    line-height:1.5;
    white-space:normal;
    word-break:break-word;
}

.salary-table th{
    background:#c40000;
    color:#fff;
    font-weight:bold;
}

.salary-table td:nth-child(1),
.salary-table td:nth-child(2){
    text-align:center;
}

.salary-table .money-red{
    color:#c40000;
    font-weight:bold;
}

.salary-table .action-cell{
    text-align:center;
}

.salary-table .small-btn{
    display:block !important;
    width:82px !important;
    margin:5px auto !important;
    padding:8px 6px !important;
    font-size:15px !important;
    line-height:1.2 !important;
    box-sizing:border-box;
}

.salary-table .btn{
    border-radius:10px;
}

.salary-table .btn.danger{
    background:#555;
}

.salary-table .btn.danger:hover{
    background:#222;
}

/* ===== 統一按鈕大小 ===== */
.btn{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;

    height:42px !important;
    min-height:42px !important;

    padding:0 18px !important;

    font-size:15px !important;
    line-height:1 !important;

    box-sizing:border-box !important;
    vertical-align:middle !important;
}