* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 15px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    text-align: center;
}

header h1 {
    margin-bottom: 15px;
    font-size: 1.6em;
}

nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 6px 18px;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-btn.active {
    background: white;
    color: #667eea;
}

.view {
    padding: 30px 40px;
}

.view[style*="display: none"] {
    display: none;
}

.view[style*="display: block"] {
    display: block;
}

h2 {
    margin-bottom: 25px;
    color: #333;
    font-size: 1.6em;
}

h3 {
    margin-bottom: 20px;
    color: #555;
    font-size: 1.2em;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 18px;
    margin-bottom: 18px;
}

.form-row.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

.form-group {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    min-height: 45px;
}

.form-group label {
    display: inline-block;
    min-width: 170px;
    margin-right: 15px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
    vertical-align: middle;
    flex-shrink: 0;
    text-align: right;
}

.form-group input,
.form-group select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
    vertical-align: middle;
    min-width: 0;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-info {
    background: #3b82f6;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    margin: 2px;
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

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

table tbody tr:hover {
    background: #f8f9fa;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #fef3c7;
    color: #d97706;
}

.status-approved {
    background: #dbeafe;
    color: #2563eb;
}

.status-paid {
    background: #d1fae5;
    color: #059669;
}

.status-rejected {
    background: #fee2e2;
    color: #dc2626;
}

.stats-container {
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: #ffffff;
    color: #333;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
}

.stat-card h4 {
    margin-bottom: 15px;
    font-size: 1em;
}

.stat-info p {
    margin: 8px 0;
    font-size: 14px;
}

.stat-info span {
    font-weight: bold;
    font-size: 1.1em;
}

.admin-login {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
}

.admin-login h3 {
    text-align: center;
    margin-bottom: 20px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.detail-row {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #555;
    display: inline-block;
    min-width: 150px;
}

.detail-value {
    color: #333;
}

@media (max-width: 768px) {
    .container {
        margin: 0;
        border-radius: 0;
    }

    header {
        padding: 15px;
    }

    header h1 {
        font-size: 1.2em;
    }

    .view {
        padding: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row.three-cols {
        grid-template-columns: 1fr;
    }

    .form-group label {
        display: block;
        margin-bottom: 4px;
        margin-right: 0;
        min-width: auto;
        text-align: left;
        flex-shrink: 0;
    }

    .form-group {
        display: block;
    }

    .form-group input,
    .form-group select {
        width: 100%;
        flex: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 12px;
    }

    table th,
    table td {
        padding: 8px;
    }

    .nav-btn {
        padding: 5px 12px;
        font-size: 12px;
    }
}

/* 分页组件样式 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-controls button {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-controls button:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-controls button.btn-primary {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination-controls button.btn-primary:hover {
    background: #764ba2;
    border-color: #764ba2;
}

.pagination-ellipsis {
    padding: 0 5px;
    color: #999;
}

/* 内联样式提取 */
.input-error {
    border-color: #dc3545 !important;
    background-color: #fff8f8 !important;
}
.input-error:focus {
    outline-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25) !important;
}
.field-error {
    animation: slideDown 0.2s ease-out;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
[v-cloak] {
    display: none;
}

/* 默认隐藏主应用，登录后显示 */
#app {
    display: none;
}
#app[v-show="true"] {
    display: block !important;
}

/* 对话框样式 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.dialog {
    background: white;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
}
.dialog h3 {
    margin-top: 0;
    margin-bottom: 15px;
}
.dialog textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

/* 登录页面样式 */
#login-page {
    min-height: 100vh;
}
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
}
.login-box h1 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 28px;
}
.login-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}
.login-form {
    text-align: left;
}
.login-form .form-group {
    margin-bottom: 20px;
}
.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}
.login-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.login-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.login-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}
.login-error {
    background-color: #fee;
    color: #c33;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 13px;
    text-align: center;
}
.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.1s;
}
.login-btn:hover:not(:disabled) {
    opacity: 0.9;
}
.login-btn:active:not(:disabled) {
    transform: scale(0.98);
}
.login-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* 详情对话框样式 */
.detail-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #e8e8e8;
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-label {
    flex: 0 0 140px;
    color: #666;
    font-size: 13px;
}
.detail-value {
    flex: 1;
    color: #333;
    font-size: 13px;
    word-break: break-all;
}

@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        align-items: center;
    }

    .pagination-controls {
        width: 100%;
        justify-content: center;
    }

    .pagination-controls button {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 8px;
    }
}
