* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
        
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
}
        
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}
        
.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
        
.sidebar-header h2 {
    color: #3cc51f;
    font-size: 1.5em;
    margin-bottom: 5px;
}
        
.sidebar-header p {
    font-size: 0.9em;
    opacity: 0.8;
}
        
.sidebar-menu {
    padding: 20px 0;
}
        
.menu-item {
    display: block;
    padding: 15px 25px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}
        
.menu-item:hover, .menu-item.active {
    background: rgba(60, 197, 31, 0.1);
    border-left-color: #3cc51f;
    color: #3cc51f;
}
        
.menu-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.menu-item.has-submenu {
    position: relative;
}

.menu-item.has-submenu::after {
    content: '▼';
    position: absolute;
    right: 20px;
    font-size: 0.7em;
    transition: transform 0.3s ease;
}

.menu-item.has-submenu.expanded::after {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

.submenu.expanded {
    max-height: 500px;
}

.submenu-item {
    display: block;
    padding: 12px 25px 12px 50px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 0.9em;
}

.submenu-item:hover, .submenu-item.active {
    background: rgba(60, 197, 31, 0.15);
    border-left-color: #3cc51f;
    color: #3cc51f;
}
        
.main-content {
    margin-left: 250px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}
        
.topbar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
        
.topbar h1 {
    color: #2c3e50;
    font-size: 1.8em;
}
        
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
        
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 0.9em;
}
        
.btn-primary {
    background: #3cc51f;
    color: white;
}
        
.btn-primary:hover {
    background: #2ba015;
}
        
.btn-secondary {
    background: #6c757d;
    color: white;
}
        
.btn-secondary:hover {
    background: #5a6268;
}
        
.content-area {
    padding: 30px;
}
        
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
        
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
        
.stat-card:hover {
    transform: translateY(-5px);
}
        
.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
        
.stat-title {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}
        
.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    color: white;
}
        
.stat-icon.users { background: linear-gradient(45deg, #667eea, #764ba2); }
.stat-icon.pets { background: linear-gradient(45deg, #f093fb, #f5576c); }
.stat-icon.orders { background: linear-gradient(45deg, #4facfe, #00f2fe); }
.stat-icon.feeders { background: linear-gradient(45deg, #43e97b, #38f9d7); }
        
.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}
        
.stat-change {
    font-size: 0.9em;
    display: flex;
    align-items: center;
}
        
.stat-change.positive {
    color: #28a745;
}
        
.stat-change.negative {
    color: #dc3545;
}
        
.content-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

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

.card-item {
    position: relative;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.card-item.add-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-style: dashed;
    border-color: #d1fae5;
    background: rgba(240, 253, 244, 0.85);
    color: #059669;
    min-height: 150px;
    height: 100%;
}

.card-item.add-card .plus-icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 6px;
}

.card-item.add-card .add-text {
    font-size: 0.9em;
}

.card-title {
    font-size: 1.05em;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-subtitle {
    font-size: 0.85em;
    color: #6b7280;
    margin-bottom: 8px;
}

.card-meta {
    font-size: 0.8em;
    color: #4b5563;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 2px;
}

.card-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.card-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
    font-size: 0.75em;
}

.card-tag.green {
    background: rgba(16, 185, 129, 0.08);
    color: #047857;
}

.card-tag.amber {
    background: rgba(245, 158, 11, 0.08);
    color: #92400e;
}

.card-tag.gray {
    background: rgba(156, 163, 175, 0.12);
    color: #374151;
}

.empty-state {
    padding: 40px 0;
    text-align: center;
    color: #95a5a6;
    font-size: 0.95em;
}
        
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}
        
.section-title {
    font-size: 1.3em;
    color: #2c3e50;
    font-weight: 600;
}
        
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
        
.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
        
.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}
        
.data-table tr:hover {
    background: #f8f9fa;
}
        
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}
        
.status-active {
    background: #d4edda;
    color: #155724;
}
        
.status-pending {
    background: #fff3cd;
    color: #856404;
}
        
.status-completed {
    background: #cce5ff;
    color: #004085;
}
        
.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}
        
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.btn-group-more {
    position: relative;
}

.btn-more-toggle {
    min-width: 48px;
}

.more-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    min-width: 140px;
    background: #ffffff;
    border: 1px solid #e1e5ef;
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.15);
    padding: 6px 0;
    z-index: 10;
    display: none;
}

.more-menu-item {
    width: 100%;
    padding: 6px 12px;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 0.85em;
    cursor: pointer;
    color: #374151;
}

.more-menu-item:hover:not(:disabled) {
    background: #f3f4f6;
}

