
html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    background-color: #f9f9f9;
    margin: 0;
    padding-top: 40px;
    flex-direction: column;
}

#content {
    flex: 1;
}

footer {
    background-color: #ccc;
    text-align: center;
    padding: 10px;
    font-size: 12px;
    color: #666;
    position: relative;
    bottom: 0;
}

h1, h2 {
    margin: 10px;
}

p {
    margin: 8px;
}

li {
    margin: 8px;
}

.topnav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background-color: #333;
    box-shadow: 0 4px 6px -6px #222;
    z-index: 1000;
    align-items: center;
    box-sizing: border-box;
    display: flex;          /* 使用 flex 布局 */
    align-items: center;    /* 垂直居中 */
    /* justify-content: space-around;  /* 水平分布项 */ 
    padding: 0 20px;  /* 增加一些内边距，避免过于拥挤 */
    flex-wrap: nowrap;  /* 禁止换行 */
}

.nav-item {
    /* display:inline-flex; */
    position: relative;
    width: 150px;
    height: 100%;
    margin-left: 10px;
    align-items: center;
    justify-content: center;
    flex-shrink: 1;  /* 禁止缩小，防止被挤压 */
    min-width: 80px;
}

.nav-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    width: 100%;
    height: 100%;
}

.topnav .nav-link:hover {
    background-color: #575757;
}

/* 下拉菜单样式 */
.dropdown {
    width: 100%;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    box-sizing: border-box;
}

.dropdown a {
    color: black;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
    display: flex;
    flex-direction: column;
}

.dropdown a:hover {
    background-color: #f1f1f1;
}

.nav-item:hover .dropdown {
    display: block;
}

#backToTopBtn {
    position: fixed; /* 固定在页面某个位置 */
    bottom: 20px; /* 距离页面底部的距离 */
    right: 20px; /* 距离页面右侧的距离 */
    z-index: 99; /* 确保按钮在其他元素之上 */
    background-color: #555; /* 按钮背景颜色 */
    color: white; /* 按钮文字颜色 */
    border: none; /* 去掉边框 */
    padding: 10px 15px; /* 内边距 */
    border-radius: 5px; /* 圆角效果 */
    cursor: pointer; /* 鼠标悬停时变成手指形状 */
    display: none; /* 初始状态下隐藏 */
    font-size: 18px; /* 字体大小 */
}

#backToTopBtn:hover {
    background-color: #333; /* 悬停时的背景颜色变化 */
}

#message-container {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translate(-50%, 0%); /* 调整位置，使其完全居中 */
    width: 300px;
    z-index: 1000;
}

.alert {
    display: none; /* 默认不显示，使用 JavaScript 控制显示 */
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    color: #fff;
    background-color: #444;
}

.alert.success { background-color: green; }
.alert.error { background-color: red; }
.alert.info { background-color: blue; }


.content {
    flex: 1;
    padding: 40px;
}


/* 输入框验证未通过高亮 */
.invalid {
    border: 1px solid red !important;
}

.table-container {
    overflow-x: auto;
    font-size: 0.9em;
}

.table-wrap {
    position: relative;
    overflow: visible;
}

.expense-table {
    width: 100%;
    min-width: 1800px;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
}

.expense-table thead tr {
    background-color: #f1f1f1;
    color: #000000;
    text-align: left;
    font-weight: bold;
}

.expense-table th,
.expense-table td {
    padding: 8px 10px;
    border: 1px solid #dddddd;
    text-align: center;
}

.expense-table td.description {
    text-align: left;
}

.expense-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.expense-table tbody tr:hover {
    background-color: #f1f1f1;
}

.tag {
    padding: 5px 10px;
    border-radius: 15px;
    color: white;
    font-weight: bold;
    display: inline-block;
    text-align: center;
}

.tag-red {
    background-color: #e74c3c; /* 红色背景 */
}

.tag-alert {
    background-color: #e7a03c; /* 橙色背景 */
}

