/* 意図的に「古臭い」レガシー社内システム風デザイン (WebForms/イントラ 2005年頃を想定)。
   フォント・ボタンのベベル(inset/outset)・table.gridの密度など「古さ」を体現している
   要素は維持しつつ、2026-08-20の配色刷新でくすんだ配色(カーキ地#ece9d8+沈んだ紺)だけを
   AI sidepanel側の新ブランドカラー(青 #2a78d6系)に揃えて刷新。過度にモダン化して
   「古いレガシー機/新しいAI」の対比というデモの狙いを壊さないよう、色の彩度・明度を
   上げるに留め、UIチロム(枠線のベベル等)には手を入れていない。 */
* { box-sizing: border-box; }
body {
    font-family: Tahoma, Verdana, "MS Pゴシック", sans-serif;
    font-size: 12px;
    background: #e9edf2;
    margin: 0;
    color: #000;
}
#header {
    background: linear-gradient(#2a78d6, #17497e);
    color: #fff;
    padding: 8px 16px;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 3px solid #0f3157;
}
#nav {
    background: #dfe3ea;
    border-bottom: 1px solid #99a3b0;
    padding: 4px 16px;
}
#nav a {
    color: #17497e;
    margin-right: 14px;
    text-decoration: underline;
    font-size: 12px;
    line-height: 2.2;
}
#nav a.nav-ai-link {
    text-decoration: none;
    font-weight: bold;
    color: #fff;
    background: #2a78d6;
    padding: 2px 8px;
    border-radius: 3px;
}
#content {
    margin: 16px auto;
    max-width: 1200px;
    background: #fff;
    border: 1px solid #c7ccd4;
    padding: 16px;
}
h2 {
    font-size: 15px;
    border-bottom: 2px solid #2a78d6;
    padding-bottom: 4px;
    margin-top: 0;
}
h3 {
    font-size: 13px;
    color: #17497e;
    border-bottom: 1px solid #dfe3ea;
    padding-bottom: 3px;
}

/* ---- 一覧グリッド ---- */
table.grid {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 16px;
}
table.grid th {
    background: #2a78d6;
    color: #fff;
    padding: 4px 8px;
    text-align: left;
    font-size: 12px;
    white-space: nowrap;
}
table.grid td {
    border: 1px solid #dfe3ea;
    padding: 4px 8px;
}
table.grid tr:nth-child(even) {
    background: #f4f6f9;
}
table.grid td.ops a {
    margin-right: 8px;
}
tr.stock-warning td {
    background: #fdecea;
}

/* ---- フォームテーブル ---- */
table.form-table {
    border-collapse: collapse;
    margin-bottom: 16px;
}
table.form-table th {
    background: #eaf2fd;
    border: 1px solid #dfe3ea;
    text-align: right;
    padding: 6px 10px;
    width: 140px;
    font-weight: normal;
    vertical-align: top;
}
table.form-table td {
    border: 1px solid #dfe3ea;
    padding: 6px 10px;
}
.required {
    color: #d03b3b;
    margin-left: 4px;
}

input.textbox, select, textarea {
    border: 1px inset #808080;
    padding: 3px 5px;
    font-family: inherit;
    font-size: 12px;
    min-width: 220px;
}
input.textbox.num {
    min-width: 100px;
    text-align: right;
}
textarea.textbox {
    min-width: 320px;
}

/* ---- ボタン類 ---- */
button, input[type=submit] {
    background: #d4d0c8;
    border: 1px outset #808080;
    padding: 4px 14px;
    cursor: pointer;
    font-size: 12px;
}
.button.small {
    padding: 2px 8px;
    font-size: 11px;
}
.button-link {
    display: inline-block;
    background: #d4d0c8;
    border: 1px outset #808080;
    padding: 4px 14px;
    color: #000;
    text-decoration: none;
    font-size: 12px;
    margin-right: 8px;
}
.form-actions, .toolbar {
    margin: 10px 0;
}

