/* ===========================
   リセット・ベース
   =========================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', sans-serif;
    font-size: 15px;
    color: #1f2937;
    background: #f3f4f6;
    line-height: 1.6;
}

/* ===========================
   ログインページ
   =========================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-wrap {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 2.5rem 2rem;
}

.login-head {
    text-align: center;
    margin-bottom: 2rem;
    color: #2563eb;
}

.login-head h1 {
    font-size: 18px;
    font-weight: 500;
    color: #1f2937;
    margin-top: 0.5rem;
}

/* ===========================
   フォーム部品
   =========================== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    color: #1f2937;
    background: #fff;
}

.form-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
    flex-shrink: 0;
}

.form-check label {
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
}

/* ===========================
   ボタン
   =========================== */
.btn-login {
    width: 100%;
    padding: 11px;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-login:hover  { background: #1d4ed8; }
.btn-login:active { background: #1e40af; transform: scale(0.99); }

/* ===========================
   アラート
   =========================== */
.alert {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 1rem;
}

.alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* ===========================
   注意書き
   =========================== */
.login-note {
    font-size: 11px;
    color: #9ca3af;
    text-align: center;
    margin-top: 1rem;
}

/* ===========================
   アプリレイアウト
   =========================== */
.app-layout {
    background: #f3f4f6;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* ===========================
   サイドバー
   =========================== */
.sidebar {
    width: 220px;
    background: #253984;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-logo {
    padding: 20px 16px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo-img {
    max-height: 32px;
    width: auto;
}

.sidebar-logo-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}

.sidebar-logo-icon {
    font-size: 20px;
    color: #04B3C4;
}

.sidebar-nav {
    padding: 12px 8px;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 6px;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 2px;
}

.nav-item i { font-size: 16px; flex-shrink: 0; }

.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
}

.nav-item.active {
    background: rgba(4,179,196,0.2);
    color: #fff;
}

.nav-item.active i { color: #04B3C4; }

.nav-divider {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 10px 0;
}

.sidebar-footer {
    padding: 10px 8px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #04B3C4;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 12px;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

.logout-btn {
    color: rgba(255,255,255,0.4);
    font-size: 16px;
    text-decoration: none;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logout-btn:hover { color: rgba(255,255,255,0.8); }

/* ===========================
   メインエリア
   =========================== */
.main {
    margin-left: 220px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    background: #fff;
    padding: 14px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
}

.topbar-meta {
    font-size: 12px;
    color: #9ca3af;
}

.content {
    padding: 24px;
    flex: 1;
}

/* ===========================
   空状態
   =========================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #9ca3af;
    text-align: center;
    gap: 16px;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.8;
}

/* ===========================
   タブナビ
   =========================== */
.tab-nav {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.tab-link {
    display: inline-block;
    padding: 9px 18px;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}
.tab-link:hover { color: #04B3C4; }
.tab-link.active {
    color: #04B3C4;
    border-bottom-color: #04B3C4;
    font-weight: 500;
}

/* ===========================
   ページヘッダー
   =========================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.page-count      { font-size: 13px; color: #6b7280; }
.page-title-sub  { font-size: 15px; font-weight: 500; color: #1f2937; }

/* ===========================
   ボタン（共通）
   =========================== */
.btn-teal {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: #04B3C4;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-teal:hover { background: #039aaa; }
.btn-teal i     { font-size: 16px; }

.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 12px;
    color: #374151;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.btn-sm:hover { background: #f9fafb; border-color: #9ca3af; }
.btn-sm i     { font-size: 13px; }

.btn-teal-outline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 12px;
    color: #04B3C4;
    background: #fff;
    border: 1px solid #04B3C4;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}
.btn-teal-outline:hover { background: rgba(4,179,196,0.06); }
.btn-teal-outline i     { font-size: 13px; }

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 12px;
    color: #dc2626;
    background: #fff;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.btn-danger:hover { background: #fef2f2; }
.btn-danger i     { font-size: 13px; }

/* アウトライン削除ボタン（商品一覧） */
.btn-danger-outline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 6px;
    border: 0.5px solid #fca5a5;
    color: #ef4444;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.btn-danger-outline:hover { background: #fef2f2; }
.btn-danger-outline i     { font-size: 13px; }

/* 紐付け解除ボタン（KW管理タブ） */
.btn-unlink {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    color: #6b7280;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
}
.btn-unlink:hover { border-color: #ef4444; color: #ef4444; }
.btn-unlink i     { font-size: 13px; }

/* EC URLバッジ（商品一覧）EC別3バッジ */
.ec-badges {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}
.ec-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 7px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
    line-height: 1;
}
.ec-badge:hover { opacity: 0.75; }
.ec-badge i     { font-size: 11px; }
/* 設定済み */
.ec-badge-amazon  { background: #fff8ee; color: #854F0B; border-color: #FAC775; }
.ec-badge-rakuten { background: #fcebeb; color: #A32D2D; border-color: #F7C1C1; }
.ec-badge-yahoo   { background: #fcebeb; color: #A32D2D; border-color: #F7C1C1; }
/* 未設定 */
.ec-badge-unset   { background: #f9fafb; color: #9ca3af; border-color: #e5e7eb; }

/* EC URLモーダル内 URL共通部分表示 */
.ec-url-base {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 5px 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px 0 0 6px;
    border-right: none;
    line-height: 1.4;
    flex-shrink: 0;
}
.ec-url-base + .form-control {
    border-radius: 0 6px 6px 0;
    flex: 1;
}
.ec-url-preview {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
    word-break: break-all;
}
.ec-input-row {
    display: flex;
    align-items: stretch;
}

.btn-disabled {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 12px;
    color: #9ca3af;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: not-allowed;
    white-space: nowrap;
}
.btn-disabled i { font-size: 13px; }

/* ===========================
   バッジ
   =========================== */
.badge-active {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-family: inherit;
    font-weight: normal;
    padding: 2px 8px;
    border-radius: 20px;
    border: none;
    background: #dcfce7;
    color: #166534;
    white-space: nowrap;
    cursor: pointer;
}
.badge-active i  { font-size: 8px; }
.badge-inactive  {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-family: inherit;
    font-weight: normal;
    padding: 2px 8px;
    border-radius: 20px;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    white-space: nowrap;
    cursor: pointer;
}

/* ===========================
   カード・テーブル
   =========================== */
.card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.table-wrap { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table thead th {
    padding: 10px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}
.data-table tbody td {
    padding: 11px 16px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    color: #1f2937;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td      { background: #fafafa; }

.td-name { font-weight: 500; white-space: nowrap; }

.action-btns {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

/* ===========================
   タグ
   =========================== */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.kw-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(4,179,196,0.1);
    color: #0a7a88;
    border: 1px solid rgba(4,179,196,0.25);
    white-space: nowrap;
}
.prod-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(37,57,132,0.07);
    color: #253984;
    border: 1px solid rgba(37,57,132,0.18);
    white-space: nowrap;
}

/* ===========================
   テキスト補助
   =========================== */
.text-muted { font-size: 12px; color: #9ca3af; }
.table-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
}
.table-hint i { font-size: 14px; }

/* ===========================
   ショップ管理
   =========================== */
.shops-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.shop-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px;
}

.shop-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.shop-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.shop-ec-name {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
}

.shop-field {
    margin-bottom: 12px;
}

.shop-field-label {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 4px;
    display: block;
}

.shop-field-value {
    font-size: 13px;
    color: #1f2937;
    padding: 7px 10px;
    background: #f9fafb;
    border-radius: 6px;
    word-break: break-all;
    min-height: 34px;
}

.shop-field-value.empty {
    color: #9ca3af;
    font-style: italic;
}

.shop-url-link {
    color: #253984;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.shop-url-link:hover { text-decoration: underline; }
.shop-url-link i { font-size: 12px; }

.shop-edit-btn { margin-top: 4px; }

/* ===========================
   フォームコントロール（管理画面用）
   =========================== */
.form-control {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    color: #1f2937;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
    border-color: #04B3C4;
    box-shadow: 0 0 0 3px rgba(4,179,196,0.12);
}
.form-control-sm { padding: 6px 8px; }

.form-label-sm {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
}

.form-divider {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin: 10px 0;
    position: relative;
}
.form-divider::before,
.form-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e5e7eb;
}
.form-divider::before { left: 0; }
.form-divider::after  { right: 0; }

/* KW追加モーダル - 検索UI */
.pk-search-wrap { position: relative; }

.pk-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.pk-dd-item {
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pk-dd-item:hover { background: #f9fafb; }
.pk-dd-item i { font-size: 14px; color: #9ca3af; }

.pk-dd-new { color: #04B3C4; border-top: 1px solid #f3f4f6; }
.pk-dd-new:hover { background: rgba(4,179,196,0.06); }
.pk-dd-new i { color: #04B3C4; }

.pk-dd-already { color: #ef4444; background: #fef2f2; cursor: default; }
.pk-dd-already:hover { background: #fef2f2; }
.pk-dd-already i { color: #ef4444; }

.pk-hint-error {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #ef4444;
    margin-top: 6px;
}

.pk-selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    background: rgba(4,179,196,0.1);
    color: #04B3C4;
    border: 1px solid #04B3C4;
}

.pk-selected-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: #04B3C4;
    padding: 0;
    display: flex;
    align-items: center;
    font-size: 12px;
    line-height: 1;
}

.form-control-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239,68,68,0.1) !important;
}

.ec-pages-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.required { color: #dc2626; margin-left: 2px; }

/* ===========================
   モーダル
   =========================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 16px;
}
.modal-box {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    width: 100%;
    max-width: 440px;
    padding: 24px;
    box-sizing: border-box;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.modal-title {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    margin: 0;
}
.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 20px;
    padding: 2px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}
.modal-close:hover { color: #374151; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}
.modal-kw-label {
    font-size: 13px;
    font-weight: 500;
    color: #253984;
    background: rgba(37,57,132,0.06);
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 14px;
}

/* ===========================
   商品一覧 絞り込みUI
   =========================== */
.filter-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}
.filter-search-wrap {
    position: relative;
    flex: 1;
}
.filter-search-wrap i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 15px;
    pointer-events: none;
}
.filter-search {
    padding-left: 32px !important;
}
.filter-select-wrap {
    position: relative;
}
.filter-select {
    padding-right: 28px !important;
    appearance: none;
    min-width: 110px;
    cursor: pointer;
}
.filter-select-wrap i {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #9ca3af;
    pointer-events: none;
}

/* ===========================
   アイコン+テキスト間隔修正
   gap の代わりに i に margin-right を付与し
   PHPテンプレートの空白テキストノードによる
   余分なスペースを解消する
   =========================== */
.btn-teal,
.btn-sm,
.btn-teal-outline,
.btn-danger,
.btn-danger-outline,
.btn-unlink,
.btn-disabled,
.badge-active,
.badge-inactive,
.ec-badge { gap: 0; }

.btn-teal i           { margin-right: 5px; font-size: 16px; }
.btn-sm i             { margin-right: 4px; font-size: 13px; }
.btn-teal-outline i   { margin-right: 4px; font-size: 13px; }
.btn-danger i         { margin-right: 4px; font-size: 13px; }
.btn-danger-outline i { margin-right: 4px; font-size: 13px; }
.btn-unlink i         { margin-right: 4px; font-size: 13px; }
.btn-disabled i       { margin-right: 4px; }
.badge-active i       { margin-right: 3px; font-size: 8px; }
.ec-badge i           { margin-right: 2px; font-size: 11px; display: none; }

/* ===========================
   サイドバー サブ項目（EC配下）
   =========================== */
.nav-group-btn {
    width: 100%;
    background: transparent;
    border: none;
    font: inherit;
    cursor: pointer;
    text-align: left;
}
.nav-chevron {
    margin-left: auto;
    font-size: 14px !important;
    transition: transform 0.15s;
    transform: rotate(-90deg);
}
.nav-group.open .nav-chevron { transform: rotate(0deg); }
.nav-submenu { display: none; }
.nav-group.open .nav-submenu { display: block; }
.nav-sub { padding-left: 32px; }

/* ===========================
   順位ビュー（楽天）
   =========================== */
.rk-num  { font-variant-numeric: tabular-nums; }
/* .data-table td の文字色指定に勝つよう詳細度を上げる */
.data-table td.rk-up   { color: #16a34a; }
.data-table td.rk-down { color: #dc2626; }
.data-table td.rk-flat { color: #6b7280; }
.data-table td.rk-none { color: #9ca3af; }
.rk-period {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.rk-preset {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    color: #374151;
    background: #fff;
    text-decoration: none;
}
.rk-preset.active { background: rgba(4,179,196,0.1); border-color: #04B3C4; color: #0a7a88; }
.rk-period-sep { color: #d1d5db; }

/* ===========================
   商品 並び替え（ドラッグ）
   =========================== */
.drag-cell   { width: 36px; text-align: center; }
.drag-handle { cursor: grab; color: #9ca3af; font-size: 16px; display: inline-flex; }
.drag-handle:active { cursor: grabbing; }
.sortable-ghost { opacity: 0.4; }
.no-drag .drag-handle { opacity: 0.3; cursor: not-allowed; }
