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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    color: #1d1d1f;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f5f5f7;
}

.login-box {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-header p {
    font-size: 14px;
    color: #86868b;
    font-weight: 400;
}

/* 表单元素 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #1d1d1f;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: #ffffff;
    color: #1d1d1f;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #86868b;
}

/* 按钮 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 980px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    letter-spacing: -0.2px;
}

.btn-primary {
    background: #0071e3;
    color: #ffffff;
}

.btn-primary:hover {
    background: #0077ed;
}

.btn-primary:active {
    background: #006edb;
}

.btn-secondary {
    background: #e8e8ed;
    color: #1d1d1f;
}

.btn-secondary:hover {
    background: #ebebf0;
}

.btn-secondary:active {
    background: #e6e6eb;
}

.btn-success {
    background: #34c759;
    color: #ffffff;
}

.btn-success:hover {
    background: #30d158;
}

.btn-danger {
    background: #ff3b30;
    color: #ffffff;
}

.btn-danger:hover {
    background: #ff453a;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 主容器 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

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

.header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* 区域卡片 */
.section {
    background: #ffffff;
    border-radius: 18px;
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid #d2d2d7;
}

.section h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 24px;
    letter-spacing: -0.3px;
}

/* 配置提示 */
.config-tip {
    background: #f5f5f7;
    color: #1d1d1f;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 13px;
    line-height: 1.5;
}

/* 输入组 */
.input-group {
    display: flex;
    gap: 12px;
}

.input-group input {
    flex: 1;
}

/* 收件人列表 */
.recipient-list {
    background: #f5f5f7;
    border-radius: 12px;
    padding: 20px;
}

.recipient-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #d2d2d7;
}

.recipient-count {
    margin-left: auto;
    font-size: 13px;
    color: #86868b;
}

.recipient-items {
    max-height: 320px;
    overflow-y: auto;
}

.recipient-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.recipient-item:hover {
    background: #f5f5f7;
}

.recipient-checkbox {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0071e3;
}

.recipient-email {
    flex: 1;
    font-size: 14px;
    color: #1d1d1f;
}

.empty-message {
    text-align: center;
    color: #86868b;
    padding: 32px;
    font-size: 14px;
}

/* 图片预览 */
.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.image-item {
    position: relative;
    width: 100px;
}

.image-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #d2d2d7;
}

.image-item .btn {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 4px 8px;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
}

/* 状态消息 */
.status-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.status-success {
    background: #f0f9f1;
    color: #1d1d1f;
}

.status-error {
    background: #fff0ef;
    color: #1d1d1f;
}

.status-info {
    background: #f0f7ff;
    color: #1d1d1f;
}

/* 警告框 */
.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.alert-warning {
    background: #fff9f0;
    color: #1d1d1f;
    border: 1px solid #f0e0c0;
}

.alert-error {
    background: #fff0ef;
    color: #1d1d1f;
    border: 1px solid #f0c0c0;
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-actions .btn {
    flex: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }
    
    .section {
        padding: 24px 20px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .header-actions .btn {
        flex: 1;
        text-align: center;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
}