body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

.app-container {
    width: 100%;
    max-width: 500px;
    min-height: 100vh;
    background: #fff;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

.page {
    padding: 20px;
    padding-bottom: 80px;
}

h1 {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    height: 60px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.bottom-nav a {
    text-decoration: none;
    color: #999;
    font-size: 14px;
    padding: 8px 16px;
    transition: all 0.3s;
}

.bottom-nav a.active {
    color: #1677ff;
    font-weight: bold;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: #f8fafc;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.stat-card div {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
}

.stat-card strong {
    font-size: 22px;
    color: #333;
}

.chart-container {
    background: #f8fafc;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    height: 260px;
    position: relative;
}

.section-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

textarea {
    width: 100%;
    height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    resize: none;
    font-family: inherit;
}

.template-selector {
    display: flex;
    gap: 12px;
    padding: 12px 0;
}

.template-selector label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

button {
    background: #1677ff;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

button:disabled {
    background: #b8d4ff;
    cursor: not-allowed;
}

button:active:not(:disabled) {
    background: #0958d9;
}

#qr-preview {
    margin-top: 20px;
    text-align: center;
}

#qr-preview img {
    max-width: 100%;
    border: 1px solid #eee;
    border-radius: 8px;
}

.orders-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e8ecf1;
    border-radius: 10px;
}

.order-info {
    flex: 1;
}

.order-id {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.order-details {
    display: flex;
    align-items: center;
    gap: 10px;
}

.amount {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.status-tag {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
}

.status-tag[style*="orange"] {
    background: #fff7e6;
    color: #fa8c16;
}

.status-tag[style*="green"] {
    background: #f6ffed;
    color: #52c41a;
}

.status-tag[style*="grey"] {
    background: #f5f5f5;
    color: #999;
}

.remark {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.delete-btn {
    background: #fff;
    color: #ff4d4f;
    border: 1px solid #ff4d4f;
    padding: 6px 12px;
    font-size: 12px;
    margin-left: 12px;
}

.delete-btn:hover {
    background: #fff1f0;
}