* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 20px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.card-wide {
    max-width: 100%;
}

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #28a745;
    color: #fff;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-info {
    background: #17a2b8;
    color: #fff;
}

.btn-info:hover {
    background: #138496;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.table tr:hover {
    background: #f8f9fa;
}

/* 表格容器支持横向滚动 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 导航栏 */
.navbar {
    background: #fff;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: #667eea;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    gap: 15px;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.navbar-nav a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
    font-size: 0.9rem;
}

.navbar-nav a:hover {
    color: #667eea;
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
    color: #fff;
}

.login-logo h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* 验证结果页面 */
.verify-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 40px 20px;
}

.verify-box {
    width: 100%;
    max-width: 800px;
}

.verify-result {
    text-align: center;
    padding: 40px;
}

.verify-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.verify-icon.success {
    color: #28a745;
}

.verify-icon.error {
    color: #dc3545;
}

.verify-icon.warning {
    color: #ffc107;
}

.cert-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.cert-info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cert-info-item:last-child {
    border-bottom: none;
}

.cert-info-label {
    font-weight: 500;
    color: #666;
}

.cert-info-value {
    font-weight: 600;
    color: #333;
}

/* PDF预览 */
.pdf-preview {
    margin-top: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.pdf-preview iframe {
    width: 100%;
    height: 600px;
    border: none;
}

/* 消息提示 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* 二维码显示 */
.qrcode-box {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.qrcode-box img {
    max-width: 200px;
    border: 5px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 操作按钮组 */
.btn-group {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    min-width: 280px;
}

/* 表格操作列 */
.table td:last-child {
    min-width: 300px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

/* 状态标签 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-primary {
    background: #cce5ff;
    color: #004085;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* 响应式 */
@media (max-width: 992px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .navbar-nav {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .navbar-nav {
        gap: 10px;
    }
    
    .navbar-nav a {
        font-size: 0.8rem;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 8px 10px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-sm {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}

/* 移动端适配 - 验证页面 (max-width: 480px) */
@media (max-width: 480px) {
    /* 1.2 优化验证结果内边距 */
    .verify-result {
        padding: 20px 15px;
    }
    
    /* 1.3 调整验证图标大小 */
    .verify-icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    
    /* 1.4 证书信息垂直堆叠布局 */
    .cert-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .cert-info-label {
        font-size: 0.85rem;
    }
    
    .cert-info-value {
        font-size: 0.95rem;
    }
    
    /* 2.1-2.2 PDF预览响应式高度 */
    .pdf-preview iframe {
        height: 350px;
    }
    
    /* 3.1-3.2 船舶信息表格响应式 */
    .ship-info-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 4.1 增大表单控件触摸区域 */
    .verify-container .form-control {
        padding: 14px 16px;
        font-size: 16px; /* 防止iOS自动缩放 */
    }
    
    /* 4.2 确保按钮足够大 */
    .verify-container .btn {
        padding: 14px 24px;
        min-height: 44px;
    }
    
    /* 验证页面标题优化 */
    .verify-result h2 {
        font-size: 1.25rem;
    }
    
    .verify-result h3 {
        font-size: 1.1rem;
    }
    
    /* 卡片内边距优化 */
    .verify-box .card {
        padding: 20px 15px;
    }
    
    /* 其他PDF文件按钮换行 */
    .verify-result .btn-sm {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}
