/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 页面容器 */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* 登录页面 */
.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container h1 {
    color: white;
    margin-bottom: 30px;
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#login-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background-color: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

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

.btn-danger:hover {
    background-color: #c82333;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-link {
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
    font-weight: 500;
}

.btn-link:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* 错误消息 */
.error-message {
    color: #dc3545;
    margin-top: 15px;
    font-size: 0.9rem;
    text-align: center;
}

/* 仪表板头部 */
.dashboard-header {
    background: white;
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h1 {
    color: #333;
    font-size: 1.8rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info span {
    font-weight: 600;
    color: #555;
}

/* 仪表板主内容 */
.dashboard-main {
    padding: 30px 40px;
}

.filter-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    align-items: center;
}

#status-filter {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    min-width: 150px;
}

/* 短信发送区域 */
.sms-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.sms-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

.sms-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.sms-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sms-field label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.sms-field input,
.sms-field select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background: white;
    min-width: 200px;
}

.sms-field input:focus,
.sms-field select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.sms-message {
    margin-top: 15px;
    font-size: 0.9rem;
    min-height: 1.2em;
}

.sms-message.success {
    color: #28a745;
}

.sms-message.error {
    color: #dc3545;
}

.sms-message.info {
    color: #666;
}

.sms-confirm-content {
    max-width: 500px;
}

.sms-confirm-tip {
    color: #dc3545;
    font-weight: 500;
    margin-bottom: 20px;
    padding: 12px;
    background: #fff3f3;
    border-radius: 5px;
    border-left: 4px solid #dc3545;
}

.sms-confirm-info .info-row {
    margin-bottom: 12px;
    font-size: 1rem;
}

.sms-confirm-info #sms-confirm-phone {
    color: #667eea;
    font-weight: 600;
}

.sms-confirm-info pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #eee;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    line-height: 1.6;
    margin-top: 8px;
    font-size: 0.95rem;
    color: #555;
}

/* 作品列表 */
.works-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.work-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border-left: 4px solid #667eea;
}

.work-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.work-card h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.2rem;
    line-height: 1.4;
}

.work-card .meta-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #666;
}

.work-card .author {
    font-weight: 600;
    color: #555;
}

.work-card .phone {
    color: #667eea;
    font-weight: 500;
}

.work-card .status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status.pending {
    background-color: #ffc107;
    color: #333;
}

.status.approved {
    background-color: #28a745;
    color: white;
}

.status.rejected {
    background-color: #dc3545;
    color: white;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-header h3 {
    color: #333;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

.work-info .info-row {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.work-info .label {
    font-weight: 600;
    color: #555;
    margin-right: 10px;
}

.work-info #work-phone {
    color: #667eea;
    font-weight: 500;
}

.content-row {
    margin-top: 20px;
}

.content-row pre {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #eee;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
}

.download-row {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-row .btn-info {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.recommendations-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.recommendations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.recommendations-list {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.recommendation-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.recommendation-item:last-child {
    margin-bottom: 0;
}

.recommendation-author {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 1rem;
}

.recommendation-reason {
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.recommendation-time {
    color: #999;
    font-size: 0.85rem;
    font-style: italic;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 20px 30px;
    border-top: 1px solid #eee;
    background: #f9fafb;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .dashboard-main {
        padding: 20px;
    }

    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }

    .sms-form {
        flex-direction: column;
        align-items: stretch;
    }

    .sms-field input,
    .sms-field select {
        width: 100%;
    }

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

    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .login-container h1 {
        font-size: 2rem;
    }

    #login-form {
        padding: 30px 20px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
}