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

:root {
    --bg: #fff5eb;
    --side: #fff;
    --card: #fff;
    --text: #5c3317;
    --text-light: #8b5a2b;
    --border: #f0d0b0;
    --primary: #ff7e5f;
    --primary-light: #fff0e6;
    --primary-dark: #e66b4e;
    --secondary: #feb47b;
    --danger: #ff4444;
    --shadow: 0 1px 3px rgba(255, 126, 95, .15);
    --shadow-lg: 0 10px 15px -3px rgba(255, 126, 95, .2);
    --icon-color: #ff7e5f;
    --icon-bg: linear-gradient(135deg, #fff0e6 0%, #ffe0cc 100%);
}

.dark {
    --bg: #2d1810;
    --side: #3d2418;
    --card: #3d2418;
    --text: #ffe6d5;
    --text-light: #f0b080;
    --border: #5a3525;
    --primary: #ffa07a;
    --primary-light: #4a2818;
    --danger: #ff6b6b;
    --shadow: 0 1px 3px rgba(255, 160, 122, .3);
    --shadow-lg: 0 10px 15px -3px rgba(255, 160, 122, .35);
    --icon-color: #ffa07a;
    --icon-bg: linear-gradient(135deg, #4a2818 0%, #5a3828 100%);
}

body {
    background: linear-gradient(135deg, #fff5eb 0%, #ffe6d5 100%);
    color: var(--text);
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    display: flex;
    min-height: 100vh;
    transition: .3s;
}

.dark body {
    background: linear-gradient(135deg, #2d1810 0%, #3d2418 100%);
}

.sidebar {
    width: 280px;
    background: var(--side);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    padding: 24px 0;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    padding: 0 24px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cate-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    margin: 4px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: .2s;
    font-weight: 500;
    position: relative;
    flex-wrap: wrap;
}

.cate-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.cate-item:hover i {
    color: var(--primary);
}

.cate-item.active {
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    color: #fff;
}

.cate-item.active i {
    color: #fff;
}

.cate-img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.cate-item i {
    color: var(--text-light);
    transition: color 0.2s ease;
    font-size: 18px;
}

.cate-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.num {
    font-size: 12px;
    color: var(--text-light);
    background: var(--border);
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.cate-item.active .num {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.drag-handle {
    position: relative;
    z-index: 99;
    color: #ff7e5f;
    background: linear-gradient(135deg, #fff0e6 0%, #ffe0cc 100%);
    padding: 6px 4px;
    border-radius: 6px;
    cursor: grab;
    font-size: 18px;
}

.drag-handle:hover {
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    color: #fff;
}

.cate-item.active .drag-handle {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.cate-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
    justify-content: flex-end;
}

.cate-actions a {
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: .2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cate-actions .edit-btn {
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
}

.cate-actions .del-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
}

.cate-actions a:hover {
    opacity: .9;
    transform: translateY(-1px);
}

.box {
    padding: 20px;
    margin: 20px 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--shadow);
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    margin: 8px 0;
    outline: none;
    transition: .2s;
    font-size: 14px;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 126, 95, .2);
}

textarea {
    resize: vertical;
    min-height: 60px;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    color: #fff;
    cursor: pointer;
    margin-top: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: .2s;
}

.btn:hover {
    opacity: .9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn.btn-gray {
    background: linear-gradient(135deg, #f0d0b0 0%, #e8c0a0 100%);
    color: var(--text);
}

.btn.btn-gray:hover {
    background: linear-gradient(135deg, #ff9a76 0%, #ffb08e 100%);
    color: #fff;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.main {
    flex: 1;
    margin-left: 280px;
    padding: 24px;
}

.head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.head .search {
    flex: 1;
    min-width: 200px;
}

.head .user-info {
    flex-shrink: 0;
}

.head .btn-group {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.search {
    flex: 1;
    min-width: 200px;
}

.head .btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.head .btn {
    width: auto;
    padding: 10px 16px;
    margin: 0;
    font-size: 13px;
}

.user-info {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.user-info.active {
    display: flex;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    transition: .2s;
    box-shadow: var(--shadow);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card a {
    text-decoration: none;
    color: inherit;
}

.icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--icon-color);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.icon:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 126, 95, 0.25);
}

.icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.opt {
    position: absolute;
    right: 12px;
    top: 12px;
    display: flex;
    gap: 6px;
}

.opt a {
    color: #fff;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: .2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.opt .edit-btn {
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
}

.opt .del-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
}

.group-cate-title {
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 30px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99;
    backdrop-filter: blur(4px);
}

.modal-mask.active {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 400px;
    background: var(--side);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.modal-content h3 {
    margin-bottom: 16px;
    font-size: 17px;
}

.sortable-ghost {
    opacity: .3;
}

.sortable-drag {
    background: linear-gradient(135deg, #fff0e6 0%, #ffe0cc 100%) !important;
}

.error-tip {
    color: var(--danger);
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
}

.error-tip.hidden {
    display: none;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 24px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid var(--danger);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.loading {
    text-align: center;
    padding: 40px 0;
    color: var(--text-light);
}

.loading i {
    font-size: 24px;
}

.loading p {
    margin-top: 10px;
}

.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 16px 0;
    }

    .logo {
        padding: 0 16px 16px;
        font-size: 18px;
    }

    .main {
        margin-left: 0;
        padding: 16px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card {
        padding: 14px;
    }

    .icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .head {
        gap: 8px;
    }

    .head .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .cate-actions {
        justify-content: center;
    }

    .group-cate-title {
        margin: 24px 0 10px;
        font-size: 15px;
    }
    
    .user-info {
        gap: 8px;
        padding: 6px 12px;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .user-name {
        font-size: 13px;
        max-width: 100px;
    }
}

/* 任务模块样式 */
.task-section {
    padding: 0 16px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.task-section.hidden {
    display: none;
}

.task-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 12px;
    color: var(--primary);
}

.task-count-badge {
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

.task-list-sidebar {
    max-height: 200px;
    overflow-y: auto;
}

.empty-tasks {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-size: 13px;
}

.empty-tasks i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

.sidebar-task-item {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--primary-light);
    margin-bottom: 8px;
    cursor: pointer;
    transition: .2s;
    border-left: 3px solid var(--primary);
}

.sidebar-task-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.sidebar-task-item.priority-high {
    border-left-color: #ff6b6b;
}

.sidebar-task-item.priority-urgent {
    border-left-color: #ff0000;
    animation: urgentPulse 2s infinite;
}

@keyframes urgentPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(255, 0, 0, 0); }
}

.sidebar-task-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}

.sidebar-task-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-light);
    flex-wrap: wrap;
}

.task-priority-low { color: #10b981; }
.task-priority-medium { color: #f59e0b; }
.task-priority-high { color: #ef4444; }
.task-priority-urgent { color: #dc2626; font-weight: bold; }

/* 任务提醒弹窗 */
.task-reminder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.task-reminder-header h3 {
    margin: 0;
}

.task-reminder-list {
    max-height: 300px;
    overflow-y: auto;
}

.reminder-task-item {
    padding: 12px;
    border-radius: 10px;
    background: var(--primary-light);
    margin-bottom: 8px;
    cursor: pointer;
    transition: .2s;
    border-left: 3px solid var(--primary);
}

.reminder-task-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.reminder-task-item.priority-high {
    border-left-color: #ff6b6b;
}

.reminder-task-item.priority-urgent {
    border-left-color: #ff0000;
}

.reminder-task-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}

.reminder-task-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-light);
}

.task-reminder-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}

.task-reminder-actions .btn {
    margin: 0;
}

/* 任务详情模态框 */
.modal-content.modal-large {
    max-width: 600px;
}

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

.modal-header h3 {
    margin: 0;
}

.modal-header .btn {
    width: auto;
    padding: 6px 12px;
    margin: 0;
}

.task-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.task-detail-header h3 {
    margin: 0;
    flex: 1;
}

.task-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-light);
}

.task-detail-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-description {
    background: var(--primary-light);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.task-nodes-section {
    margin-top: 16px;
}

.task-nodes-section h4 {
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-node-detail {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    background: var(--primary-light);
    margin-bottom: 12px;
    border-left: 4px solid #e0e0e0;
    transition: .2s;
}

.task-node-detail.pending {
    border-left-color: #f59e0b;
}

.task-node-detail.in_progress {
    border-left-color: #ff7e5f;
    animation: inProgressPulse 2s infinite;
}

@keyframes inProgressPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 126, 95, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(255, 126, 95, 0); }
}

.task-node-detail.completed {
    border-left-color: #10b981;
    opacity: 0.8;
}

.task-node-detail.skipped {
    border-left-color: #9ca3af;
    opacity: 0.6;
}

.task-node-detail.active {
    border-left-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: scale(1.01);
}

.node-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.task-node-detail.completed .node-number {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.node-content {
    flex: 1;
}

.node-title-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
}

.node-status-small {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 8px;
}

.node-status-small.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.node-status-small.status-in_progress {
    background: #ffedd5;
    color: #c2410c;
}

.node-status-small.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.node-status-small.status-skipped {
    background: #f3f4f6;
    color: #4b5563;
}

.node-info {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-light);
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.node-desc {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.node-note {
    font-size: 13px;
    background: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 8px;
}

.node-complete-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

.node-no-permission {
    margin-top: 12px;
    padding: 12px;
    background: var(--warning-light);
    color: var(--warning);
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px dashed var(--warning);
}

.node-no-permission i {
    font-size: 16px;
}

.complete-note-input {
    width: 100%;
    margin-bottom: 8px;
}

.btn.btn-small {
    width: auto;
    padding: 8px 16px;
    margin: 0;
}

.btn.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

/* 任务状态徽章 */
.task-status-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-in_progress {
    background: #ffedd5;
    color: #c2410c;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background: #f3f4f6;
    color: #4b5563;
}

/* 加载小动画 */
.loading-small {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
}

.loading-small i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.remember-checkbox {
    margin: 12px 0;
}

.remember-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-light);
}

.remember-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
    background: var(--bg);
    flex-shrink: 0;
}

.remember-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    border-color: #ff7e5f;
}

