/* 公棚管家后台管理系统 - 统一样式 */
/* 基于 Layui 框架 */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f2f2f2;
    color: #333;
    line-height: 1.6;
}

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    margin-bottom: 30px;
}

.login-logo h1 {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

.login-logo p {
    color: #666;
    font-size: 14px;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-control:focus {
    outline: none;
    border-color: #5a9cf8;
    background: white;
    box-shadow: 0 0 0 3px rgba(90, 156, 248, 0.1);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* 后台布局样式 */
.admin-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.admin-sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    left: 0;
    top: 0;
    box-sizing: border-box;
    flex-shrink: 0;
}

.admin-header {
    background: white;
    border-bottom: 1px solid #e1e5e9;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    right: 0;
    left: 250px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: calc(100vw - 250px);
    box-sizing: border-box;
}

.admin-content {
    margin-left: 250px;
    margin-top: 60px;
    padding: 20px;
    background: #f8f9fa;
    min-height: calc(100vh - 60px);
    width: calc(100vw - 250px);
    box-sizing: border-box;
    overflow-x: auto;
    position: relative;
}

/* 搜索区域样式 */
.search-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-form {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

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

.search-input .layui-input {
    height: 40px;
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 0 15px;
    font-size: 14px;
}

.search-input .layui-input:focus {
    border-color: #5a9cf8;
    box-shadow: 0 0 0 2px rgba(90, 156, 248, 0.1);
}

.search-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-btn, .reset-btn {
    height: 40px;
    padding: 0 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.search-btn {
    background: #27ae60;
    color: white;
}

.search-btn:hover {
    background: #229954;
    transform: translateY(-1px);
}

.reset-btn {
    background: #95a5a6;
    color: white;
}

.reset-btn:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

.action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.add-btn {
    height: 40px;
    padding: 0 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #27ae60;
    color: white;
    text-decoration: none;
}

.add-btn:hover {
    background: #229954;
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.add-btn i {
    margin-right: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-header {
        left: 0;
        width: 100vw;
    }
    
    .admin-content {
        margin-left: 0;
        width: 100vw;
    }
    
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        min-width: auto;
    }
    
    .search-buttons {
        justify-content: center;
    }
}

/* 侧边栏样式 */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
}

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

.menu-item {
    display: block;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-item:hover,
.menu-item.active {
    background: #34495e;
    color: white;
    border-left-color: #3498db;
}

.menu-item i {
    margin-right: 10px;
    width: 16px;
}

/* 确保菜单下拉项不受普通菜单项样式影响 */
.menu-dropdown {
    display: block;
}

.menu-dropdown .menu-header {
    padding: 12px 20px;
    color: #bdc3c7;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-dropdown .menu-header:hover {
    background: #34495e;
    color: white;
    border-left-color: #3498db;
}

.menu-dropdown.active .menu-header {
    background: #34495e;
    color: white;
    border-left-color: #3498db;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
    font-weight: 600;
    font-size: 16px;
}

.card-body {
    padding: 20px;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tr:hover {
    background: #f8f9fa;
}

/* 按钮组样式 */
.btn-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-info {
    background: #3498db;
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-header {
        left: 0;
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .login-box {
        margin: 20px;
        padding: 30px 20px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 消息提示样式 */
.message {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.message-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.message-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.message-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

/* 展开菜单样式 */
.menu-dropdown {
    position: relative;
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: #bdc3c7;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-header:hover {
    background: #34495e;
    color: white;
    border-left-color: #3498db;
}

.menu-dropdown.active .menu-header {
    background: #34495e;
    color: white;
    border-left-color: #3498db;
}

.submenu {
    display: none;
    background: rgba(0, 0, 0, 0.1);
}

.menu-dropdown.active .submenu {
    display: block;
}

.submenu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px 12px 50px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.submenu-item:hover {
    background: #34495e;
    color: white;
    border-left-color: #3498db;
}

.submenu-item.active {
    background: #34495e;
    color: white;
    border-left-color: #3498db;
}

.submenu-item i {
    margin-right: 12px;
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.submenu-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.menu-dropdown.active .submenu-arrow {
    transform: rotate(180deg);
}

/* 子菜单组样式 */
.submenu-group {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(189, 195, 199, 0.2);
    padding-bottom: 10px;
}

.submenu-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.submenu-group-title {
    padding: 8px 20px 8px 50px;
    color: #95a5a6;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
}

.submenu-group .submenu-item {
    padding-left: 60px;
    font-size: 13px;
}

.submenu-group .submenu-item i {
    font-size: 12px;
    width: 14px;
}

 