/* 
 * 江苏第三代半导体研究院有限公司
 * 测试分析与服役评价平台 - 样式表
 * 设计风格：专业、科技、前沿
 */

:root {
    /* Logo配色 - 彩色渐变 */
    --logo-blue: #0066cc;
    --logo-cyan: #00a8cc;
    --logo-green: #00b894;
    --logo-yellow: #f39c12;
    --logo-red: #e74c3c;
    --logo-purple: #8e44ad;
    
    /* 主色调 - 科技深蓝 */
    --primary-color: #003366;
    --primary-dark: #001a33;
    --primary-light: #004d99;
    --primary-gradient: linear-gradient(135deg, #003366 0%, #0066cc 100%);
    
    /* 辅助色 */
    --secondary-color: #00a8cc;
    --accent-color: #00b894;
    
    /* 状态色 */
    --success-color: #00b894;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #00a8cc;
    
    /* 中性色 */
    --dark-text: #1a1a2e;
    --gray-text: #5a6c7d;
    --light-bg: #f0f4f8;
    --white: #ffffff;
    --border-color: #e1e8ed;
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0,51,102,0.08);
    --shadow-md: 0 4px 12px rgba(0,51,102,0.12);
    --shadow-lg: 0 8px 24px rgba(0,51,102,0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', '微软雅黑', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-bg);
    min-height: 100vh;
}

/* ===== 顶部机构信息栏 ===== */
.institution-bar {
    background: var(--primary-dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 13px;
}

.institution-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.institution-name {
    font-weight: 500;
    letter-spacing: 0.5px;
}

.institution-contact {
    font-size: 12px;
    opacity: 0.9;
}

/* ===== 导航栏 ===== */
.navbar {
    background: var(--white);
    padding: 0;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    display: flex;
    align-items: center;
    padding: 10px 0;
}

.logo-img {
    height: 50px;
    width: auto;
    margin-right: 15px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-platform {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--gray-text);
    margin-top: 2px;
}

.navbar-nav {
    margin-left: auto;
}

.navbar-nav .nav-link {
    color: var(--dark-text) !important;
    padding: 25px 18px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--logo-blue), var(--logo-cyan), var(--logo-green));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 60%;
}

/* ===== 主内容区 ===== */
.main-content {
    min-height: calc(100vh - 200px);
    padding-bottom: 3rem;
}

/* ===== 卡片样式 ===== */
.card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 1.5rem;
    font-weight: 600;
    border-bottom: none;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.card-header h5 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 1.5rem;
}

/* ===== 统计卡片 ===== */
.stat-card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card.success { border-top-color: var(--success-color); }
.stat-card.warning { border-top-color: var(--warning-color); }
.stat-card.info { border-top-color: var(--info-color); }
.stat-card.danger { border-top-color: var(--danger-color); }

.stat-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    background: var(--primary-color);
    color: var(--white);
}

.stat-card.success .icon { background: var(--success-color); }
.stat-card.warning .icon { background: var(--warning-color); }
.stat-card.info .icon { background: var(--info-color); }
.stat-card.danger .icon { background: var(--danger-color); }
.stat-card.danger .number { color: var(--danger-color); }

.stat-card .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.stat-card .label {
    color: var(--gray-text);
    font-size: 0.95rem;
}

