/* FYCP Tools — 企业级 UI 设计系统 */

:root {
    --brand-primary: #1677ff;
    --brand-primary-hover: #4096ff;
    --brand-gradient: linear-gradient(135deg, #0958d9 0%, #1677ff 50%, #69b1ff 100%);
    --surface: #ffffff;
    --surface-muted: #f5f7fa;
    --border: #e8ecf1;
    --text-primary: #1d2129;
    --text-secondary: #86909c;
    --shadow-sm: 0 1px 2px rgba(29, 33, 41, 0.04);
    --shadow-md: 0 4px 16px rgba(29, 33, 41, 0.08);
    --shadow-lg: 0 8px 32px rgba(29, 33, 41, 0.12);
    --radius: 12px;
    --radius-lg: 16px;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ========== 登录页分屏 ========== */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 900px) {
    .login-page { grid-template-columns: 1fr; }
    .login-brand { min-height: 280px; }
}

.login-brand {
    background: linear-gradient(160deg, #0a0a0a 0%, #141420 40%, #1a1a2e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: "";
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    top: -120px;
    right: -120px;
}

.login-brand::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    bottom: -80px;
    left: -80px;
}

.login-brand-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

.login-logo {
    width: min(320px, 75vw);
    height: auto;
    margin-bottom: 32px;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.login-brand-title {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 2px;
    margin-bottom: 8px;
    color: #d4a853;
}

.login-brand-desc {
    font-size: 15px;
    opacity: 0.85;
    max-width: 320px;
    line-height: 1.6;
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: var(--surface-muted);
}

.login-form-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.login-form-card h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.login-form-card .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

/* ========== 导航栏 ========== */
.app-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}

.app-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    text-decoration: none;
}

.app-nav-brand img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
}

.app-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.app-nav-links a {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.app-nav-links a:hover,
.app-nav-links a.active {
    color: var(--brand-primary);
    background: rgba(22, 119, 255, 0.06);
}

.app-nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid var(--border);
}

.app-nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

/* ========== 页面容器 ========== */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.page-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.breadcrumb a {
    color: var(--brand-primary);
    text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

/* ========== 卡片 ========== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ========== 工具卡片 ========== */
.tool-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand-gradient);
    opacity: 0;
    transition: opacity 0.25s;
}

.tool-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.tool-card:hover::before { opacity: 1; }

.tool-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(22, 119, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 24px;
}

.tool-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tool-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.tool-card-action {
    font-size: 13px;
    color: var(--brand-primary);
    font-weight: 500;
}

/* ========== 拖拽上传区 ========== */
.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--surface-muted);
    position: relative;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--brand-primary);
    background: rgba(22, 119, 255, 0.04);
}

.dropzone.dragover {
    transform: scale(1.01);
    box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.1);
}

.dropzone.has-file {
    border-color: #00b42a;
    border-style: solid;
    background: rgba(0, 180, 42, 0.04);
}

.dropzone-icon {
    font-size: 36px;
    margin-bottom: 10px;
    opacity: 0.6;
}

.dropzone-text {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.dropzone-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.dropzone-file {
    margin-top: 10px;
    font-size: 13px;
    color: #00b42a;
    font-weight: 500;
    word-break: break-all;
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.dropzone-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dropzone-required::after {
    content: " *";
    color: #f53f3f;
}

/* ========== 表单控件 ========== */
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    background: var(--surface);
}

.form-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--brand-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover { background: var(--brand-primary-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-success {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: #00b42a;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-success:hover { background: #23c343; }

/* ========== 主播 chip ========== */
.host-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(22, 119, 255, 0.08);
    color: var(--brand-primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* ========== 统计卡片 ========== */
.stat-card {
    background: var(--surface-muted);
    border-radius: var(--radius);
    padding: 16px 20px;
    text-align: center;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stat-card.green .value { color: #00b42a; }
.stat-card.blue .value { color: var(--brand-primary); }
.stat-card.orange .value { color: #ff7d00; }

/* ========== 进度条 ========== */
.progress-track {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--brand-gradient);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* ========== 日志面板 ========== */
#log-panel {
    white-space: pre-wrap;
    word-break: break-all;
    background: #1d2129;
    color: #00d68f;
    font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
    font-size: 12px;
    line-height: 1.6;
    padding: 16px;
    border-radius: var(--radius);
    height: 280px;
    overflow-y: auto;
}

/* ========== 表格 ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.data-table tr:hover td {
    background: var(--surface-muted);
}

/* ========== 状态标签 ========== */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-done { background: rgba(0, 180, 42, 0.1); color: #00b42a; }
.badge-error { background: rgba(245, 63, 63, 0.1); color: #f53f3f; }
.badge-running { background: rgba(22, 119, 255, 0.1); color: var(--brand-primary); }
.badge-pending { background: rgba(134, 144, 156, 0.1); color: var(--text-secondary); }
.badge-cancelled { background: rgba(255, 125, 0, 0.1); color: #ff7d00; }

/* ========== 提示框 ========== */
.alert-error {
    padding: 10px 14px;
    background: rgba(245, 63, 63, 0.08);
    border: 1px solid rgba(245, 63, 63, 0.2);
    border-radius: 8px;
    color: #f53f3f;
    font-size: 13px;
    text-align: center;
    margin-bottom: 20px;
}

.alert-info {
    padding: 10px 14px;
    background: rgba(22, 119, 255, 0.06);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 12px;
}