/* ---- 受注/見積/発注 明細グリッド ---- */
#item-table .amount-cell, #item-table .price-input {
    text-align: right;
}
.total-line {
    text-align: right;
    font-size: 15px;
    font-weight: bold;
    margin: 10px 0;
    color: #17497e;
}

/* ---- AIサイドパネル案内カード(浅色テーマ) ---- */
.ai-guide {
    background: linear-gradient(135deg, #f7fbff, #eef5fd);
    border: 1px solid #b9d3ec;
    border-left: 4px solid #2a78d6;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(42, 120, 214, .08);
}
.ai-guide-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.ai-guide-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a78d6, #17497e);
    box-shadow: 0 3px 8px rgba(42, 120, 214, .3);
    font-size: 19px;
    line-height: 1;
    flex: 0 0 auto;
}
.ai-guide-head h3 {
    margin: 0;
    border: 0;
    padding: 0;
    color: #17497e;
    font-size: 14px;
}
.ai-guide-sub {
    margin: 3px 0 0;
    font-size: 11px;
    color: #555;
}
.ai-guide-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.ai-guide-col h4 {
    margin: 0 0 6px;
    font-size: 12px;
    color: #17497e;
}
.ai-guide-col ul,
.ai-guide-col ol {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
    line-height: 1.7;
    color: #333;
}
.ai-guide-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 11px;
    color: #2a78d6;
    font-weight: bold;
    transition: transform .12s ease;
}
.ai-guide-more:hover {
    transform: translateX(3px);
}

