/* PCDN机房收益管理系统 - 样式表 */

/* CSS变量 */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f1f5f9;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --font-display: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 深色主题 */
[data-theme="dark"] {
    --dark: #f1f5f9;
    --light: #0f172a;
    --white: #1e293b;
    --gray-light: #334155;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-display);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
}

/* 登录/注册页面 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo h1 {
    font-size: 1.8rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-logo p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: var(--gray);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--gray-light);
    color: var(--dark);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-warning {
    background: var(--warning);
    color: var(--dark);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 链接 */
.auth-link {
    text-align: center;
    margin-top: 24px;
    color: var(--gray);
    font-size: 0.9rem;
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* 主布局 */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 280px;
    background: var(--white);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-light);
}

.sidebar-header h1 {
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 700;
}

.sidebar-header p {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 4px;
}

.sidebar-menu {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.menu-section {
    margin-bottom: 24px;
}

.menu-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--gray);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding: 0 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.menu-item:hover {
    background: var(--light);
}

.menu-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.menu-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.menu-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--gray-light);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--light);
    border-radius: var(--radius-sm);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
}

.user-details {
    flex: 1;
}

.user-details .name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-details .role {
    font-size: 0.75rem;
    color: var(--gray);
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 24px;
    background: var(--light);
    min-height: 100vh;
}

/* 页面标题 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.page-title small {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 400;
    margin-left: 8px;
}

/* 卡片 */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stats-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.stat-card.compact {
    padding: 12px 16px;
}

.stat-card.compact .stat-value {
    font-size: 1.3rem;
}

.stat-card.compact .stat-label {
    font-size: 0.75rem;
}

.stat-card.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.stat-card.success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--white);
}

.stat-card.warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: var(--white);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* 日历样式 */
.calendar-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.calendar-nav button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.calendar-nav button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.calendar-month {
    font-size: 1.2rem;
    font-weight: 600;
}

.calendar-total {
    font-size: 1.5rem;
    font-weight: 700;
}

.calendar-total small {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.9;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--light);
    border-bottom: 1px solid var(--gray-light);
}

.calendar-weekday {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--gray-light);
    border-top: none;
    border-left: none;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day:hover {
    background: var(--light);
}

.calendar-day.other-month {
    background: #fafafa;
    color: var(--gray);
}

.calendar-day.today {
    background: rgba(99, 102, 241, 0.1);
}

.calendar-day.selected {
    background: var(--primary);
    color: var(--white);
}

.calendar-day.selected .day-income {
    color: rgba(255, 255, 255, 0.9);
}

.calendar-day.future {
    background: #fafafa;
}

.calendar-day.future .day-income {
    color: var(--gray);
    font-style: italic;
}

.day-number {
    font-weight: 600;
    margin-bottom: 8px;
}

.day-income {
    font-size: 0.9rem;
    color: var(--success);
    font-weight: 600;
}

.day-income.zero {
    color: var(--gray);
}

/* 表格 */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.table th {
    background: var(--light);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tr:hover {
    background: var(--light);
}

.table .actions {
    display: flex;
    gap: 8px;
}

/* 标签 */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.tag-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.tag-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.tag-info {
    background: rgba(14, 165, 233, 0.1);
    color: var(--secondary);
}

/* 模态框 */
.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;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal.modal-lg {
    max-width: 900px;
}

/* Tab样式 */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid var(--gray-light);
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 0;
}