.tag-green {
    background-color: #2ecc71; /* 绿色背景 */
}

.tag-gray {
    background-color: #95a5a6; /* 灰色背景，用于其他状态 */
}

.search-form {
    font-size: 0.9em;
}

.flatpickr-calendar {
    display: block !important;
    visibility: visible !important;
}


.form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.form-row {
 /*   display: flex; */
    gap: 20px;
    margin-left: 10px;
    margin-bottom: 15px;
    min-width: 1300px;
}

.form-row label {
    width: 80px;
    margin-top: 5px;
}

.form-row input[type="text"], 
.form-row input[type="number"], 
.form-row input[type="date"], 
.form-row select {
    width: 160px;             /* 固定宽度 */
    box-sizing: border-box;   /* 确保 padding 不会影响到总宽度 */
    margin-right: 70px;
}

.form-row input[type="month"] {
    width: 160px !important;     /* 设置固定宽度 */
    border: 1px solid #ccc !important;  /* 修改边框 */
    padding: 8px;                /* 设置内边距 */
    border-radius: 4px;          /* 添加圆角，增强视觉效果 */
    box-sizing: border-box;      /* 确保内边距不会影响总宽度 */
    margin-right: 70px;
}

input[type="file"] {
    padding-top: 8px;
    padding-bottom: 8px;
}

.form-group {
    display: flex;
    flex-direction: column;
    flex-basis: 25%;
}

label {
    display: inline-block;
    width: 130px;
    margin-top: 5px;
    font-weight: bold;
    vertical-align: top;
}

input[type="text"], 
input[type="number"], 
input[type="date"], 
input[type="month"],
input[type="password"],
select,
textarea {
    font-family: Arial, Helvetica, sans-serif;
    width: 200px;
    height: 36px;
    padding: 8px 10px 8px 10px;
    margin-right: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
    box-sizing:border-box;
}

textarea {
    height: 72px;
}

input[type="file"] {
    padding-top: 8px;
    padding-bottom: 8px;
}

.invoice-form-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.invoice-form label {
    width: 150px;
}

.invoice-form input[type="select"],
.invoice-form input[type="number"],
.invoice-form select {
    width: 200px;
}

.invoice-form input[type="text"],
.invoice-form textarea {
    width: 450px;
}


.invoice-form input[type="checkbox"] {
    width: 13px;
    margin-top: 12px;
    margin-bottom: 15px;
}

.invoice-form .custom-autocomplete {
    width: 500px;
}

.btn {
    display: inline-block;
    background-color: #009879;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    margin-top: 10px;
    margin-right: 10px;
    font-size: 1em;
}

.btn:hover {
    background-color: #007a5e;
}

.btn-cancel {
    background-color: #b3b3b3;
}

.btn-cancel:hover {
    background-color: #333;
}

.btn-export {
    background-color: #007bff;
}

.btn-export:hover {
    background-color: #0056b3;
}

.btn-alert {
    background-color: #f44336; /* 红色警告色 */
    color: white; /* 白色字体 */
    padding: 10px 20px; /* 按钮内边距 */
    font-size: 1em; /* 字体大小 */
    border: none; /* 无边框 */
    border-radius: 5px; /* 圆角 */
    cursor: pointer; /* 鼠标移上去时显示为手指 */
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* 过渡效果 */
}

.btn-alert:hover {
    background-color: #d32f2f; /* 更深的红色，增强悬停效果 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 添加阴影以增强效果 */
}

.btn-alert:active {
    background-color: #b71c1c; /* 按下时更深的红色 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* 按下时稍微减小阴影 */
    transform: translateY(2px); /* 模拟按下的效果 */
}

/* 总金额样式 */
.total-amount {
    margin-top: 20px;
    font-size: 1em;
    font-weight: bold;
    color: #0088ff;
    background-color: #f9f9f9;
    padding: 8px;
    border: 2px solid #ccc;
    border-radius: 5px;
    text-align: left;  /* 右对齐让金额显得更加专业 */
}


