/* ===== 智慧菜园 - 白底黑字主题 ===== */

/* ===== 基础样式 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
    font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* ===== 登录页面样式 ===== */
.login-container {
    max-width: 400px;
    padding: 45px 40px;
    margin: 70px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
    text-align: center;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 700;
}

.login-container h4 {
    text-align: center;
    color: #888;
    margin-bottom: 30px;
    font-weight: 400;
}

.login-container .form-group {
    margin-bottom: 18px;
}

.login-container .form-group label {
    color: #555;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 13px;
    letter-spacing: 1px;
}

.login-container .form-control {
    height: 44px;
    border-radius: 8px;
    border: 2px solid #e0e5ec;
    padding: 8px 14px;
    font-size: 14px;
    transition: all 0.3s;
    background: #fff;
    color: #333;
}

.login-container .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-container .btn {
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    border: none;
    font-size: 14px;
    font-weight: 600;
    margin-top: 10px;
    color: #fff;
}

.login-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* ===== 布局样式 ===== */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===== 侧边栏样式 ===== */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .sidebar-header h3,
.sidebar.collapsed .sidebar-header p,
.sidebar.collapsed .menu-item span,
.sidebar.collapsed .menu-section {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    padding: 20px 10px;
    text-align: center;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 14px 10px;
}

.sidebar.collapsed .menu-item i {
    margin: 0;
    font-size: 22px;
}

.sidebar-header {
    padding: 25px 20px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header h3 {
    background: linear-gradient(90deg, #3b82f6, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar-header p {
    color: rgba(255, 255, 255, 0.5);
    margin: 6px 0 0;
    font-size: 11px;
    letter-spacing: 1px;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-section {
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 18px 20px 10px;
    font-weight: 600;
}

.menu-item {
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    margin: 3px 0;
}

.menu-item:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #fff;
    border-left-color: #3b82f6;
}

.menu-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: #fff;
    border-left-color: #3b82f6;
}

.menu-item i {
    width: 22px;
    margin-right: 12px;
    font-size: 17px;
}

.menu-item span {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ===== 侧边栏折叠按钮 ===== */
.sidebar-toggle {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 17px;
    margin-right: 15px;
}

.sidebar-toggle:hover {
    background: rgba(59, 130, 246, 0.2);
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.3s;
}

/* ===== 主内容区域（白底黑字） ===== */
.main-content {
    flex: 1;
    margin-left: 250px;
    min-height: 100vh;
    transition: margin-left 0.3s;
    display: flex;
    flex-direction: column;
    background: #f5f7fa;
}

.main-content.expanded {
    margin-left: 70px;
}

.top-bar {
    background: #fff;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar h1 {
    margin: 0;
    font-size: 21px;
    color: #1e293b;
    font-weight: 600;
    flex: 1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.content-area {
    padding: 24px;
    flex: 1;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* ===== 页面标题 ===== */
.page-header {
    color: #1e293b;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid #3b82f6;
    position: relative;
}

/* ===== 统计卡片网格 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #10b981);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    color: #1e293b;
    font-size: 38px;
    font-weight: 700;
    margin: 0 0 8px;
}

.stat-card p {
    color: #888;
    font-size: 13px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===== 数据表格容器 ===== */
.data-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 20px;
}

.section-header {
    background: linear-gradient(90deg, #f8fafc, #f1f5f9);
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    color: #334155;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

/* ===== 搜索和筛选栏 ===== */
.filter-section {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
}

.filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-row .form-group {
    flex: 1;
    min-width: 180px;
    margin: 0;
}

.filter-row .btn {
    height: 38px;
}

/* ===== 表格样式 ===== */
.table-responsive {
    overflow-x: auto;
}

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

/* ASP.NET GridView 样式优化 */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.table th {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    font-weight: 600;
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border: none;
    border-bottom: 2px solid #1d4ed8;
    position: relative;
}

.table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #10b981;
    transition: width 0.3s;
}

.table th:hover::after {
    width: 80%;
}

.table td {
    padding: 13px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    vertical-align: middle;
    font-size: 13px;
}

.table tr {
    transition: all 0.3s;
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-striped tbody tr:nth-child(even) {
    background: #f8fafc;
}

.table-striped tbody tr:nth-child(even):hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.data-table thead th {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    color: #fff;
    font-weight: 600;
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: all 0.3s;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== 按钮样式 ===== */
.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
}

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

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

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

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #64748b;
}

.btn-secondary:hover {
    background: #cbd5e1;
    color: #475569;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 11px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ===== 表单样式 ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: #fff;
    color: #333;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ===== 状态标签样式 ===== */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-free,
.status-paid,
.status-approved {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.status-occupied,
.status-reserved {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-maintenance,
.status-rejected,
.status-unpaid {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.status-refunded {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

/* ===== 行操作按钮 ===== */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 5px 12px;
    font-size: 11px;
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #94a3b8; }
.text-primary { color: #3b82f6; }
.text-success { color: #10b981; }
.text-danger { color: #ef4444; }
.text-warning { color: #f59e0b; }

/* ===== 动画效果 ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1200px) {
    .sidebar {
        width: 220px;
    }
    .main-content {
        margin-left: 220px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }
    .sidebar .sidebar-header h3, 
    .sidebar .sidebar-header p, 
    .sidebar .menu-item span,
    .sidebar .menu-section {
        display: none;
    }
    .sidebar .menu-item {
        justify-content: center;
        padding: 14px 10px;
    }
    .main-content {
        margin-left: 70px;
    }
    .main-content.expanded {
        margin-left: 70px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
        width: 250px;
    }
    .main-content {
        margin-left: 0;
    }
    .content-area {
        padding: 16px 12px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .filter-row {
        flex-direction: column;
    }
    .filter-row .form-group {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
