﻿/* ============================================================
   DNS 管理系统 - Bootstrap 5 自定义样式
   依赖: Bootstrap 5.3 + Bootstrap Icons (CDN)
   ============================================================ */

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --accent: #34a853;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --card-hover-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
    background: #f1f5f9;
    min-height: 100vh;
}

.navbar {
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.3px;
}
.navbar .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: background 0.2s;
}
.navbar .nav-link:hover {
    background: rgba(26,115,232,0.08);
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}
.card-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
    font-weight: 600;
    border-radius: 12px 12px 0 0 !important;
}

.table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    border-bottom-width: 1px;
    white-space: nowrap;
}
.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.nav-tabs {
    border-bottom: 2px solid #e2e8f0;
    gap: 2px;
}
.nav-tabs .nav-link {
    border: none;
    color: #64748b;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s;
}
.nav-tabs .nav-link:hover {
    color: var(--primary);
    background: rgba(26,115,232,0.04);
    border: none;
}
.nav-tabs .nav-link.active {
    color: var(--primary);
    background: #fff;
    border: none;
    border-bottom: 2px solid var(--primary);
    font-weight: 600;
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.btn {
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s;
}
.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.form-control, .form-select {
    border-radius: 8px;
    border-color: #e2e8f0;
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}
.form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 0.4rem;
}

.modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
}
.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
}
.modal-body {
    padding: 1.5rem;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.custom-toast {
    background: #fff;
    border-radius: 10px;
    padding: 14px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 320px;
    max-width: 440px;
    animation: toastSlideIn 0.3s ease-out;
    border-left: 4px solid #64748b;
    font-size: 0.9rem;
}
.custom-toast.success { border-left-color: #22c55e; }
.custom-toast.error { border-left-color: #ef4444; }
.custom-toast.info { border-left-color: #3b82f6; }
.custom-toast .toast-msg { flex: 1; }
.custom-toast .toast-close {
    background: none; border: none; color: #94a3b8;
    cursor: pointer; font-size: 1.2rem; padding: 0 4px;
}
.custom-toast .toast-close:hover { color: #475569; }

/* Legacy toast class support */
.toast-container .toast {
    background: #fff;
    border-radius: 10px;
    padding: 14px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 320px;
    max-width: 440px;
    animation: toastSlideIn 0.3s ease-out;
    border-left: 4px solid #64748b;
    font-size: 0.9rem;
}
.toast-container .toast.success { border-left-color: #22c55e; }
.toast-container .toast.error { border-left-color: #ef4444; }
.toast-container .toast.info { border-left-color: #3b82f6; }
.toast-container .toast .toast-content { flex: 1; }
.toast-container .toast .toast-close {
    background: none; border: none; color: #94a3b8;
    cursor: pointer; font-size: 1.2rem; padding: 0 4px;
}

@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Stats */
.stat-card {
    border-radius: 12px;
    padding: 1.5rem;
    background: #fff;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}
.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}
.stat-card .stat-label {
    font-size: 0.85rem;
    color: #64748b;
}

/* Provider badges */
.provider-cf { background: #f48120; color: #fff; }
.provider-west { background: #0066cc; color: #fff; }
.provider-huawei { background: #cf0a2c; color: #fff; }
.provider-tencent { background: #006eff; color: #fff; }
.provider-aliyun { background: #ff6a00; color: #fff; }

/* Pricing */
.pricing-card {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    transition: all 0.3s;
    position: relative;
    background: #fff;
}
.pricing-card:hover {
    border-color: var(--primary);
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-4px);
}
.pricing-card.recommended {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}
.pricing-card .recommended-badge {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    font-size: 0.8rem; font-weight: 600;
}

/* Hero */
.hero-section {
    background: linear-gradient(135deg, #1e3a5f 0%, #1a73e8 100%);
    padding: 100px 0 80px;
    color: #fff;
}
.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
}
.hero-section .lead {
    font-size: 1.15rem;
    opacity: 0.9;
}

/* Auth pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 20px;
}
.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 420px;
}

@media (max-width: 768px) {
    .hero-section h1 { font-size: 2rem; }
    .hero-section { padding: 60px 0 50px; }
}