.btn-row {
    display: flex;
    gap: 10px;
    margin-left: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.left-button {
    display: flex;
}

.right-button {
    margin-left: auto;
}

.attachment-list {
    list-style-type: none;
    padding: 0;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #ddd; /* 可选：添加分割线，使列表更清晰 */
}

.attachment-item a {
    text-decoration: none;
    color: #007bff; /* 链接的颜色 */
}

.delete-link {
    color: #d9534f; /* 删除按钮的颜色，红色以示警告 */
    text-decoration: none;
    margin-left: 20px;
}

.delete-link:hover {
    color: #c9302c; /* 鼠标悬停时颜色加深 */
}

.statistics-table {
    width: 100%;
    min-width: 1200px;
    max-width: 1900px;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.statistics-table th, .statistics-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
    vertical-align: middle;
}

.statistics-table th {
    background-color: #f2f2f2;
    border-top: double #ddd;
    border-bottom: double #ddd;
}

.statistics-table tbody tr:hover td{
    background-color: rgba(186, 223, 255, 0.5) !important;
}
 /** #badfff **/

.statistics-table .highlight {
    background-color:  rgba(186, 223, 255, 0.5) !important ;
}

.statistics-table tr:hover td.selected {
    box-sizing: border-box; /* 确保边框包含在单元格范围内 */
    background-color:  rgb(145, 203, 255) !important;
}


.statistics-table td {
    white-space: nowrap;
    padding-top: 15px;
}

.statistics-table .total{
    background-color: #f2f2f2;
}

.currency-cell {
    text-align: right;
    white-space: nowrap;
}

.currency-symbol {
    float: left;
}

.currency-value {
    float: right;
}

.summary-total-row {
    background-color: #f2f2f2;
    font-weight: bold;
    text-decoration: underline;
    border-top: double #ddd;
    border-bottom: double #ddd;
}

/* 控制货币符号和数字的布局 */
.summary-total-row span.currency-symbol {
    float: left;
    text-decoration: underline;
}

.summary-total-row span.currency-value {
    float: right;
    text-decoration: underline;
    padding-top: 3px;
}

/* 通用消息框样式 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 16px;
}

/* 成功类型的消息框样式 */
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}


/*发票列表宽度-悬停提示*/

.tooltip {
    position: absolute;
    background: #777;
    color: #fff;
    padding: 5px 15px 5px 15px;
    border-radius: 3px;
    white-space: nowrap;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    pointer-events: none;
    min-width: 200px;
    max-width: 400px;
    text-align: center;
}

/* 小三角形指引的样式 */
.tooltip-arrow {
    position: absolute;
    bottom: -10px;                 /* 三角形的位置在提示框的下方 */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #777;   /* 使用边框来画出一个向下的三角形，颜色与提示框一致 */
}

.invoice-table th:nth-child(1) {
    width: 162px;
} /* 发票号码 */

.invoice-table th:nth-child(2),
.invoice-table th:nth-child(10) {
    width: 75px;
} /* 开票日期，到款日期 */

.invoice-table th:nth-child(3) {
    width: 200px;
} /* 购买方 */

.invoice-table td:nth-child(3) {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invoice-table th:nth-child(4) {
    width: 80px;
} /* 发票内容 */

.invoice-table th:nth-child(5) {
    width: 30px;
} /* 税率 */

.invoice-table th:nth-child(6) {
    width: 120px;
} /* 金额 */

.invoice-table th:nth-child(7),
.invoice-table th:nth-child(9) {
    width: 65px;
} /* 发票状态，收款状态 */

.invoice-table th:nth-child(8) {
    width: 200px;
}
/*关联服务-8*/

.invoice-table td:nth-child(8) {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invoice-table th:nth-child(11) {
    width: 100px;
}
/*其他说明-11*/

.invoice-table td:nth-child(11) {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position:relative;
}

.invoice-table th:nth-child(12) {
    width: 110px;
}