.remember-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: #fff;
}

.divider {
    text-align: center;
    margin: 16px 0;
    color: var(--text-light);
    font-size: 13px;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.btn-wechat {
    background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
    color: #fff;
}

.btn-wechat:hover {
    background: linear-gradient(135deg, #06ad56 0%, #059652 100%);
}

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

.modal-wechat {
    max-width: 350px;
    text-align: center;
}

#wechatQrCodeContainer {
    margin: 20px 0;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-loading {
    text-align: center;
    padding: 40px 0;
    color: var(--text-light);
}

.qr-code-loading i {
    font-size: 32px;
    color: #07c160;
}

.qr-code-loading p {
    margin-top: 12px;
    font-size: 14px;
}

#wechatLoginFrame {
    width: 300px;
    height: 360px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.wechat-hint {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 16px;
}

/* 自动刷新控制样式 */
.auto-refresh-control {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: .3s;
    border-radius: 24px;
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-switch input:checked + .slider {
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(20px);
}

.auto-refresh-label {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.auto-refresh-countdown {
    font-size: 12px;
    color: var(--text-light);
    padding: 2px 8px;
    background: var(--primary-light);
    border-radius: 10px;
    min-width: 50px;
    text-align: center;
}

@media (max-width: 768px) {
    .auto-refresh-control {
        padding: 6px 10px;
    }
    
    .toggle-switch {
        width: 38px;
        height: 20px;
    }
    
    .toggle-switch .slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
    }
    
    .toggle-switch input:checked + .slider:before {
        transform: translateX(18px);
    }
    
    .auto-refresh-label {
        font-size: 12px;
    }
    
    .auto-refresh-countdown {
        font-size: 11px;
        min-width: 40px;
        padding: 2px 6px;
    }
}