.home-page {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.announcement-card {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.1);
}

.announcement-card-content {
    font-size: 14px;
    color: #9a3412;
    line-height: 1.8;
}

.home-page .stats-bar {
    flex-shrink: 0;
}

.dashboard-page {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.dashboard-page .toolbar {
    flex-shrink: 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-page .table-container {
    flex: 1 1 0;
    min-height: 200px;
    max-height: calc(100vh - 56px - 180px);
    overflow-y: auto;
    overflow-x: auto;
}

.batch-actions-footer {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    flex-shrink: 0;
}

.batch-actions-footer.visible {
    display: flex;
}

.batch-actions-footer .selected-count {
    font-size: 13px;
    color: var(--text-light);
    margin-right: auto;
}

.batch-actions-footer .btn {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 14px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 70px;
    height: 100%;
}

.stat-item:nth-child(2) {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.stat-item:nth-child(3) {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.stat-item:nth-child(4) {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.25);
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-top: 4px;
}

.stat-detail {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
}

.stat-detail-block {
    margin-top: 6px;
    text-align: left;
    width: 100%;
}

.stat-detail-row {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
}

.stat-detail-row-with-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.stat-detail-row-with-btn .text-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 1;
}

.stat-detail-row-with-btn .btn-card {
    flex-shrink: 0;
    padding: 10px 20px;
    font-size: 15px;
}

.stat-item.stat-item-detail {
    align-items: flex-start;
    text-align: left;
    min-width: 0;
}

.reward-yuan {
    font-size: 11px;
    color: #888;
    margin-left: 2px;
}

.slot-info {
    background: var(--bg);
    border-radius: 8px;
    padding: 14px;
    margin-top: 12px;
}

.slot-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.slot-info-item:last-child {
    border-bottom: none;
}

.slot-label {
    font-size: 14px;
    color: var(--text-light);
}

.slot-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.slot-value.slot-available {
    color: var(--success);
}

.slot-modal {
    max-width: 360px;
}

.slot-modal .modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
}

.slot-modal .modal-header h3 {
    font-size: 15px;
}

.modal-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    border-radius: 8px;
    color: #fff;
}

.modal-header-icon svg {
    width: 16px;
    height: 16px;
}

.slot-modal .modal-body {
    padding: 14px 16px;
}

.card-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.input-icon {
    position: absolute;
    left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    pointer-events: none;
}

.input-icon svg {
    width: 16px;
    height: 16px;
}

.card-input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--bg);
    color: var(--text);
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.card-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.card-input::placeholder {
    color: var(--text-light);
    font-family: inherit;
    letter-spacing: normal;
}

.slot-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.slot-info-card {
    background: var(--bg);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.slot-info-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.slot-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    flex-shrink: 0;
}

.slot-info-icon svg {
    width: 14px;
    height: 14px;
}

.free-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.card-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}

.total-icon {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
}

.slot-info-content {
    flex: 1;
    min-width: 0;
}

.slot-info-label {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.slot-info-number {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.slot-info-stats {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--bg);
    border-radius: 8px;
    padding: 10px;
}

.slot-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.slot-stat-label {
    font-size: 11px;
    color: var(--text-light);
}

.slot-stat-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.slot-stat-value.available {
    color: var(--success);
}

.slot-stat-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
}

.slot-modal .modal-footer {
    padding: 10px 16px;
}

.profile-page {
    padding: 10px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 100%;
}

.profile-card {
    background: white;
    border-radius: 6px;
    padding: 8px 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    align-self: start;
}

.user-card {
    grid-column: span 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    color: white;
    padding: 6px 12px;
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar svg {
    width: 16px;
    height: 16px;
}

.user-info h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.user-info span {
    font-size: 12px;
    opacity: 0.9;
    color: rgba(255,255,255,0.9);
}

.user-card-actions .btn-outline {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 12px;
    padding: 3px 10px;
}

.user-card-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.3);
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.record-count {
    font-size: 12px;
    font-weight: 400;
    color: #999;
}

.mini-stats {
    display: flex;
    justify-content: space-around;
}

.mini-stat {
    text-align: center;
}

.mini-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.mini-stat-label {
    font-size: 12px;
    color: #777;
    margin-top: 2px;
}

.slot-card {
    grid-column: span 3;
    overflow: visible;
}

.slot-table-header {
    display: grid;
    grid-template-columns: 60px 50px 1fr;
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
    color: #888;
    font-size: 12px;
}

.slot-table {
    font-size: 13px;
}

.slot-table-row {
    display: grid;
    grid-template-columns: 60px 50px 1fr;
    gap: 6px;
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
}

.slot-table-row:last-child {
    border-bottom: none;
}

.account-modal {
    max-width: 400px;
}

.account-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px 14px;
    border-bottom: none;
}