/* ---- AIサイドパネル紹介ページ(浅色テーマ・製品ページ風・リッチ版) ---- */
.ai-intro {
    font-size: 13px;
    color: #222;
    font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", Meiryo, Tahoma, sans-serif;
}
.ai-intro-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #3a8ce8 0%, #2a78d6 45%, #17497e 100%);
    color: #fff;
    padding: 44px 28px 36px;
    margin: -16px -16px 28px;
    text-align: center;
    box-shadow: 0 6px 24px rgba(23, 73, 126, .25);
}
.ai-intro-hero::before,
.ai-intro-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .10);
    pointer-events: none;
}
.ai-intro-hero::before {
    width: 260px;
    height: 260px;
    top: -120px;
    left: -80px;
}
.ai-intro-hero::after {
    width: 340px;
    height: 340px;
    bottom: -180px;
    right: -100px;
    background: rgba(255, 255, 255, .07);
}
.ai-intro-hero-badge {
    position: relative;
    display: inline-block;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: .08em;
    margin-bottom: 16px;
}
.ai-intro-hero h1 {
    position: relative;
    margin: 0 0 14px;
    font-size: 27px;
    font-weight: 800;
    line-height: 1.55;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.ai-intro-hero-sub {
    position: relative;
    max-width: 660px;
    margin: 0 auto 22px;
    font-size: 13.5px;
    line-height: 1.85;
    color: #eaf2fd;
}
.ai-intro-hero-cta {
    position: relative;
    display: inline-block;
    background: #fff;
    color: #17497e;
    font-weight: bold;
    font-size: 13.5px;
    padding: 10px 24px;
    border-radius: 22px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
    transition: transform .15s ease, box-shadow .15s ease;
}
.ai-intro-hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 20px rgba(0, 0, 0, .22);
}
.ai-intro-hero-stats {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 520px;
    margin: 24px auto 0;
}
.ai-intro-hero-stat {
    flex: 1;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 8px;
    padding: 10px 6px;
}
.ai-intro-hero-stat strong {
    display: block;
    font-size: 20px;
    line-height: 1.2;
}
.ai-intro-hero-stat span {
    display: block;
    font-size: 10.5px;
    color: #dbeafd;
    margin-top: 2px;
}
.ai-intro-section {
    margin-bottom: 34px;
}
.ai-intro-h2 {
    font-size: 17px;
    color: #17497e;
    border-bottom: 2px solid #2a78d6;
    padding-bottom: 6px;
    margin: 0 0 18px;
}
.ai-intro-benefits {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.ai-intro-benefit {
    background: linear-gradient(180deg, #f7fbff 0%, #eef5fd 100%);
    border: 1px solid #b9d3ec;
    border-top: 3px solid #2a78d6;
    border-radius: 6px;
    padding: 16px 14px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.ai-intro-benefit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(42, 120, 214, .16);
}
.ai-intro-benefit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a78d6, #17497e);
    box-shadow: 0 4px 10px rgba(42, 120, 214, .3);
    font-size: 20px;
    margin-bottom: 10px;
}
.ai-intro-benefit h3 {
    margin: 0 0 6px;
    font-size: 12.5px;
    color: #17497e;
    border: 0;
    padding: 0;
}
.ai-intro-benefit p {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.7;
    color: #444;
}
.ai-intro-steps {
    display: flex;
    align-items: stretch;
    gap: 10px;
}
.ai-intro-step {
    position: relative;
    flex: 1;
    display: flex;
    gap: 10px;
    background: #eaf2fd;
    border: 1px solid #b9d3ec;
    border-radius: 6px;
    padding: 16px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.ai-intro-step:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(42, 120, 214, .14);
}
.ai-intro-step-num {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: linear-gradient(135deg, #2a78d6, #17497e);
    color: #fff;
    font-weight: bold;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(42, 120, 214, .35);
}
.ai-intro-step h3 {
    margin: 0 0 4px;
    font-size: 12.5px;
    color: #17497e;
    border: 0;
    padding: 0;
}
.ai-intro-step p {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.6;
    color: #444;
}
.ai-intro-step-arrow {
    flex: 0 0 auto;
    align-self: center;
    font-size: 20px;
    color: #7ea8d8;
    font-weight: bold;
}
.ai-intro-group {
    margin-bottom: 18px;
    padding: 14px 16px;
    background: #fbfcfe;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
}
.ai-intro-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #17497e;
    border: 0;
    padding: 0;
    margin: 0 0 10px;
}
.ai-intro-group-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 15px;
    background: linear-gradient(135deg, #2a78d6, #17497e);
    box-shadow: 0 3px 8px rgba(42, 120, 214, .3);
}
.ai-intro-list-head {
    margin-bottom: 12px;
}
.ai-intro-list-hint {
    margin: 2px 0 0;
    font-size: 12px;
    color: #6a7686;
}
.ai-intro-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
    align-items: start;
}
.ai-intro-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    background: #fff;
    border: 1px solid #dfe3ea;
    border-left: 3px solid #2a78d6;
    border-radius: 4px;
    padding: 11px 12px;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, border-left-width .12s ease;
}
.ai-intro-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(23, 73, 126, .12);
    border-left-width: 5px;
}
.ai-intro-card:focus-visible {
    outline: 2px solid #2a78d6;
    outline-offset: 2px;
}
.ai-intro-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.ai-intro-card-title {
    font-size: 12px;
    font-weight: bold;
    color: #17497e;
}
.ai-intro-card-chevron {
    flex: 0 0 auto;
    font-size: 11px;
    color: #9aa7b8;
    transition: transform .15s ease;
}
.ai-intro-card.is-open .ai-intro-card-chevron {
    transform: rotate(-180deg);
    color: #2a78d6;
}
.ai-intro-card-sub {
    display: block;
    font-size: 11px;
    line-height: 1.6;
    color: #444;
}
.ai-intro-card-detail {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #dfe3ea;
}
.ai-intro-card.is-open .ai-intro-card-detail {
    display: flex;
}
.ai-intro-detail-row {
    display: block;
    font-size: 11px;
    line-height: 1.7;
    color: #333;
}
.ai-intro-detail-row b {
    display: inline-block;
    min-width: 62px;
    margin-right: 4px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: bold;
    color: #17497e;
    background: #eaf2fd;
    border-radius: 3px;
}

