/* ============================================================
   全国装机与终端使用情况数据收集系统 - 全局样式
   视觉风格参考 info.life-motion.cn
   ============================================================ */

/* ===== 全局变量 ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #dbeafe;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #1e40af 100%);
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }

/* ===== 容器 ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 16px; }

/* ===== 顶部 Header（渐变蓝） ===== */
.header {
    background: var(--primary-gradient);
    color: white;
    padding: 28px 20px;
    text-align: center;
    border-radius: 0 0 20px 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    position: relative;
    z-index: 5;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.header p {
    font-size: 14px;
    opacity: 0.9;
}

.header nav {
    margin-top: 12px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.header nav a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    padding: 4px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.2s, color 0.2s;
}

.header nav a:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* ===== Admin 紧凑顶栏 ===== */
.admin-bar {
    padding: 12px 20px !important;
    text-align: left !important;
    border-radius: 0 0 16px 16px;
    margin-bottom: 16px;
}

.admin-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    max-width: 1400px;
}

.admin-bar h1 {
    font-size: 17px;
    margin-bottom: 0;
}

.admin-bar p { display: none; }

.admin-bar nav {
    margin-top: 0;
    gap: 8px;
}

/* ===== 首页统计条 ===== */
.stats-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.stat-card {
    flex: 1;
    min-width: 140px;
    background: white;
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 3px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card .num {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.stat-card .label {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ===== 首页模块卡片 ===== */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.module-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.module-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.module-card .card-header {
    padding: 20px 20px 14px;
    border-bottom: 1px solid var(--gray-100);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.module-card .card-header h3 {
    font-size: 17px;
    color: var(--gray-900);
    margin-bottom: 4px;
    font-weight: 700;
}

.module-card .card-header p {
    font-size: 13px;
    color: var(--gray-500);
}

.module-card .card-body {
    padding: 14px 20px;
    flex: 1;
}

.module-card .card-body .desc {
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.7;
}

.module-card .card-footer {
    padding: 12px 20px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1.5;
    font-family: inherit;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-block { width: 100%; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== 二维码预览图 ===== */
.qr-preview {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    margin-left: auto;
    transition: transform 0.2s;
    object-fit: cover;
}

.qr-preview:hover { transform: scale(1.05); }

/* ===== 表单页 Header ===== */
.form-header {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.form-header h2 {
    font-size: 20px;
    color: var(--gray-900);
    font-weight: 700;
}

.form-header .subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

.form-header .desc {
    font-size: 13px;
    color: var(--gray-700);
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    line-height: 1.6;
}

.form-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* ===== 表单字段卡片 ===== */
.form-group {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}

.form-group:hover { box-shadow: var(--shadow-lg); }

/* 登录页等场景：form-wrapper 内嵌的 form-group 不需要独立卡片 */
.form-wrapper .form-group {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-bottom: 16px;
}
.form-wrapper .form-group:hover { box-shadow: none; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-field {
    margin-bottom: 0;
}

.form-field + .form-field,
.form-row + .form-field,
.form-field + .form-row { margin-top: 16px; }

.form-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-field label .required-mark,
.form-field label .required {
    color: var(--danger);
    margin-left: 2px;
    font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea,
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
    font-family: inherit;
    color: var(--gray-900);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-field input[readonly],
.form-field input:disabled,
.form-control:disabled,
.form-control[readonly] {
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: not-allowed;
}

/* 自动填充字段动画 */
.form-field input.auto-filled,
.form-field select.auto-filled,
.form-control.auto-filled {
    background: #d1fae5 !important;
    transition: background 0.4s ease;
}

/* 医院编码搜索框强调样式 */
.form-field input[data-field-type="hospital_autocomplete"],
.form-control[data-field-type="hospital_autocomplete"] {
    border-color: var(--primary);
    background: #eff6ff;
}

.form-field input[data-field-type="hospital_autocomplete"]:focus,
.form-control[data-field-type="hospital_autocomplete"]:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* 组合框样式（可选择可输入） */
.form-field input.combobox-input,
.form-control.combobox-input {
    background: #fffbeb;
    border-color: #f59e0b;
    cursor: text;
}

.form-field input.combobox-input:focus,
.form-control.combobox-input:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.form-field input.combobox-input::placeholder,
.form-control.combobox-input::placeholder {
    color: #b45309;
}

.form-field textarea,
textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-field .hint {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ===== 自动补全下拉（医院编码） ===== */
.autocomplete-wrapper,
.hospital-autocomplete {
    position: relative;
}

.autocomplete-list,
.hospital-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.autocomplete-list.show,
.hospital-dropdown.show { display: block; }

.autocomplete-item,
.hospital-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
    transition: background 0.15s;
}

.autocomplete-item:hover,
.hospital-item:hover { background: var(--primary-light); }

.autocomplete-item .code,
.hospital-item .code {
    color: var(--primary);
    font-weight: 600;
    margin-right: 8px;
}

.autocomplete-item .name,
.hospital-item .name { color: var(--gray-900); }

.autocomplete-item .meta,
.hospital-item .meta {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* ===== 提交反馈 ===== */
.submit-bar {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 20px 0;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: var(--primary-light);
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ===== 旧表单包装（兼容） ===== */
.form-wrapper {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.form-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.form-desc { font-size: 13px; color: var(--gray-500); margin-bottom: 20px; }

/* ===== 旧首页卡片（兼容） ===== */
.hero { text-align: center; padding: 40px 16px 20px; }
.hero h2 { font-size: 24px; margin-bottom: 8px; }
.hero p { color: var(--gray-500); font-size: 14px; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    padding: 20px 0;
}
.form-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.form-card:hover { box-shadow: var(--shadow-lg); border-color: var(--primary); }
.form-card .icon { font-size: 32px; margin-bottom: 12px; }
.form-card h3 { font-size: 16px; margin-bottom: 6px; }
.form-card p { font-size: 13px; color: var(--gray-500); }
.form-card .qr-section { margin-top: 16px; text-align: center; display: none; }
.form-card .qr-section img { border: 1px solid var(--gray-200); border-radius: 4px; }

/* ============================================================
   移动端适配
   ============================================================ */
@media (max-width: 768px) {
    .container { padding: 12px; }

    .header { padding: 20px 12px; border-radius: 0 0 16px 16px; }
    .header h1 { font-size: 18px; }
    .header p { font-size: 12px; }

    .stats-bar { gap: 8px; }
    .stat-card { min-width: 105px; padding: 12px; }
    .stat-card .num { font-size: 22px; }
    .stat-card .label { font-size: 12px; }

    .module-grid { grid-template-columns: 1fr; gap: 12px; }

    .form-row { grid-template-columns: 1fr; }

    .form-group { padding: 16px; }

    .form-container { padding: 0 12px 20px; }

    .form-header { padding: 16px; }
    .form-header h2 { font-size: 17px; }

    .submit-bar { flex-direction: column; }
    .submit-bar .btn { width: 100%; }

    /* 移动端表单优化：16px 防止 iOS 聚焦缩放 */
    .form-field input,
    .form-field select,
    .form-field textarea,
    .form-control {
        font-size: 16px;
        padding: 12px;
    }
    .form-field label { font-size: 15px; }

    .qr-preview { width: 48px; height: 48px; }
}

/* ============================================================
   后台管理
   ============================================================ */
.admin-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
    padding: 0 20px 32px;
    align-items: start;
    min-height: calc(100vh - 88px);
}

.admin-sidebar {
    width: auto;
    background: var(--gray-900);
    color: white;
    padding: 16px 0;
    border-radius: var(--radius-lg);
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.admin-sidebar .logo {
    padding: 0 20px 16px;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid var(--gray-700);
    margin-bottom: 12px;
}

.admin-sidebar a {
    display: block;
    padding: 11px 20px;
    color: var(--gray-300);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: var(--gray-700);
    color: white;
    border-left-color: var(--primary);
}

.admin-sidebar .nav-section {
    padding: 14px 20px 4px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gray-500);
    letter-spacing: 1px;
}

/* 二级菜单 */
.admin-sidebar .sub-nav {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 0;
    margin: 4px 0 8px;
    padding: 4px 0;
}

.admin-sidebar .sub-item {
    display: block;
    padding: 8px 20px 8px 36px;
    color: var(--gray-300);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.15s;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.admin-sidebar .sub-item:hover {
    background: var(--gray-700);
    color: white;
}

.admin-sidebar .sub-item.sub-active {
    background: var(--primary);
    color: white;
    border-left-color: white;
    font-weight: 600;
}

.admin-main {
    margin-left: 0;
    min-width: 0;
}

.admin-main h2 {
    font-size: 20px;
    margin-bottom: 16px;
    font-weight: 700;
}

.admin-content {
    background: transparent;
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table th {
    background: var(--gray-100);
    padding: 10px 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
    border-bottom: 1px solid var(--gray-200);
}

.data-table td {
    padding: 8px 12px;
    font-size: 13px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-900);
    vertical-align: middle;
}

.data-table tr:hover td { background: var(--gray-50); }
.data-table tr:last-child td { border-bottom: none; }

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow);
}

.table-wrapper .data-table { box-shadow: none; }

/* 分页 */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    color: var(--gray-700);
    background: white;
}

.pagination a:hover { background: var(--gray-100); }
.pagination .current { background: var(--primary); color: white; border-color: var(--primary); }

/* 登录页 */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--gray-50);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 360px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 20px;
}

/* 后台弹窗 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
}

.modal h3 {
    font-size: 17px;
    margin-bottom: 16px;
    font-weight: 700;
}

.modal .modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.modal .form-group {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-bottom: 14px;
}
.modal .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 5px;
}

/* QR码弹窗 */
.qr-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.qr-modal.show { display: flex; }

.qr-modal-content {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 340px;
    width: 90%;
}

.qr-modal-content h3 { margin-bottom: 4px; }

.qr-modal-content img {
    width: 250px;
    height: 250px;
    margin: 12px 0;
    border-radius: 4px;
}

.qr-modal-content .url {
    font-size: 12px;
    color: var(--gray-500);
    word-break: break-all;
    margin-top: 8px;
}

.qr-modal-content .close-btn {
    margin-top: 12px;
}

/* 响应式后台 */
@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 12px 20px;
    }

    .admin-sidebar {
        position: static;
        max-height: none;
        padding: 8px;
        display: flex;
        flex-wrap: wrap;
        border-radius: var(--radius);
    }
    .admin-sidebar .logo { padding: 0 12px 8px; width: 100%; }
    .admin-sidebar > a {
        display: inline-block;
        padding: 8px 12px;
        border-left: none;
        border-radius: 6px;
        margin: 2px;
    }
    .admin-sidebar > a:hover,
    .admin-sidebar > a.active {
        border-left-color: transparent;
    }
    .admin-sidebar .nav-section { display: none; }

    .admin-sidebar .sub-nav {
        width: 100%;
        background: rgba(0,0,0,0.2);
        margin: 4px 0;
        padding: 4px;
        border-radius: 6px;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    .admin-sidebar .sub-item {
        display: inline-block;
        padding: 6px 10px;
        border-left: none;
        border-radius: 6px;
        margin: 0;
        font-size: 12px;
    }
    .admin-sidebar .sub-item.sub-active {
        border-left: none;
    }

    .admin-main { margin-left: 0; }

    .admin-bar {
        padding: 10px 14px !important;
        border-radius: 0 0 12px 12px;
    }
    .admin-bar .container {
        flex-wrap: wrap;
        gap: 8px;
    }
    .admin-bar h1 { font-size: 15px; }

    .login-box { width: 90%; padding: 24px; }

    .modal { padding: 16px; }
}

/* ============================================================
   选项管理 - 表格内嵌编辑器
   ============================================================ */
.options-cell {
    min-height: 28px;
}

.options-cell .view-mode {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.options-cell .view-mode .tag-readonly {
    display: inline-block;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    color: var(--gray-700);
}

.options-cell .view-mode .muted {
    color: var(--gray-500);
    font-size: 12px;
}

.options-cell .edit-mode {
    background: var(--gray-50);
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
    min-width: 280px;
}

.options-cell .options-edit-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.options-cell .muted-text {
    color: var(--gray-500);
    font-size: 12px;
}

/* ============================================================
   选项管理
   ============================================================ */
.options-section {
    margin-top: 24px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px;
}

.options-section h3 {
    font-size: 15px;
    margin-bottom: 12px;
    color: var(--gray-900);
    font-weight: 700;
}

.options-section .field-group {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.options-section .field-group-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.options-section .field-group-title .badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary-dark);
}

.options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.option-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
}

.option-tag .tag-text {
    border: none;
    background: transparent;
    font-size: 13px;
    width: 120px;
    padding: 2px 4px;
    border-radius: 4px;
    outline: none;
    font-family: inherit;
    color: var(--gray-900);
}

.option-tag .tag-text:focus {
    background: var(--gray-100);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.option-tag .btn-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
    line-height: 1;
}

.option-tag .btn-remove:hover { color: #b91c1c; }

.option-tag.is-default {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.option-tag.is-custom {
    background: #fffbeb;
    border-color: #fde68a;
}

.option-tag.is-new {
    background: #eff6ff;
    border-color: var(--primary);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.option-add-bar {
    display: flex;
    gap: 8px;
    align-items: center;
}

.option-add-bar input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
}

.option-add-bar .btn-add {
    padding: 6px 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.option-add-bar .btn-add:hover { background: var(--primary-dark); }

.option-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.option-actions .btn-save-options {
    padding: 6px 14px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.option-actions .btn-save-options:hover { background: #15803d; }

.option-actions .btn-reset-options {
    padding: 6px 14px;
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.option-actions .btn-reset-options:hover { background: var(--gray-100); }

@media (max-width: 768px) {
    .option-tag .tag-text { width: 90px; }
    .options-section { padding: 12px; }
}