.tab-btn {
    padding: 8px 14px;
    border: none;
    background: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-btn .count {
    background: var(--gray-light);
    color: var(--gray);
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    margin-left: 4px;
}

.tab-btn.active .count {
    background: var(--primary);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.speed-group-summary {
    display: flex;
    gap: 12px;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--light) 0%, #e2e8f0 100%);
    border-radius: 6px;
    margin-bottom: 10px;
}

.speed-group-summary .item {
    text-align: center;
}

.speed-group-summary .item .value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

.speed-group-summary .item .label {
    font-size: 0.7rem;
    color: var(--gray);
}

/* 主Tab样式 */
.main-tabs {
    display: inline-flex;
    gap: 8px;
    margin-bottom: 16px;
}

.main-tab-btn {
    padding: 10px 20px;
    border: 2px solid var(--gray-light);
    background: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.main-tab-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.main-tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.main-tab-btn svg {
    width: 16px;
    height: 16px;
}

.main-tab-content {
    display: none;
}

.main-tab-content.active {
    display: block;
}

/* 日志列表 */
.log-list {
    max-height: 500px;
    overflow-y: auto;
}

.log-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--gray-light);
    align-items: flex-start;
}

.log-item:last-child {
    border-bottom: none;
}

.log-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.log-icon.add {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.log-icon.stop {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.log-icon.edit {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.log-icon.delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.log-icon.problem {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.log-content {
    flex: 1;
}

.log-content .title {
    font-weight: 500;
    margin-bottom: 2px;
}

.log-content .desc {
    font-size: 0.85rem;
    color: var(--gray);
}

.log-time {
    font-size: 0.75rem;
    color: var(--gray);
    white-space: nowrap;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    line-height: 1;
}

.modal-body {
    padding: 16px 20px;
}

.modal-body.compact {
    padding: 12px 16px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 提示消息 */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--dark);
}

/* 加载状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 99;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* 响应式 */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .calendar-day {
        min-height: 70px;
        padding: 8px;
    }

    .day-income {
        font-size: 0.75rem;
    }

    .auth-card {
        padding: 24px;
    }

    .modal {
        margin: 12px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .calendar-weekday {
        font-size: 0.75rem;
        padding: 8px 4px;
    }

    .calendar-day {
        min-height: 60px;
        padding: 6px;
    }

    .day-number {
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
}

/* 问题宽带标记 */
.problem-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 分享权限选择 */
.permission-select {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.permission-option {
    flex: 1;
    padding: 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.permission-option:hover {
    border-color: var(--primary-light);
}

.permission-option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.permission-option h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.permission-option p {
    font-size: 0.8rem;
    color: var(--gray);
}

/* 机房卡片 */
.datacenter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.datacenter-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
}

.datacenter-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.datacenter-card-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.datacenter-card-header h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.datacenter-card-header p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.datacenter-card-body {
    padding: 20px;
}

.datacenter-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.datacenter-stat {
    text-align: center;
}

.datacenter-stat .value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.datacenter-stat .label {
    font-size: 0.8rem;
    color: var(--gray);
}

.datacenter-card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 输入框组 */
.input-group {
    display: flex;
    gap: 12px;
}

.input-group .form-control {
    flex: 1;
}

/* 切换开关 */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-light);
    transition: 0.3s;
    border-radius: 26px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.switch input:checked + .switch-slider {
    background-color: var(--primary);
}

.switch input:checked + .switch-slider:before {
    transform: translateX(22px);
}

/* 宽带列表项 */
.broadband-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 6px;
    margin-bottom: 6px;
    gap: 12px;
}

.broadband-item.has-problem {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.broadband-info {
    flex: 1;
    min-width: 0;
}

.broadband-account {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.broadband-meta {
    font-size: 0.75rem;
    color: var(--gray);
    line-height: 1.3;
}

.broadband-income {
    text-align: right;
    flex-shrink: 0;
}

.broadband-income .value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--success);
}

.broadband-income .label {
    font-size: 0.7rem;
    color: var(--gray);
}

/* 紧凑版宽带项 */
.broadband-item.compact {
    padding: 8px 10px;
    margin-bottom: 4px;
}

.broadband-item.compact .broadband-account {
    font-size: 0.85rem;
}

.broadband-item.compact .broadband-meta {
    font-size: 0.7rem;
}

.broadband-item.compact .broadband-income .value {
    font-size: 0.9rem;
}

