/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* 布局 */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 240px;
    background: linear-gradient(to bottom, #2c3e50, #34495e);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar h2 {
    padding: 20px;
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.15);
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.sidebar li {
    margin: 8px 0;
}

.sidebar li a {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.sidebar li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar li a.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-left: 4px solid #3498db;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 20px;
    background-color: #f8f9fa;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.page-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.page-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
    color: #2c3e50;
}

.content {
    padding-bottom: 30px;
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    border: none;
    overflow: hidden;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 15px 20px;
}

.card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #2c3e50;
}

.card-body {
    padding: 20px;
}

/* 表格样式 */
.table-container {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.table {
    width: 100%;
    margin-bottom: 0;
    background-color: #fff;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 500;
    padding: 12px 15px;
    color: #6c757d;
    border-bottom: 2px solid #e9ecef;
    text-transform: uppercase;
    font-size: 12px;
}

.table td {
    padding: 12px 15px;
    vertical-align: middle;
    border-top: 1px solid #e9ecef;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 数据单元格样式 */
.address-cell {
    font-family: 'Consolas', 'Monaco', monospace;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.number-cell {
    font-family: monospace;
    text-align: right;
    padding-right: 15px !important;
    font-size: 13px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #495057;
    display: block;
}

.form-control, .form-select {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
    font-size: 14px;
    transition: all 0.2s ease;
    background-color: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.input-group {
    display: flex;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-left: 0;
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: #6c757d;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background-color: #3498db;
    border-color: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-outline-success {
    color: #2ecc71;
    border-color: #2ecc71;
    background-color: transparent;
}

.btn-outline-success:hover {
    background-color: #2ecc71;
    color: #fff;
}

.btn-outline-secondary {
    color: #95a5a6;
    border-color: #95a5a6;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    background-color: #95a5a6;
    color: #fff;
}

.btn-outline-danger {
    color: #e74c3c;
    border-color: #e74c3c;
    background-color: transparent;
}

.btn-outline-danger:hover {
    background-color: #e74c3c;
    color: #fff;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-group {
    display: flex;
}

/* 徽章样式 */
.badge {
    padding: 0.5em 0.8em;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
}

.bg-success {
    background-color: #2ecc71 !important;
}

.bg-secondary {
    background-color: #95a5a6 !important;
}

.bg-primary {
    background-color: #3498db !important;
}

/* 常用工具类 */
.mb-3 {
    margin-bottom: 15px;
}

.mb-4 {
    margin-bottom: 20px;
}

.mt-3 {
    margin-top: 15px;
}

.mt-4 {
    margin-top: 20px;
}

.me-1 {
    margin-right: 5px;
}

.py-3 {
    padding-top: 15px;
    padding-bottom: 15px;
}

.text-center {
    text-align: center;
}

.text-end {
    text-align: right;
}

.fw-medium {
    font-weight: 500;
}

/* 响应式布局 */
@media (max-width: 992px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* 操作结果提示 */
#operation-result {
    min-height: 60px;
} 