/* ===== 按钮样式 ===== */
.btn {
    border-radius: 6px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-warning {
    background: var(--warning-color);
    color: var(--white);
}

.btn-info {
    background: var(--info-color);
    color: var(--white);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ===== 表格样式 ===== */
.table-container {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table {
    margin-bottom: 0;
}

.table thead th,
.table thead.table-light th,
.table-light thead th {
    background: var(--primary-color);
    color: var(--white) !important;
    font-weight: 600;
    border: none;
    padding: 1rem;
    font-size: 14px;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: var(--border-color);
    font-size: 14px;
}

.table tbody tr:hover {
    background-color: rgba(0, 102, 204, 0.03);
}

/* ===== 状态标签 ===== */
.status-badge {
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-approved { background: #cce5ff; color: #004085; }
.status-processing { background: #cce5ff; color: #004085; }
.status-in_progress { background: #cce5ff; color: #004085; }
.status-completed { background: #d4edda; color: #155724; }
.status-settled { background: #343a40; color: #fff; }
.status-rejected { background: #f8d7da; color: #721c24; }
.status-cancelled { background: #e2e3e5; color: #383d41; }
.status-terminated { background: #f5c6cb; color: #721c24; }

/* 数字角标气泡 */
.badge-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #dc3545;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 0.25rem;
}

/* ===== 表单样式 ===== */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 0.7rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

/* ===== 登录/注册表单 ===== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    padding: 2rem;
    position: relative;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-bg.jpg') center/cover;
    opacity: 0.1;
}

.auth-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.auth-card .logo-img {
    max-height: 80px;
    max-width: 100%;
    width: auto;
    height: auto;
    margin-bottom: 0.75rem;
    object-fit: contain;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.auth-card .brand-subtitle {
    text-align: center;
    color: var(--gray-text);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
}

/* ===== 设备卡片 ===== */
.equipment-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid var(--border-color);
}

.equipment-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.equipment-card .card-img-top {
    height: 160px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--logo-blue) 50%, var(--logo-cyan) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2.5rem;
    position: relative;
}

.equipment-card .card-body {
    padding: 1.5rem;
}

.equipment-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.equipment-card .equipment-code {
    display: inline-block;
    background: linear-gradient(90deg, var(--logo-blue), var(--logo-cyan));
    color: var(--white);
    padding: 0.2rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
}

.equipment-card .price {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
}

.equipment-card .price-unit {
    font-size: 0.9rem;
    color: var(--gray-text);
}

/* ===== 侧边栏 ===== */
.sidebar {
    background: var(--white);
    min-height: calc(100vh - 130px);
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    padding: 1.5rem 0;
    border-right: 1px solid var(--border-color);
}

.sidebar .nav-link {
    padding: 0.9rem 1.5rem;
    color: var(--dark-text);
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 15px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(0, 102, 204, 0.06);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sidebar .nav-link i {
    width: 24px;
    margin-right: 0.5rem;
    color: var(--gray-text);
}

.sidebar .nav-link.active i,
.sidebar .nav-link:hover i {
    color: var(--primary-color);
}

/* ===== 消息提示 ===== */
.alert {
    border-radius: 6px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-error, .alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ===== 首页 Hero ===== */
.hero {
    background: linear-gradient(135deg, rgba(0,26,51,0.95) 0%, rgba(0,51,102,0.9) 100%),
                url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.hero .platform-name {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    letter-spacing: 3px;
    background: linear-gradient(90deg, var(--logo-cyan), var(--logo-green), var(--logo-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 2rem;
    font-weight: 300;
}

.hero .btn-light {
    background: var(--white);
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.8rem 2rem;
    border: 2px solid var(--white);
}

.hero .btn-outline-light {
    color: var(--white);
    border: 2px solid var(--white);
    font-weight: 600;
    padding: 0.8rem 2rem;
}

.hero .btn-outline-light:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* ===== 步骤指示器 ===== */
.steps-section {
    background: var(--white);
    padding: 4rem 0;
}

.steps-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-weight: 600;
}

.steps {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.step {
    display: flex;
    align-items: flex-start;
    padding: 0 2rem;
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 300px;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 25px;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--border-color);
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--logo-blue));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content h5 {
    margin: 0 0 0.3rem;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.step-content p {
    margin: 0;
    color: var(--gray-text);
    font-size: 0.9rem;
}

/* ===== 特色服务 ===== */
.features-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

.features-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-weight: 600;
}

.feature-item {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--primary-color);
}

.feature-item h5 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.feature-item p {
    color: var(--gray-text);
    font-size: 0.95rem;
}

/* ===== 关于我们/大楼展示 ===== */
.building-section {
    padding: 4rem 0;
    background: var(--white);
}

.building-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-weight: 600;
}

.building-img {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero .platform-name {
        font-size: 1.1rem;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .brand-platform {
        font-size: 14px;
    }
    
    .brand-subtitle {
        font-size: 10px;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .steps {
        flex-direction: column;
        align-items: center;
    }
    
    .step {
        margin-bottom: 1.5rem;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
    
    .sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

/* ===== 页脚 ===== */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.8);
    padding: 2.5rem 0;
    text-align: center;
}

.footer-content {
    margin-bottom: 1rem;
}

.footer-company {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.footer-platform {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-copyright {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-top: 1rem;
}

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

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ===== 面包屑 ===== */
.breadcrumb-section {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.breadcrumb {
    margin: 0;
    font-size: 14px;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--gray-text);
}