.more-menu-item:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.8em;
}
        
.btn-edit {
    background: #17a2b8;
    color: white;
}
        
.btn-delete {
    background: #dc3545;
    color: white;
}
        
.btn-view {
    background: #6c757d;
    color: white;
}
        
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

/* 分配喂养师模态框需要显示在其他模态框之上 */
#assignFeederModal {
    z-index: 3000;
}
        
.modal-content {
    background: #ffffff;
    margin: 5% auto;
    border-radius: 18px;
    width: 80%;
    max-width: 640px;
    max-height: 85vh;
    overflow: hidden;
    border: 1px solid rgba(231, 234, 243, 0.9);
    box-shadow: 0 30px 60px rgba(11, 20, 55, 0.15);
    display: flex;
    flex-direction: column;
}
        
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: linear-gradient(135deg, rgba(60, 197, 31, .12) 0%, rgba(60, 197, 31, .45) 100%);
    border-bottom: 1px solid rgba(60, 197, 31, 0.1);
}
        
.modal-title {
    font-size: 1.35em;
    color: #1f2d3d;
    font-weight: 600;
}
        
.close {
    font-size: 1.4em;
    cursor: pointer;
    color: rgba(31, 45, 61, 0.65);
    transition: transform .2s ease, color .2s ease;
}

.close:hover {
    color: #1f2d3d;
    transform: scale(1.08);
}
        
.modal-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-body {
    padding: 28px 32px 12px;
    overflow-y: auto;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

/* 让喂养师编辑弹窗在内容较多时可以内部滚动显示完整表单 */
#feederModal .modal-content {
    max-height: 90vh;
}

#feederModal .modal-body {
    max-height: 60vh;
}

/* 订单模态框滚动优化 */
#orderModal .modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#orderModal .modal-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

#orderModal .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

#orderModal .modal-footer {
    flex-shrink: 0;
}

/* 自定义日期和时间选择器样式 */
.custom-date-picker-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    min-height: 50px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.selected-date-tag {
    transition: transform 0.2s, box-shadow 0.2s;
}

.selected-date-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(60, 197, 31, 0.4) !important;
}

#order-date-picker-btn {
    background: #3cc51f;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(60, 197, 31, 0.3);
}

#order-date-picker-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(60, 197, 31, 0.4);
    background: #2ba015;
}

#order-date-picker-btn span {
    margin-right: 4px;
}

#order-time-picker-btn {
    background: #3cc51f;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(60, 197, 31, 0.3);
}

#order-time-picker-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(60, 197, 31, 0.4);
    background: #2ba015;
}

#order-service-time-display {
    padding-right: 100px;
    font-size: 0.95em;
}

#order-service-time-display:focus {
    border-color: #3cc51f;
    box-shadow: 0 0 0 3px rgba(60, 197, 31, 0.1);
}

/* 自定义选择器弹出框样式 */
.custom-picker-popup {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    min-width: 300px;
}

/* 中文日期选择器样式 */
.chinese-date-picker {
    background: #fff;
}

.picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #3cc51f;
    color: white;
}

.picker-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.2s;
}

.picker-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.picker-month-year {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.picker-year {
    font-size: 14px;
    opacity: 0.9;
}

.picker-month {
    font-size: 18px;
    font-weight: 600;
}

.picker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f5f7fa;
    border-bottom: 1px solid #e0e0e0;
}

.picker-weekday {
    text-align: center;
    padding: 10px 0;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.picker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding: 10px;
}

.picker-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    color: #333;
}

.picker-day.empty {
    cursor: default;
}

.picker-day.past {
    color: #ccc;
    cursor: not-allowed;
}

.picker-day:hover:not(.past):not(.empty) {
    background: rgba(60, 197, 31, 0.1);
    color: #3cc51f;
}

.picker-day.today {
    background: #ff9800;
    color: white;
    font-weight: 600;
}

.picker-day.selected {
    background: #3cc51f;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(60, 197, 31, 0.4);
}

.picker-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 20px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.picker-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.picker-btn-cancel,
.picker-btn-close {
    background: #f5f5f5;
    color: #666;
}

.picker-btn-cancel:hover,
.picker-btn-close:hover {
    background: #e0e0e0;
}

.picker-btn-confirm {
    background: #3cc51f;
    color: white;
}

.picker-btn-confirm:hover {
    background: #2ba015;
    box-shadow: 0 4px 12px rgba(60, 197, 31, 0.4);
}

/* 中文时间选择器样式 */
.chinese-time-picker {
    background: #fff;
    min-width: 280px;
}

