/* 跨境电商税费计算器 - 公共样式 */

:root {
    --primary-color: #007bff;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* 导航栏 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

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

.card-header {
    background-color: white;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
    padding: 1.25rem;
}

/* 按钮样式 */
.btn {
    border-radius: 5px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

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

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* 表单样式 */
.form-control {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 0.75rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

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

.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo h1 {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.auth-logo p {
    color: #6c757d;
}

/* 仪表板 */
.dashboard-header {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.stat-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-card .label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* 公司卡片 */
.company-card {
    cursor: pointer;
    transition: all 0.3s;
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.company-card .badge {
    font-size: 0.8rem;
}

/* 国家选择 */
.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.country-item {
    padding: 1.5rem;
    text-align: center;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.country-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.country-item.selected {
    border-color: var(--primary-color);
    background-color: #e7f3ff;
}

.country-item .flag {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.country-item .name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.country-item .code {
    color: #6c757d;
    font-size: 0.85rem;
}

/* 计算结果 */
.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item .label {
    font-weight: 500;
}

.result-item .value {
    font-weight: bold;
    font-size: 1.2rem;
}

/* 表格样式 */
.table {
    background: white;
}

.table thead th {
    border-top: none;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* 消息提示 */
.alert {
    border-radius: 5px;
    border: none;
}

/* 加载动画 */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* 响应式 */
@media (max-width: 768px) {
    .auth-card {
        margin: 1rem;
    }
    
    .country-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

/* 工具类 */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }
