* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f0f2f5;
    color: #333;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1a237e 0%, #283593 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
}

.sidebar-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h4 {
    font-weight: 600;
    letter-spacing: 1px;
}

.sidebar-nav {
    list-style: none;
    padding: 12px 0;
    flex: 1;
}

.nav-section {
    padding: 16px 20px 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}

.nav-item {
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: rgba(255,255,255,0.3);
}

.nav-link.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-left-color: #64b5f6;
    font-weight: 600;
}

.nav-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
}

.content-header {
    background: #fff;
    padding: 18px 28px;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.content-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a237e;
}

.content-body {
    padding: 28px;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    border-radius: 10px 10px 0 0 !important;
}

/* Upload zone */
.upload-zone {
    border: 2px dashed #c5cae9;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafbff;
    cursor: pointer;
}

.upload-zone:hover, .upload-zone.drag-over {
    border-color: #3f51b5;
    background: #e8eaf6;
}

.upload-icon {
    font-size: 64px;
    color: #7986cb;
    display: block;
    margin-bottom: 16px;
}

.upload-zone h5 {
    color: #333;
    margin-bottom: 8px;
}

/* Detection result */
.detection-result .badge {
    font-size: 14px;
    padding: 6px 14px;
}

#resultsTable th {
    width: 60%;
    color: #666;
    font-weight: 500;
}

#resultsTable td strong {
    color: #1a237e;
    font-size: 16px;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: #555;
    font-size: 13px;
}

/* Buttons */
.btn-primary {
    background-color: #3f51b5;
    border-color: #3f51b5;
}

.btn-primary:hover {
    background-color: #303f9f;
    border-color: #303f9f;
}

.btn-success {
    background-color: #43a047;
    border-color: #43a047;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .sidebar-header h4, .sidebar-header small, .nav-link span, .nav-section {
        display: none;
    }
    .nav-link {
        justify-content: center;
        padding: 12px;
    }
    .nav-link i {
        margin: 0;
    }
    .main-content {
        margin-left: 60px;
    }
}

/* Alert customization */
.alert {
    border-radius: 8px;
    border: none;
}

/* Spinner */
.spinner-border {
    vertical-align: middle;
}