.time-picker-body {
    display: flex;
    max-height: 300px;
}

.time-picker-column {
    flex: 1;
    border-right: 1px solid #e0e0e0;
    position: relative;
}

.time-picker-column:last-child {
    border-right: none;
}

.time-picker-label {
    text-align: center;
    padding: 12px 0;
    background: #f5f7fa;
    font-weight: 600;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
}

.time-picker-scroll {
    max-height: 260px;
    overflow-y: auto;
    padding: 10px 0;
}

.time-picker-item {
    padding: 12px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
    font-size: 15px;
}

.time-picker-item:hover {
    background: rgba(60, 197, 31, 0.1);
    color: #3cc51f;
}

.time-picker-item.selected {
    background: #3cc51f;
    color: white;
    font-weight: 600;
}

.time-picker-scroll::-webkit-scrollbar {
    width: 6px;
}

.time-picker-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.time-picker-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.time-picker-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.modal-footer {
    padding: 20px 32px 28px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #ffffff;
    border-top: 1px solid rgba(231, 234, 243, 0.8);
}

.form-grid {
    display: grid;
    gap: 18px 24px;
}

.form-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
        
.form-group {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
        
.form-label {
    display: block;
    font-weight: 600;
    color: #1f2d3d;
}
        
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #d7dde8;
    border-radius: 10px;
    font-size: 0.95em;
    background: #fdfefe;
    transition: border-color .2s ease, box-shadow .2s ease;
}
        
.form-control:focus {
    outline: none;
    border-color: #3cc51f;
    box-shadow: 0 0 0 3px rgba(60, 197, 31, 0.18);
    background: #ffffff;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.section-actions .search-input {
    min-width: 200px;
}

.price-cell {
    text-align: right;
    font-weight: 600;
    color: #1f2d3d;
}

.price-cell small {
    display: block;
    margin-top: 4px;
    font-weight: 400;
    color: #6c757d;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.btn-outline {
    background: transparent;
    color: #3cc51f;
    border: 1px solid rgba(60, 197, 31, 0.35);
}

.btn-outline:hover {
    border-color: rgba(43, 160, 21, 0.55);
    color: #2ba015;
    background: rgba(60, 197, 31, 0.08);
}

.suggest-dropdown {
    border: 1px solid #e1e5ef;
    border-top: none;
    display: none;
    max-height: 220px;
    overflow: auto;
    background: #ffffff;
    position: relative;
    margin-top: 4px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 18px 28px rgba(15, 23, 42, 0.12);
    z-index: 20;
}

.region-select-group {
    display: flex;
    gap: 12px;
}

.region-select-group .form-control {
    flex: 1;
}
        
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5em;
    color: #2c3e50;
    cursor: pointer;
}
        
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
            
    .sidebar.open {
        transform: translateX(0);
    }
            
    .main-content {
        margin-left: 0;
    }
            
    .mobile-menu-toggle {
        display: block;
    }
            
    .stats-grid {
        grid-template-columns: 1fr;
    }
            
    .data-table {
        font-size: 0.8em;
    }
            
    .action-buttons {
        flex-direction: column;
    }

    .modal-content {
        width: 92%;
        margin: 12% auto;
    }

    .modal-body {
        padding: 24px 20px 12px;
    }

    .modal-footer {
        padding: 18px 20px 24px;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
}

@media (max-width: 600px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}
        
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}
        
.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}
        
.success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}
        
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
        
.chart-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #dee2e6;
}
        
.chart-container {
    display: flex;
    align-items: end;
    height: 200px;
    gap: 10px;
    margin-top: 15px;
}
        
.chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}
        
.bar {
    width: 100%;
    background: linear-gradient(45deg, #3cc51f, #2ba015);
    border-radius: 4px 4px 0 0;
    min-height: 10px;
    transition: all 0.3s ease;
}
        
.bar:hover {
    background: linear-gradient(45deg, #2ba015, #1e7a0f);
}
        
.bar-label {
    margin-top: 10px;
    font-size: 0.8em;
    color: #666;
}
        
.bar-value {
    margin-top: 5px;
    font-size: 0.9em;
    font-weight: bold;
    color: #3cc51f;
}
        
.pie-chart {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 20px auto;
}
        
.pie-slice {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}
        
.slice {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform-origin: center;
}
        
.legend-item {
    display: flex;
    align-items: center;
    margin: 10px 0;
}
        
.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 10px;
}
        
.legend-label {
    font-size: 0.9em;
    color: #555;
}

/* 余额管理选项卡样式 */
.balance-tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.balance-tab-btn:hover {
    color: #007bff;
}

.balance-tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: 600;
}


