/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

header h1 {
    font-size: 1.5em;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* 登录页面 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h2 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.tips {
    text-align: center;
    color: #999;
    font-size: 12px;
    margin-top: 20px;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-success {
    background: #52c41a;
    color: white;
}

.btn-success:hover {
    background: #389e0d;
}

.btn-danger {
    background: #ff4d4f;
    color: white;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    width: auto;
}

.btn-rent {
    background: #1890ff;
    color: white;
}

.btn-extend {
    background: #52c41a;
    color: white;
}

.btn-return {
    background: #faad14;
    color: white;
}

.btn-delete {
    background: #ff4d4f;
    color: white;
}

.btn-restore {
    background: #52c41a;
    color: white;
}

.btn-edit {
    background: #722ed1;
    color: white;
}

/* 添加账号区域 */
.add-account-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.add-account-section h2 {
    font-size: 1.2em;
    margin-bottom: 15px;
}

.quick-rent-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-rent-buttons button {
    padding: 6px 12px;
    font-size: 12px;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #1890ff;
    border-radius: 4px;
    cursor: pointer;
}

.quick-rent-buttons button:hover {
    background: #1890ff;
    color: white;
}

/* 筛选 */
.filter-section {
    background: white;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-section label {
    font-size: 14px;
    color: #666;
}

.filter-section select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    flex: 1;
    max-width: 200px;
}

/* 账号列表 */
.accounts-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.account-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.account-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.account-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.account-phone {
    color: #666;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-copy {
    background: #e8f4fc;
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: #1890ff;
    color: white;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-idle .status-badge {
    background: #52c41a;
    color: white;
}

.status-rented .status-badge {
    background: #1890ff;
    color: white;
}

.status-expiring .status-badge {
    background: #faad14;
    color: white;
}

.status-expired .status-badge {
    background: #ff4d4f;
    color: white;
}

.status-deleted .status-badge {
    background: #999;
    color: white;
}

/* 账号信息 */
.account-info {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}

.info-label {
    color: #666;
}

.info-value {
    color: #333;
    font-weight: 500;
}

/* 操作按钮 */
.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state-text {
    font-size: 14px;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #333;
}

.modal-content p {
    margin-bottom: 15px;
    color: #666;
}

.quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.quick-options button {
    flex: 1;
    min-width: 80px;
    padding: 12px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.quick-options button:hover {
    background: #667eea;
    color: white;
}

.custom-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.custom-input input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.custom-input button {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.cancel-btn {
    width: 100%;
    padding: 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

/* 通知 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 1001;
    animation: slideIn 0.3s ease;
    max-width: 300px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification.success {
    background: #52c41a;
}

.notification.error {
    background: #ff4d4f;
}

.notification.warning {
    background: #faad14;
}

.notification.info {
    background: #1890ff;
}

/* 数据说明区域 */
.data-info-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.data-info-section h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #333;
}

.data-info-section p {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.data-info-section code {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    color: #667eea;
}

.data-info-section .btn-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* 回收站区域 */
.recycle-bin-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.recycle-bin-section h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.empty-bin {
    text-align: center;
    color: #999;
    padding: 30px;
}

/* 响应式 */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 1.2em;
    }

    .account-card {
        padding: 12px;
    }

    .account-actions {
        justify-content: center;
    }

    .quick-options button {
        min-width: 60px;
        padding: 10px;
        font-size: 12px;
    }
}
