/* --- style.css --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 20px;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
h1, h2 {
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}
h1 { text-align: center; }

/* 表单样式 */
.form-container {
    background: #fafafa;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}
.form-container div {
    margin-bottom: 15px;
}
.form-container label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}
input[type="text"], input[type="date"], select, textarea {
    width: 100%;
    padding: 10px;
    box-sizing: border-box; /* 关键 */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}
textarea {
    font-family: inherit;
    min-height: 60px;
}
button {
    background-color: #3498db;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
button:hover { background-color: #2980b9; }

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}
th {
    background-color: #ecf0f1;
}
tr:nth-child(even) { background-color: #f9f9f9; }
table a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}
table a:hover { text-decoration: underline; }

/* 移动端 device.php 样式 */
.mobile-container {
    max-width: 600px; /* 移动端优化 */
    padding: 15px;
}
.mobile-container h1 { font-size: 24px; }
.mobile-container h2 { font-size: 20px; }

/* 历史记录 */
.history-list { max-height: 400px; overflow-y: auto; }
.history-item {
    border: 1px solid #eee;
    background: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}
.history-item strong {
    font-size: 16px;
    color: #333;
}
.history-item .date {
    float: right;
    color: #777;
    font-size: 14px;
}
.history-item p {
    margin: 10px 0 0;
    color: #555;
    word-wrap: break-word;
}
.message { padding: 15px; background: #e6ffed; border: 1px solid #b7ebc0; color: #257936; border-radius: 4px; }
.error { padding: 15px; background: #ffe6e6; border: 1px solid #ebc0c0; color: #a02626; border-radius: 4px; }


/* 二维码弹窗 Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 100; 
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.6);
}
.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 300px;
    max-width: 90%;
    border-radius: 8px;
    text-align: center;
}
.modal-content #qrcode {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-content #qr-url {
    font-size: 12px;
    color: #555;
    word-break: break-all;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

