/**
 * 死了么样式文件
 * @project  一堆图
 * @module   死了么（独居安全守护）
 * @date     2026年1月14日
 * @notes    手机端样式
 */

/******************************公共样式***********************************/
.sile-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 30%);
    padding-bottom: 80px;
}

.sile-container {
    padding: 16px;
    margin: 0 auto;
}

/******************************首页/签到页***********************************/
/* 顶部状态卡片 */
.sile-status-card {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-radius: 16px;
    padding: 24px;
    color: #fff;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.sile-status-card.timeout {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.sile-status-card.closed {
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
    box-shadow: 0 4px 16px rgba(107, 114, 128, 0.3);
}

.sile-status-title {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.sile-status-text {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
}

.sile-status-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.8;
}

/* 签到按钮区域 */
.sile-sign-area {
    text-align: center;
    padding: 30px 0;
}

.sile-sign-btn {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border: none;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sile-sign-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.5);
}

.sile-sign-btn:active {
    transform: scale(0.98);
}

.sile-sign-btn.signed {
    background: linear-gradient(135deg, #9CA3AF 0%, #6B7280 100%);
    box-shadow: 0 8px 24px rgba(107, 114, 128, 0.3);
}

.sile-sign-btn .icon {
    font-size: 36px;
    margin-bottom: 4px;
}

.sile-sign-btn .text {
    font-size: 16px;
}

/* 连续签到天数 */
.sile-streak {
    margin-top: 20px;
    font-size: 14px;
    color: #6B7280;
}

.sile-streak-num {
    font-size: 28px;
    font-weight: 700;
    color: #10B981;
    margin: 0 4px;
}

/* 信息区域 */
.sile-info-area {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sile-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #F3F4F6;
}

.sile-info-item:last-child {
    border-bottom: none;
}

.sile-info-label {
    font-size: 14px;
    color: #6B7280;
}

.sile-info-value {
    font-size: 14px;
    color: #1F2937;
    font-weight: 500;
}

/* 快捷入口 */
.sile-quick-area {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.sile-quick-item {
    background: #fff;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: #1F2937;
    transition: all 0.2s ease;
}

.sile-quick-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sile-quick-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.sile-quick-text {
    font-size: 14px;
    color: #4B5563;
}

/******************************设置页***********************************/
.sile-setting-group {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sile-setting-title {
    font-size: 13px;
    color: #9CA3AF;
    padding: 12px 16px 8px;
    background: #F9FAFB;
}

.sile-setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #F3F4F6;
}

.sile-setting-item:last-child {
    border-bottom: none;
}

.sile-setting-label {
    font-size: 15px;
    color: #1F2937;
}

.sile-setting-desc {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 4px;
}

/* 开关样式 */
.sile-switch {
    position: relative;
    width: 50px;
    height: 28px;
}

.sile-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sile-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #E5E7EB;
    transition: 0.3s;
    border-radius: 28px;
}

.sile-switch-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sile-switch input:checked + .sile-switch-slider {
    background-color: #10B981;
}

.sile-switch input:checked + .sile-switch-slider:before {
    transform: translateX(22px);
}

/* 选择器样式 */
.sile-select {
    padding: 8px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    color: #1F2937;
    background: #fff;
    min-width: 100px;
}

/* 输入框样式 */
.sile-input {
    padding: 8px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    color: #1F2937;
    background: #fff;
    width: 80px;
    text-align: center;
}

/* 文本域样式 */
.sile-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    color: #1F2937;
    background: #fff;
    resize: vertical;
    min-height: 80px;
    margin-top: 8px;
}

/* 多选框组 */
.sile-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sile-checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: #F3F4F6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.sile-checkbox-item.active {
    background: #D1FAE5;
    color: #059669;
}

.sile-checkbox-item input {
    margin-right: 6px;
}

/* 保存按钮 */
.sile-save-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
    transition: all 0.3s;
}

.sile-save-btn:hover {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.sile-save-btn:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
}

/******************************联系人管理***********************************/
.sile-contact-list {
    margin-bottom: 16px;
}

.sile-contact-item {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.sile-contact-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #E5E7EB;
    margin-right: 12px;
    overflow: hidden;
}

.sile-contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sile-contact-info {
    flex: 1;
}

.sile-contact-name {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 4px;
}

.sile-contact-meta {
    font-size: 13px;
    color: #6B7280;
}

.sile-contact-priority {
    display: inline-block;
    padding: 2px 8px;
    background: #FEF3C7;
    color: #D97706;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 8px;
}

.sile-contact-actions {
    display: flex;
    gap: 8px;
}

.sile-contact-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sile-contact-btn.edit {
    background: #E0E7FF;
    color: #4F46E5;
}

.sile-contact-btn.delete {
    background: #FEE2E2;
    color: #DC2626;
}

/* 添加联系人按钮 */
.sile-add-btn {
    width: 100%;
    padding: 16px;
    background: #F3F4F6;
    border: 2px dashed #D1D5DB;
    border-radius: 12px;
    color: #6B7280;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.sile-add-btn:hover {
    background: #E5E7EB;
    border-color: #9CA3AF;
}

.sile-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 联系人限制提示 */
.sile-contact-limit {
    text-align: center;
    font-size: 13px;
    color: #9CA3AF;
    margin-top: 12px;
}

/******************************记录列表***********************************/
.sile-record-list {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sile-record-item {
    padding: 16px;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    align-items: center;
}

.sile-record-item:last-child {
    border-bottom: none;
}

.sile-record-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 12px;
}

.sile-record-icon.sign {
    background: #D1FAE5;
}

.sile-record-icon.noti {
    background: #DBEAFE;
}

.sile-record-info {
    flex: 1;
}

.sile-record-title {
    font-size: 15px;
    color: #1F2937;
    margin-bottom: 4px;
}

.sile-record-time {
    font-size: 12px;
    color: #9CA3AF;
}

.sile-record-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.sile-record-status.success {
    background: #D1FAE5;
    color: #059669;
}

.sile-record-status.pending {
    background: #FEF3C7;
    color: #D97706;
}

.sile-record-status.fail {
    background: #FEE2E2;
    color: #DC2626;
}

/* 空数据提示 */
.sile-empty {
    text-align: center;
    padding: 60px 20px;
    color: #9CA3AF;
}

.sile-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.sile-empty-text {
    font-size: 14px;
}

/******************************页面头部***********************************/
.sile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sile-header-title {
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
}

.sile-header-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #F3F4F6;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4B5563;
}

/******************************响应式适配***********************************/
@media (max-width: 375px) {
    .sile-sign-btn {
        width: 120px;
        height: 120px;
    }
    
    .sile-sign-btn .icon {
        font-size: 28px;
    }
    
    .sile-sign-btn .text {
        font-size: 14px;
    }
    
    .sile-streak-num {
        font-size: 24px;
    }
}