.account-modal-header h3 {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-modal-header .modal-header-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.account-modal-header .modal-close {
    color: rgba(255, 255, 255, 0.8);
    font-size: 22px;
}

.account-modal-header .modal-close:hover {
    color: #fff;
}

.account-form {
    padding: 12px 16px;
}

.account-form .form-group {
    margin-bottom: 10px;
}

.account-form .form-group:last-child {
    margin-bottom: 0;
}

.account-form .form-group label {
    font-size: 12px;
    margin-bottom: 3px;
}

.account-form .form-group input,
.account-form .form-group select,
.account-form .form-group textarea {
    padding: 6px 8px;
    font-size: 12px;
}

.account-form textarea {
    min-height: 100px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 11px;
    line-height: 1.4;
}

.account-form .form-row {
    gap: 8px;
}

.account-form .form-row.compact-row {
    display: flex;
    gap: 8px;
}

.account-form .form-row.compact-row .form-group {
    flex: 1;
}

.account-form .form-row.compact-row .form-group:first-child {
    flex: 0 0 auto;
}

.account-form select.auto-width {
    width: auto;
    min-width: 80px;
    padding-right: 28px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.account-form .small-input {
    width: 55px !important;
    min-width: 55px;
    text-align: center;
    padding: 5px 4px !important;
}

.input-range {
    display: flex;
    align-items: center;
    gap: 3px;
}

.input-range input {
    width: 45px;
    min-width: 45px;
}

.input-range span {
    color: var(--text-light);
    font-size: 11px;
}

.task-config-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--bg);
    padding: 8px;
    border-radius: 8px;
}

.task-config-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s;
}

.task-config-item:last-child {
    border-bottom: none;
}

.task-config-item .switch {
    flex-shrink: 0;
    transform: scale(0.85);
}

.task-config-item .task-name {
    font-size: 12px;
    color: var(--text);
    font-weight: 500;
}

.task-config-item .task-count {
    width: 42px;
    padding: 2px 4px !important;
    font-size: 11px !important;
    text-align: center;
    border-radius: 3px !important;
}

.task-config-item .task-unit {
    font-size: 11px;
    color: var(--text-light);
}

.account-modal .modal-footer {
    padding: 10px 14px;
}

@media (max-width: 768px) {
    .home-page {
        justify-content: flex-start;
        padding-top: 16px;
    }
    
    .announcement-card {
        padding: 12px 16px;
        margin-top: 12px;
    }
    
    .announcement-card-content {
        font-size: 13px;
    }
    
    .dashboard-page {
        padding: 12px;
    }
    
    .dashboard-page .toolbar {
        gap: 10px;
    }
    
    .dashboard-page .table-container {
        flex: 1 1 0;
        min-height: 150px;
        max-height: calc(100vh - 56px - 140px);
    }
    
    .batch-actions-footer {
        padding: 8px 0;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .batch-actions-footer .selected-count {
        font-size: 12px;
    }
    
    .batch-actions-footer .btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-item {
        padding: 12px 10px;
        min-height: 60px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-detail-row {
        font-size: 12px;
    }
    
    .profile-page {
        padding: 6px;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 6px;
        flex: none;
    }
    
    .user-card {
        grid-column: span 1;
        flex-direction: row;
        text-align: left;
        gap: 8px;
        padding: 6px 10px;
    }
    
    .user-card-header {
        flex-direction: row;
        gap: 8px;
    }
    
    .slot-card {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stat-item {
        padding: 10px 8px;
        min-height: 55px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .stat-detail-row {
        font-size: 11px;
        word-break: break-all;
    }
    
    .stat-detail-block {
        overflow: hidden;
    }
    
    .stat-detail-row-with-btn {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .stat-detail-row-with-btn .btn-card {
        padding: 6px 12px;
        font-size: 12px;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        color: #5a67d8;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .stat-detail-row-with-btn .btn-card:hover {
        background: #fff;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }
    
    .slot-info {
        padding: 12px;
    }
    
    .slot-info-item {
        padding: 6px 0;
    }
    
    .slot-label,
    .slot-value {
        font-size: 13px;
    }
    
    .slot-info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .slot-info-card {
        padding: 12px;
    }
    
    .slot-info-number {
        font-size: 18px;
    }
    
    .slot-info-stats {
        padding: 12px;
    }
    
    .slot-stat-value {
        font-size: 16px;
    }
    
    .account-modal {
        max-width: 100%;
    }
    
    .account-form {
        padding: 10px 12px;
    }
    
    .account-form .form-row.compact-row {
        flex-wrap: wrap;
    }
    
    .account-form .form-row.compact-row .form-group:first-child {
        flex: 1 1 auto;
    }
    
    .task-config-item {
        flex-wrap: nowrap;
    }
}

.bind-slot-list {
    max-height: 300px;
    overflow-y: auto;
}

.bind-slot-table {
    width: 100%;
    border-collapse: collapse;
}

.bind-slot-table th,
.bind-slot-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.bind-slot-table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    position: sticky;
    top: 0;
    z-index: 1;
}

.bind-slot-table td {
    font-size: 13px;
    color: var(--text);
}

.bind-slot-table tbody tr:hover {
    background: var(--bg);
}

.bind-slot-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
    font-size: 14px;
}

.badge-free {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.badge-card {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.toast-tip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: center;
    max-width: 280px;
}

.toast-tip.show {
    opacity: 1;
}
