/* Reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f6f6f6;
    color: #222;
}

.app { min-height: 100%; display: flex; flex-direction: column; }

/* Logo section */
.logo-section {
    background: #fff;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 10px 0;
}
.logo {
    height: 100%;
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

/* Top bar */
.topbar {
    height: 48px;
    background: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid #eee;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    z-index: 999;
}
.nav-btn { background: none; border: none; font-size: 18px; padding: 6px 8px; }
.tabs { display: flex; gap: 16px; overflow-x: auto; white-space: nowrap; flex: 1; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 8px; font-size: 15px; color: #666; text-decoration: none; }
.tab.active { color: #d33; font-weight: 600; }
.top-actions { display: flex; gap: 6px; padding-left: 6px; }
.dot { width: 6px; height: 6px; background: #ddd; border-radius: 50%; display: inline-block; }

/* Layout */
.content {
    display: flex;
    gap: 12px;
    padding: 10px;
    margin-top: 98px;
}
.left-menu {
    width: 135px;
    background: #fff;
    border-radius: 8px;
    padding: 5px 4px;
    height: calc(100vh - 128px - 20px);
    position: fixed;
    top: 86px;
    left: 5px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
.left-menu ul { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    flex: 1;
    overflow-y: auto;
}
.menu-item { position: relative; margin: 10px 2px; }
.menu-item a { position: relative; display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 8px; padding: 12px 10px; border-radius: 12px; color: #555; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.06); text-decoration: none; overflow: hidden; }
.menu-item .icon img { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; }
.menu-item a:hover { background: #f8f8f8; }
.menu-item .corner-badge { position: absolute; right: -2px; top: -2px; min-width: 18px; height: 18px; padding: 0 4px; background: #ff4d4f; color: #fff; border-radius: 10px; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 0 rgba(0,0,0,.2); }
.menu-item.selected a { background: linear-gradient(180deg, #f5f4f2 0%, #b78543 50%, #8a5e23 100%); color: #fff; }
.menu-item.selected a .label { color: #fff; }
.left-menu-footer { 
    display: flex; 
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: auto; 
    flex-shrink: 0;
    background: #fff;
    padding: 10px 0 0 0;
    border-top: 1px solid #f0f0f0;
    position: sticky;
    bottom: 0;
    z-index: 1;
}
.btn.small { border: 1px solid #eee; background: #fafafa; border-radius: 16px; padding: 6px 8px; font-size: 12px; }

#logoutBtn { 
    border: 1px solid #ff4d4f; 
    background: #fff5f5; 
    color: #ff4d4f; 
    border-radius: 16px; 
    padding: 6px 8px; 
    font-size: 12px; 
    transition: all 0.2s ease;
}

#logoutBtn:hover { 
    background: #ff4d4f; 
    color: #fff; 
}

.cards { 
    flex: 1; 
    display: grid; 
    gap: 10px; 
    width: 100%; 
    height: 100%; 
    margin-left: 135px;
}
.card-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 1px 0 rgb(0 0 0 / 0%);
    background: rgb(0 0 0 / 0%);
}
.card { 
    width: 100%; 
    height: auto;
    object-fit: contain; 
    object-position: center;
    display: block;
    border-radius: 10px;
}


/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #fff;
    margin: 20px;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative;
}

.modal-content.large {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

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

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

/* 表格样式 */
.table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.record-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.record-table th,
.record-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.record-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
}

.record-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* 状态标签样式 */
.status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

.table-actions {
    margin-top: 15px;
    text-align: right;
}

/* 弹窗响应式样式 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-content.large {
        max-width: none;
        width: 95%;
    }
}

/* 暂无内容样式 */
.no-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #999;
    font-size: 16px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 0 rgba(0,0,0,.05);
}

/* Small screens */
@media (min-width: 780px) {
    .content { max-width: 720px; margin: 0 auto; }
}