/* カテゴリ別アクセントカラー */
.cat-search .ai-intro-group-icon { background: linear-gradient(135deg, #2a78d6, #17497e); }
.cat-search .ai-intro-card { border-left-color: #2a78d6; }

.cat-input .ai-intro-group-icon { background: linear-gradient(135deg, #1fa876, #0f7a54); }
.cat-input .ai-intro-card { border-left-color: #1fa876; }

.cat-numbers .ai-intro-group-icon { background: linear-gradient(135deg, #e2932a, #b8690f); }
.cat-numbers .ai-intro-card { border-left-color: #e2932a; }

.cat-alert .ai-intro-group-icon { background: linear-gradient(135deg, #e35b4c, #b8291a); }
.cat-alert .ai-intro-card { border-left-color: #e35b4c; }

.cat-support .ai-intro-group-icon { background: linear-gradient(135deg, #8a5cd6, #5a2fa8); }
.cat-support .ai-intro-card { border-left-color: #8a5cd6; }

.ai-intro-footer-cta {
    text-align: center;
    background: linear-gradient(135deg, #eaf2fd, #dcebfc);
    border: 1px solid #b9d3ec;
    border-radius: 10px;
    padding: 26px 16px;
    font-size: 13.5px;
    color: #17497e;
}
.ai-intro-footer-icon {
    width: 56px;
    height: 56px;
    line-height: 56px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a78d6, #17497e);
    font-size: 26px;
    box-shadow: 0 6px 16px rgba(42, 120, 214, .35);
}
.ai-intro-footer-cta p {
    margin: 0;
}
.ai-intro-back {
    display: inline-block;
    margin-top: 12px;
    font-size: 11.5px;
    color: #2a78d6;
    font-weight: bold;
}

/* ---- 機能デモ(自動演示)---- */
.ai-intro-demo-btn {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: bold;
    color: #17497e;
    background: #eaf2fd;
    border: 1px solid #b9d3ec;
    border-radius: 12px;
    cursor: pointer;
    transition: background .12s ease, transform .12s ease;
}
.ai-intro-demo-btn:hover {
    background: #d6e7fb;
    transform: translateY(-1px);
}
.ai-intro-demo-btn:focus-visible {
    outline: 2px solid #2a78d6;
    outline-offset: 2px;
}

/* 1枚のカードに複数機能ぶんの自動デモを並べる場合(例: AI検索カードの
   定型レポート/AIレポート生成/自然文検索)用の横並びラッパー。
   .ai-intro-card は flex-direction:column なので、これで囲まないと
   ボタンが1個ずつ縦積みになってしまう。 */
.ai-intro-demo-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.ai-intro-demo-row .ai-intro-demo-btn {
    margin-top: 0;
}

.aisb-demo-bubble {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 360px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #17497e, #2a78d6);
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(23, 73, 126, .35);
    font-size: 13px;
    line-height: 1.6;
    animation: aisb-demo-bubble-in .18s ease-out;
}
@keyframes aisb-demo-bubble-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.aisb-demo-bubble-text {
    flex: 1;
}
.aisb-demo-bubble-stop {
    flex: 0 0 auto;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: bold;
    color: #17497e;
    background: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.aisb-demo-bubble-stop:hover {
    background: #eaf2fd;
}

/* ---- ダッシュボード ---- */
.summary-boxes {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.summary-box {
    flex: 1;
    background: #eaf2fd;
    border: 1px solid #b9d3ec;
    padding: 12px;
    text-align: center;
}
.summary-box .num {
    font-size: 22px;
    font-weight: bold;
    color: #17497e;
}
.summary-box .label {
    font-size: 11px;
    color: #444;
}
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.menu-button {
    display: block;
    background: #2a78d6;
    color: #fff;
    text-align: center;
    padding: 16px 8px;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid #17497e;
}
.menu-button:hover {
    background: #17497e;
}

/* ---- ページャ ---- */
.pager {
    text-align: center;
    margin-bottom: 16px;
}
.pager a {
    margin: 0 10px;
    color: #17497e;
}

#footer {
    font-size: 11px;
    color: #666;
    text-align: center;
    padding: 8px;
}
