/* OpenCampus 前端工作台样式（业务端前置外壳）
 * 与 wp-admin 的 dashboard.css 同源设计令牌，作用域 .oc-workbench，
 * 不依赖 wp-admin 样式环境；容器前台居中、响应式。
 */

.oc-workbench {
    --blue: #2f6df6;
    --blue-dark: #1f56d8;
    --navy: #16244d;
    --ink: #1b2340;
    --muted: #64748b;
    --line: #e6eaf3;
    --bg-soft: #f5f7fc;
    --green: #10b981;
    --amber: #f59e0b;
    --red: #ef4444;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(22, 36, 77, .06), 0 6px 20px rgba(22, 36, 77, .06);

    max-width: 1200px;
    margin: 32px auto 64px;
    padding: 0 20px;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.6;
}

.oc-workbench *, .oc-workbench *::before, .oc-workbench *::after { box-sizing: border-box; }

.oc-workbench h1 { font-size: 24px; font-weight: 700; margin: 0 0 4px; color: var(--navy); }
.oc-workbench .ocw-muted { color: var(--muted); margin: 0; }
.oc-workbench a { text-decoration: none; }

/* ---------- 顶部问候区 ---------- */
.ocw-hero {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 28px 32px; margin-bottom: 24px;
    background: linear-gradient(120deg, #eef3ff 0%, #f7faff 55%, #ffffff 100%);
    border: 1px solid var(--line); border-radius: var(--radius);
}
.ocw-hero-actions { display: flex; gap: 10px; flex: none; }
.ocw-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; border-radius: 10px; font-size: 14px; font-weight: 600;
    border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
    transition: all .15s ease;
}
.ocw-btn:hover { border-color: var(--blue); color: var(--blue); }
.ocw-btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.ocw-btn-primary:hover { background: var(--blue-dark); color: #fff; }

/* ---------- 卡片通用 ---------- */
.ocw-card {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- 访客登录引导 ---------- */
.ocw-guest { max-width: 520px; margin: 48px auto; padding: 48px 40px; text-align: center; }
.ocw-guest-icon { font-size: 40px; line-height: 1; margin-bottom: 12px; }
.ocw-guest h1 { margin-bottom: 10px; }
.ocw-guest p { margin: 0 0 18px; }

/* ---------- 状态卡片 ---------- */
.ocw-stat-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px; margin-bottom: 28px;
}
.ocw-stat { padding: 20px 22px; display: block; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
a.ocw-stat:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(22,36,77,.12); }
.ocw-stat-value { font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.ocw-stat-label { font-size: 13px; color: var(--muted); margin-top: 2px; }

.ocw-section-title { font-size: 17px; font-weight: 700; color: var(--navy); margin: 6px 0 14px; }

/* ---------- 应用网格（快速入口 / 应用中心） ---------- */
.ocw-app-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px; margin-bottom: 28px;
}
.ocw-app {
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
    padding: 18px 20px; color: inherit;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
a.ocw-app:hover { transform: translateY(-2px); border-color: #cdd9f5; box-shadow: 0 10px 26px rgba(22,36,77,.12); }
.ocw-app-icon { font-size: 24px; line-height: 1; }
.ocw-app-name { font-size: 15px; font-weight: 600; color: var(--navy); }

.ocw-badge {
    font-size: 11px; padding: 2px 8px; border-radius: 999px;
    background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line);
}
.ocw-badge-core    { background: #eef3ff; color: var(--blue);  border-color: #d5e1fd; }
.ocw-badge-nams    { background: #e8f7fd; color: #0284c7;      border-color: #cdeffb; }
.ocw-badge-toolbox { background: #fdf4e3; color: #b45309;      border-color: #f8e3b8; }
.ocw-badge-portal  { background: #e5f9f1; color: #047857;      border-color: #c4efdf; }
.ocw-badge-ai      { background: #f1ebfe; color: #7c3aed;      border-color: #e2d5fd; }

/* 应用中心大卡 */
.ocw-app-lg { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
a.ocw-app-lg:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(22,36,77,.12); }
.ocw-app-lg-icon {
    width: 44px; height: 44px; margin: 18px 18px 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; border-radius: 12px;
}
.ocw-app-lg-body { padding: 12px 18px 6px; flex: 1; }
.ocw-app-lg-name { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.ocw-app-lg-foot {
    width: 100%; padding: 12px 18px; border-top: 1px solid var(--line);
    font-size: 12px; color: var(--muted);
    display: flex; justify-content: space-between; align-items: center;
}
.ocw-status-active { color: var(--green); }

/* ---------- 面板 / 列表 ---------- */
.ocw-two-col {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px; margin-bottom: 28px;
}
.ocw-panel { padding: 4px 0 8px; }
.ocw-panel-head { padding: 16px 22px 10px; border-bottom: 1px solid var(--line); }
.ocw-panel-head h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--navy); }
.ocw-empty { padding: 18px 22px; }
.ocw-list { list-style: none; margin: 0; padding: 6px 0; }
.ocw-list-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 22px; border-bottom: 1px solid #f1f4fa;
}
.ocw-list-row:last-child { border-bottom: none; }
.ocw-list-title { flex: 1; color: var(--ink); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ocw-list-title:hover { color: var(--blue); }
.ocw-list-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ocw-tag {
    font-size: 11px; padding: 1px 8px; border-radius: 6px;
    background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line);
    white-space: nowrap;
}

@media (max-width: 782px) {
    .oc-workbench { margin-top: 20px; padding: 0 14px; }
    .ocw-hero { flex-direction: column; align-items: flex-start; padding: 22px; }
    .ocw-two-col { grid-template-columns: 1fr; }
}
