@charset "utf-8";

/* =========================
   通用样式重置
   ========================= */
.mcon.pb10 {
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-sizing: border-box;
}

/* ===== 表格基础样式 ===== */
.table1 {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
}

.table1 th,
.table1 td {
    padding: 12px 15px;
    border: none; /* 移除老式边框 */
    font-size: 14px;
    line-height: 1.6;
    vertical-align: middle;
}

/* 左侧标题列 */
.table1 th {
    width: 200px;
    text-align: right;
    color: #5e6d82;
    font-weight: 500;
}

/* 右侧内容列 */
.table1 td {
    text-align: left;
    color: #333;
}

/* ===== 输入框样式 ===== */
.inpt {
    width: 180px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    transition: all .2s;
    box-sizing: border-box;
    outline: none;
}

.inpt:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22,119,255,.1);
}

/* 日期提示文字 */
#last-dates {
    font-style: normal;
    color: #909399;
    font-size: 12px;
    margin-left: 10px;
}

/* 结果展示标签 */
#znts, #znje {
    font-weight: 600;
    font-size: 18px;
    color: #ff4d4f; /* 结果红色高亮 */
    font-family: Arial, sans-serif;
}

/* ===== 按钮区域 ===== */
.btn1 {
    min-width: 110px;
    height: 38px;
    padding: 0 20px;
    margin: 10px 8px;
    border-radius: 20px; /* 椭圆按钮更现代 */
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .3s;
    border: 1px solid transparent;
    display: inline-block;
}

/* 计算按钮 */
#btnCalculat {
    background: #1677ff;
    color: #fff;
}

#btnCalculat:hover {
    background: #4096ff;
    box-shadow: 0 4px 10px rgba(22,119,255,0.2);
}

/* 重置按钮 */
#btnReset {
    background: #f5f7fa;
    border: 1px solid #dcdfe6;
    color: #606266;
}

#btnReset:hover {
    background: #e6f0ff;
    color: #1677ff;
}

/* =========================
   📱 移动端彻底修复
   ========================= */
@media screen and (max-width: 768px) {
    .mcon.pb10 {
        padding: 15px;
    }

    /* 将表格转为块状布局 */
    .table1, 
    .table1 tr, 
    .table1 th, 
    .table1 td {
        display: block;
        width: 100% !important;
        text-align: left !important;
        box-sizing: border-box;
    }

    .table1 th {
        padding-bottom: 5px;
        padding-top: 15px;
        color: #333;
    }

    .table1 td {
        padding-top: 5px;
        padding-bottom: 10px;
        border-bottom: 1px solid #f0f2f5; /* 手机端增加分隔线 */
    }

    /* 输入框全宽 */
    .inpt {
        width: 100% !important;
        height: 42px; /* 手机端高度增加方便点击 */
        font-size: 16px; /* 防止iOS输入时自动缩放 */
    }

    /* 按钮居中排列 */
    .table1 td[colspan="2"] {
        text-align: center !important;
        border-bottom: none;
        padding-top: 25px;
    }

    .btn1 {
        width: 45%; /* 两个按钮并排 */
        margin: 5px 2%;
        height: 44px;
    }

    /* 日期提示文字换行 */
    #last-dates {
        display: block;
        margin-left: 0;
        margin-top: 5px;
    }
}

/* 防止手机端点击日期输入框时弹出虚拟键盘 */
.inpt[readonly] {
    cursor: pointer;
    background-color: #fff !important; /* 保持白色背景 */
}

/* 结果高亮样式 */
#znts, #znje {
    color: #ff4d4f;
    font-size: 20px;
    font-weight: bold;
    margin-right: 4px;
}

@media screen and (max-width: 768px) {
    /* 1. 确保TD里的内容保持一行 */
    .table1 td {
        display: block !important;
        width: 100% !important;
        padding-top: 5px;
    }

    /* 2. 把输入框和单位包裹在一个 Flex 容器中 */
    /* 请确保 HTML 中把 input 和 "元" 用 <div class="input-wrapper"> 包裹 */
    .input-wrapper {
        display: flex;
        align-items: center;
        gap: 8px; /* 输入框和"元"之间的间距 */
    }

    .inpt {
        flex: 1; /* 让输入框自动填满剩余空间 */
        width: auto !important; /* 取消固定宽度 */
    }

    /* 3. 防止单位换行 */
    .unit-text {
        white-space: nowrap;
        flex-shrink: 0; /* 关键：不准压缩单位文字 */
    }
}

@media screen and (max-width: 768px) {
    /* 让按钮行成为一个居中容器 */
    .table1 td[colspan="2"] {
        display: flex !important;
        justify-content: center;
        gap: 10px; /* 按钮间距 */
        padding-top: 20px;
    }

    .btn1 {
        flex: 1; /* 平分空间 */
        min-width: 0 !important; /* 允许按钮变窄 */
        margin: 0 !important;    /* 清除左右间距，改用 gap */
        padding: 0 10px;
    }
}

/* =========================
   ✅ 营业税说明表优化（新增）
   ========================= */

/* 新表格（不要再用 table1） */
.tax-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 14px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

/* 单元格 */
.tax-table th,
.tax-table td {
    border: 1px solid #e5eaf0;
    padding: 12px 14px;
    line-height: 1.7;
}

/* 表头 */
.tax-table th {
    background: #f7f9fc;
    color: #1f2d3d;
    font-weight: 600;
    text-align: left;
}

/* 斑马纹 */
.tax-table tr:nth-child(even) {
    background: #fafcff;
}

/* 列宽优化 */
.tax-table td:nth-child(1) {
    width: 20%;
    font-weight: 600;
}

.tax-table td:nth-child(2) {
    width: 60%;
    color: #555;
}

.tax-table td:nth-child(3) {
    width: 20%;
    text-align: center;
    color: #ff4d4f;
    font-weight: bold;
}

/* =========================
   ✅ select 下拉框美化（新增）
   ========================= */

.sel {
    width: 180px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    transition: all .2s;
    box-sizing: border-box;
    outline: none;

    /* 去掉默认系统样式 */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    /* 自定义箭头 */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M512 704L192 384h640z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

/* select focus */
.sel:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22,119,255,.1);
}

/* =========================
   📱 移动端适配（补充）
   ========================= */
@media screen and (max-width: 768px) {

    .tax-table th,
    .tax-table td {
        font-size: 13px;
        padding: 10px;
    }

    .tax-table td:nth-child(2) {
        width: auto;
    }

    .sel {
        width: 100% !important;
        height: 42px;
        font-size: 16px;
    }
}