@charset "utf-8";

/* ==========================================================
   Reset
   ========================================================== */

pre { white-space: pre-wrap !important; }

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

html { height: 100%; overflow: auto; }

body {
    background: #fff;
    color: #3a3a3a;
    font-family: "游ゴシック", "Yu Gothic", YuGothic, "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", "メイリオ", Meiryo, sans-serif;
    height: 100%;
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
    line-height: normal;
    overflow: hidden;
    text-align: left;
}

img { max-width: 100%; height: auto; vertical-align: middle; }
a { text-decoration: none; color: #404040; }
li { list-style: none; }
button { color: #3a3a3a; }

/* ==========================================================
   Login
   ========================================================== */

.login_wrapper { width: 100%; height: 100%; position: relative; }

.login-container {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 20px);
    padding: 40px;
    border-radius: 10px;
}

.login_title { color: #00397f; line-height: normal; }
.login_title h1 { font-size: 16px; }
.login_title span { display: block; font-size: 32px; font-weight: 700; }

.login_box { max-width: 480px; margin: 50px auto 0; }

input {
    width: 100%;
    padding: 15px;
    border: none;
    background-color: #f4f4f4;
    border-radius: 5px;
    font-size: 16px;
}
input::placeholder { color: rgba(255, 255, 255, 0.8); }
input:focus { outline: none; }
input[readonly] { background-color: #f5f7fa; color: #666; cursor: not-allowed; }

.login-container button {
    margin-top: 50px;
    width: 80%;
    padding: 15px;
    background-color: #00397f;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.login-container button:hover { background-color: #0057c2; color: #fff; }

/* ==========================================================
   Admin Layout — New Sidebar Design
   ========================================================== */

body.admin-body {
    background: transparent;
    overflow: hidden;
    text-align: left;
}

.admin-shell {
    display: flex;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(180deg, #dedede 0%, #dedede 55%, #c8d8ec 75%, #8ab4d8 100%);
    overflow: hidden;
}

/* サイドバー */
.sidebar {
    width: 220px;
    min-width: 220px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease, min-width 0.25s ease;
    overflow: hidden;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.sidebar.collapsed { width: 56px; min-width: 56px; }

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 10px;
    min-height: 56px;
    flex-shrink: 0;
}

.sidebar-logo__icon {
    width: 32px; height: 32px; min-width: 32px;
    border-radius: 6px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff;
    background: transparent;
    flex-shrink: 0;
}

.sidebar-logo__icon img {
    width: 100%; height: 100%; object-fit: contain;
}

.sidebar-logo__text {
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}
.sidebar-logo__text strong { display: block; font-size: 13px; color: #1a2a4a; font-weight: 700; line-height: 1.2; }
.sidebar-logo__text span { font-size: 10px; color: #666; line-height: 1.2; }

.sidebar.collapsed .sidebar-logo__text { opacity: 0; width: 0; }

.sidebar-toggle {
    width: 24px; height: 24px; min-width: 24px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 10px; color: #555;
    flex-shrink: 0;
    padding: 0; margin-top: 0;
    transition: background 0.15s;
    position: static;
}
.sidebar-toggle:hover { background: rgba(255, 255, 255, 0.8); color: #1a2a4a; }
.sidebar.collapsed .sidebar-logo {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    gap: 6px;
}
.sidebar.collapsed .sidebar-toggle {
    margin: 0 auto;
    order: unset;
}
.sidebar.collapsed .sidebar-logo__icon {
    margin: 0 auto;
}
.sidebar.collapsed .sidebar-nav > ul > li > a,
.sidebar.collapsed .sidebar-nav__parent {
    justify-content: center;
    padding: 10px 0;
    margin: 2px 0;
    width: 100%;
    text-align: center;
    gap: 0;
}
.sidebar.collapsed .sidebar-nav__icon {
    width: 100%;
    text-align: center;
    margin: 0 auto;
}
.sidebar.collapsed .sidebar-nav__arrow {
    display: none;
}
.sidebar.collapsed .sidebar-sub {
    max-height: 0 !important;
    display: none;
}

.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0; }
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }

.sidebar-nav > ul > li > a,
.sidebar-nav__parent {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #3a4a6a;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    margin: 2px 6px;
    transition: background 0.15s;
    white-space: nowrap;
    text-decoration: none;
    width: calc(100% - 12px);
    background: transparent;
    border: none;
    text-align: left;
}

.sidebar-nav > ul > li > a:hover,
.sidebar-nav__parent:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #1a2a4a;
}

.sidebar-nav > ul > li.active > a {
    background: rgba(255, 255, 255, 0.65);
    color: #1a2a4a;
    font-weight: 700;
}

.sidebar-nav__icon {
    width: 18px; min-width: 18px;
    text-align: center;
    font-size: 14px;
    color: #5a6a8a;
}

.sidebar-nav > ul > li.active > a .sidebar-nav__icon,
.sidebar-nav > ul > li > a:hover .sidebar-nav__icon {
    color: #1a4a8a;
}

.sidebar-nav__label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.sidebar.collapsed .sidebar-nav__label { opacity: 0; width: 0; pointer-events: none; }
.sidebar.collapsed .sidebar-user__name { opacity: 0; width: 0; }

.sidebar-nav__arrow {
    font-size: 10px;
    color: #aaa;
    margin-left: auto;
    transition: transform 0.2s;
    min-width: 10px;
}

.has-sub.open > .sidebar-nav__parent .sidebar-nav__arrow { transform: rotate(90deg); }

.sidebar-sub {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
    list-style: none;
    padding: 0; margin: 0;
}

.has-sub.open > .sidebar-sub { max-height: 300px; }

.sidebar-sub li a {
    display: block;
    padding: 7px 12px 7px 42px;
    color: #5a6a8a;
    font-size: 12px;
    text-decoration: none;
    border-radius: 6px;
    margin: 1px 6px;
    transition: background 0.15s;
    white-space: nowrap;
}

.sidebar-sub li a:hover {
    background: rgba(255, 255, 255, 0.45);
    color: #1a2a4a;
}

.sidebar-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 6px 12px;
    pointer-events: none;
}

.sidebar-footer { padding: 10px; flex-shrink: 0; }

.sidebar-user {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden; white-space: nowrap;
}

.sidebar-user__avatar {
    width: 28px; height: 28px; min-width: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #1a4a8a;
}

.sidebar-user__name { color: #2a3a5a; font-size: 12px; }

.sidebar-logout { margin: 0; }

.sidebar-logout__btn {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    margin-top: 6px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 6px;
    color: #3a4a6a;
    font-size: 12px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    white-space: nowrap;
    font-weight: 500;
}
.sidebar-logout__btn:hover { background: rgba(255, 255, 255, 0.5); color: #1a2a4a; }

/* メインエリア */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.admin-topbar {
    height: 56px;
    padding: 0 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.admin-topbar .status {
    margin-right: auto;
    margin-top: 0;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.topbar-user__avatar {
    width: 30px; height: 30px;
    min-width: 30px;
    border-radius: 6px;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #2a3a5a;
    flex-shrink: 0;
}

.topbar-user__name {
    font-size: 13px;
    color: #2a3a5a;
    font-weight: 500;
    white-space: nowrap;
}

.page-heading {
    font-size: 26px;
    font-weight: 700;
    color: #1a2a4a;
    padding: 20px 20px 8px;
    letter-spacing: 0.01em;
}

.admin-topbar .status,
.status {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    color: #1a4a8a;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    margin-top: 10px;
    display: inline-block;
}

.admin-content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 20px; }

/* ==========================================================
   パンくずリスト
   ========================================================== */

.breadwrap {
    width: calc(100% - 40px);
    margin: 0 auto 24px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    font-size: 14px;
}

.breadcrumb li:not(:last-of-type)::after {
    content: "/";
    margin: 0 .6em;
    color: #777;
}

.onpage { color: #1a2a4a; font-weight: 700; }

/* ==========================================================
   共通パーツ
   ========================================================== */

.container {
    margin: 10px auto 50px;
    padding: 10px 0;
    width: calc(100% - 40px);
    max-width: 1080px;
}

.content {
    width: 100%;
    border-radius: 10px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 30px;
}

.cmn_title { text-align: left; }
.title_ja { font-weight: 700; font-size: 20px; color: #1a2a4a; }
.title_ex { font-size: 15px; color: #555; }

.inner { padding: 32px 0; }

/* テーブル横スクロール用ラッパー */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-wrap table { min-width: 600px; }

/* 詳細テーブルのnowrap */
.detail-table th,
.detail-table td {
    white-space: nowrap;
    vertical-align: top;
}

/* ステータス進捗カード */
.modern-status-card {
    margin-top: 16px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    padding: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.modern-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.ms-label { font-weight: 700; color: #1f5fff; font-size: 14px; }
.ms-status-pill {
    display: inline-block;
    padding: 4px 12px;
    background: #eff3ff;
    color: #1f5fff;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
}
.modern-progress-grid,
.modern-progress-grid-8 {
    display: flex;
    gap: 0;
    min-width: max-content;
}
.ms-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 10px 16px;
    min-width: 90px;
}
/* ステップ間の矢印 */
.ms-step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #d1d5db;
    z-index: 1;
}
.ms-step.done:not(:last-child)::after {
    border-left-color: #bcd9ff;
}
.ms-step {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-right: 16px;
}
.ms-step.done {
    background: #e9f4ff;
    border-color: #bcd9ff;
}
.ms-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #cbd5e1;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 6px;
}
.ms-step.done .ms-step-number { background: #1f5fff; }
.ms-step-label { font-size: 12px; font-weight: 600; color: #64748b; white-space: nowrap; }
.ms-step.done .ms-step-label { color: #1a2a4a; }

/* ==========================================================
   アコーディオン（検索）
   ========================================================== */

.accordion-toggle {
    background-color: #00397f;
    padding: 10px;
    cursor: pointer;
    border: none;
    font-size: 16px;
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s ease;
    margin-top: 0;
    color: #fff;
}
.accordion-toggle:hover { background-color: #1668cc; }
.accordion-toggle .icon { display: inline-block; transition: transform 0.3s ease; }
.accordion-toggle.open .icon { transform: rotate(90deg); }
.accordion-toggle .label { transition: opacity 0.3s ease; }

.accordion-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s ease, padding 0.3s ease;
    padding: 0;
}
.accordion-content.open { padding: 20px 0; }

/* ==========================================================
   お知らせ
   ========================================================== */

.news li { border-top: 1px solid #e6e6e6; }
.news li:last-child { border-bottom: 1px solid #e6e6e6; }

.news_item {
    display: flex; align-items: center;
    width: 100%;
    padding: 16px 4px;
}

.news_posttime { font-weight: 700; margin-right: 20px; color: #777; }
.news_posttitle { font-weight: 700; }

/* ==========================================================
   検索フォーム
   ========================================================== */

.serchbox { margin-bottom: 50px; }

.serchtitle {
    font-weight: 700;
    display: flex; align-items: center;
    white-space: nowrap;
}
.serchtitle::after {
    content: "";
    width: 100%;
    height: 1px;
    background-color: #e6e6e6;
    margin-left: 10px;
}

#serchform {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    height: 50px;
}

#serchcontent,
#serchform select {
    width: 100%;
    padding: 0 15px;
    border-radius: 4px 0 0 4px;
    background: #fff;
    border: none;
    outline: 0;
    font-size: 14px;
    height: 50px;
}

#serchform select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg fill='gray' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

#serchbutton {
    width: 70px;
    border-radius: 0 4px 4px 0;
    background: #00397f;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}
#serchbutton:hover { background: #92dbff; }

/* ==========================================================
   受入待ち・受入認証テーブル
   ========================================================== */

.accept {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 20px;
}

.accept th {
    background-color: rgba(255, 255, 255, 0.3);
    color: #2a3a5a;
    font-weight: 700;
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}

.accept td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
    text-align: left;
    white-space: nowrap;
}

.accept tbody tr:nth-child(odd) { background-color: rgba(255, 255, 255, 0.15); }
.accept tbody tr:nth-child(even) { background-color: transparent; }

.accept-btn {
    padding: 5px 12px;
    font-size: 13px;
    color: #fff;
    background-color: #1a4a8a;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color .2s ease;
    margin-top: 0;
}
.accept-btn:hover { background-color: #2563b0; }

/* ==========================================================
   オンタイム受注テーブル
   ========================================================== */

.noworder-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.noworder-table th,
.noworder-table td {
    padding: 8px;
    white-space: nowrap;
    vertical-align: middle;
    text-align: left;
}

.noworder-table th {
    background-color: rgba(255, 255, 255, 0.3);
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.noworder-table tbody tr:nth-child(odd) { background-color: rgba(255, 255, 255, 0.15); }
.noworder-table tbody tr:nth-child(even) { background-color: transparent; }

.noworder-detail-link {
    display: inline-block;
    padding: 5px 10px;
    background-color: #1a4a8a;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background-color 0.2s ease;
}
.noworder-detail-link:hover { background-color: #2563b0; }

/* ==========================================================
   受注詳細
   ========================================================== */

.item-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    padding: 24px;
    margin-top: 24px;
}

.item-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a2a4a;
    padding-left: 10px;
    margin-bottom: 20px;
}

.item-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.item-block label,
.item-block span { display: block; text-align: left; }

.item-block label { font-size: 13px; color: #888; margin-bottom: 4px; }
.item-block span { font-size: 15px; font-weight: 500; color: #222; }

.badge {
    width: fit-content;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    line-height: 1.4;
}
.badge-ok { background-color: #e0f7e9; color: #1a7f37; }
.badge-done { background-color: #96051d; color: #fff !important; }

.palette-labelled-btn {
    width: 100%;
    display: inline-block;
    margin-bottom: 8px;
    padding: 8px 16px;
    background-color: #007bff;
    color: #fff;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color .2s ease;
}
.palette-labelled-btn:hover { background-color: #0056b3; }

.palettebtn {
    width: 100%;
    background-color: #00397f;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.palettebtn:hover { background-color: #0056b3; }

.palette-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0;
    background: rgba(255, 255, 255, 0.3);
    margin-top: 10px;
}
.palette-content.open { max-height: 500px; }

.palette-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 10px;
}

.palette-th,
.palette-td {
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
}

.palette-th { background-color: rgba(255, 255, 255, 0.3); color: #333; font-weight: 600; }

.palette-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.4;
    white-space: nowrap;
}
.palette-done { background-color: #e5f0ff; color: #004bbd; }

/* ==========================================================
   生産管理テーブル
   ========================================================== */

.inproduction-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.inproduction-table th,
.inproduction-table td {
    padding: 8px;
    white-space: nowrap;
    vertical-align: middle;
    text-align: left;
}

.inproduction-table th {
    background-color: rgba(255, 255, 255, 0.3);
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.inproduction-table tbody tr:nth-child(odd) { background-color: rgba(255, 255, 255, 0.15); }
.inproduction-table tbody tr:nth-child(even) { background-color: transparent; }

.inproduction-detail-link {
    display: inline-block;
    padding: 5px 10px;
    background-color: #1a4a8a;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background-color 0.2s ease;
}
.inproduction-detail-link:hover { background-color: #2563b0; }

/* ==========================================================
   発注フォーム
   ========================================================== */

.order-input-form {
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 24px;
    margin: 0 auto;
}

#order-id[readonly] {
    background-color: #f5f5f5;
    color: #555;
    border: 1px solid #ccc;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    font-weight: bold;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #3a3a3a;
    background: #fff;
}

.form-actions {
    text-align: right;
    margin-top: 10px;
}

.form-actions button {
    padding: 8px 20px;
    font-size: 14px;
    background-color: #1a4a8a;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: auto;
    margin-top: 0;
}
.form-actions button:hover { background-color: #2563b0; }

.form-actions .cancel-btn {
    margin-left: 10px;
    padding: 10px 16px;
    font-size: 14px;
    color: #1a4a8a;
    background: transparent;
    border: none;
    text-decoration: underline;
    cursor: pointer;
    width: auto;
    margin-top: 0;
}
.cancel-btn:hover { text-decoration: none; }

.order-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
    background-color: #f7fbff;
    border: 1px solid #c8ddee;
    border-radius: 6px;
    overflow: hidden;
}

.order-summary-table th {
    background-color: #e1effa;
    color: #00397f;
    font-weight: 600;
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #c8ddee;
}

.order-summary-table td {
    padding: 10px;
    border-bottom: 1px solid #e6f0f8;
}

.order-summary-table input[type="text"],
.order-summary-table input[type="number"] {
    width: 100%;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #b5cde0;
    border-radius: 4px;
    background-color: #fff;
    box-sizing: border-box;
}

.order-summary-table input[readonly] { background-color: #eef5fa; color: #555; }

/* ==========================================================
   受注検索テーブル
   ========================================================== */

.ordersearch {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 20px;
}

.ordersearch th {
    background-color: rgba(255, 255, 255, 0.3);
    color: #2a3a5a;
    text-align: left;
    font-weight: 700;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}

.ordersearch td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
    text-align: left;
}

.ordersearch tbody tr:nth-child(odd) { background-color: rgba(255, 255, 255, 0.15); }
.ordersearch tbody tr:nth-child(even) { background-color: transparent; }

.ordersearch-detail-link {
    display: inline-block;
    padding: 5px 10px;
    background-color: #1a4a8a;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background-color 0.2s ease;
}
.ordersearch-detail-link:hover { background-color: #2563b0; }

/* onorder */
.onorder-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
    font-size: 0.95em;
    background-color: rgba(255, 255, 255, 0.3);
}

.onorder-table th,
.onorder-table td { padding: 10px; border: 1px solid rgba(0,0,0,0.08); text-align: center; }

.onorder-table thead { background-color: rgba(255, 255, 255, 0.3); font-weight: bold; }
.onorder-table tbody tr:nth-child(even) { background-color: rgba(255, 255, 255, 0.15); }

.onorder-detail-link {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.9em;
    background-color: #1a4a8a;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}
.onorder-detail-link:hover { background-color: #2563b0; }

/* ==========================================================
   ページネーション
   ========================================================== */

.pager-simple {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.page-btn {
    display: inline-block;
    min-width: 34px;
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.5);
    color: #1f2937;
    text-decoration: none;
    font-size: 13px;
    text-align: center;
    transition: background-color 0.15s ease;
}
.page-btn:hover { background: rgba(255, 255, 255, 0.7); }
.page-btn.current { background: #1a4a8a; color: #fff; border-color: #1a4a8a; font-weight: 700; }
.page-btn.disabled { background: rgba(255,255,255,0.2); color: #9ca3af; cursor: not-allowed; }
.pager-meta { text-align: center; margin-top: 6px; color: #6b7280; font-size: 12px; }
.pagination-nav { margin-top: 12px; }

/* ==========================================================
   スタッフ（従業員）ページ
   ========================================================== */

.staffwrap {
    width: 100%;
    min-height: 100vh;
    padding: 48px 16px;
    background: #f6f8fb;
    display: flex;
    align-items: center;
}

.staffcontainer {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.profile-card {
    position: relative;
    background-color: #fff;
    width: 340px;
    border-radius: 16px;
    text-align: center;
    padding: 32px 24px 40px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.avatar {
    width: 140px; height: 140px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #f6f8fb;
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 0 0 10px #fff, 0 8px 20px rgba(0, 0, 0, 0.08);
}

.avatar img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0; }

.staffname { margin: 0; font-size: 22px; color: #222; text-align: center; }
.furigana { color: #7a7a7a; margin: 4px 0 2px; font-size: 13px; }
.description { color: #666; font-size: 13px; margin-bottom: 22px; }

.message-btn {
    background-color: #00397f;
    border: none; color: white;
    padding: 10px 30px;
    border-radius: 24px;
    cursor: pointer; font-size: 14px; margin-bottom: 15px;
}
.message-btn:hover { background-color: #0056b3; }

.qr-box { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.qr-live video { width: 100%; max-width: 420px; border-radius: 10px; background: #0f2a47; }
.qr-btn-primary { margin: 0; width: 100%; max-width: 260px; }
.qr-btn-secondary { margin: 0; width: 100%; max-width: 260px; }
.qr-upload { width: 100%; display: flex; justify-content: center; }
.qr-result-box { width: 100%; display: flex; justify-content: center; }

.staff-status-box {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 15px 0 50px;
    font-size: 14px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.status-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #e3e7eb;
}
.status-item:last-child { border-bottom: none; }
.status-label { font-weight: bold; color: #333; }
.status-value { font-size: 13px; padding: 3px 10px; border-radius: 12px; color: #fff; }
.status-value.paint { background-color: #007bce; }
.status-value.line { background-color: #60b157; }

.qr-result {
    background: #f7fafd;
    border: 1px solid #cfe2f3;
    border-radius: 12px;
    padding: 20px;
    max-width: 400px;
    margin: 50px auto;
    text-align: center;
    font-family: sans-serif;
}

.status-update { color: #007bce; font-weight: bold; }

.back-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 24px;
    background: #007bce;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

/* ==========================================================
   マスタ管理
   ========================================================== */

.master-action-btn {
    width: 100%;
    display: inline-block;
    padding: 8px 16px;
    background-color: #1a4a8a;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    font-weight: 700;
}
.master-action-btn:hover { background-color: #2563b0; }

.master-section {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 40px;
}

.result-section {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 40px;
}

.section-title {
    font-size: 18px;
    margin-bottom: 20px;
    color: #1a2a4a;
    border-bottom: 2px solid #1a4a8a;
    padding-bottom: 6px;
}

.master-form .form-group { margin-bottom: 16px; }

.master-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.master-form input,
.master-form textarea {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    resize: vertical;
}

.master-form input[readonly] { background-color: #eee; color: #666; }

/* マスタテーブル共通 */
.company-table,
.product-table,
.staff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 10px;
}

.company-table th,
.product-table th,
.staff-table th {
    background-color: rgba(255, 255, 255, 0.4);
    color: #2a3a5a;
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    white-space: nowrap;
}

.company-table td,
.product-table td,
.staff-table td {
    border: 1px solid rgba(0,0,0,0.08);
    padding: 10px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.company-table tbody tr:nth-child(even),
.product-table tbody tr:nth-child(even),
.staff-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.15);
}

.edit-btn {
    display: inline-block;
    padding: 6px 12px;
    background-color: #1a4a8a;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background-color 0.2s ease;
}
.edit-btn:hover { background-color: #2563b0; }

.company-edit,
.product-edit-page,
.staff-edit-page {
    max-width: 700px;
    margin: 40px auto;
    padding: 24px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 8px;
}

.company-master,
.product-master-page,
.staff-master-page {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ==========================================================
   レスポンシブ（768px以下）
   ========================================================== */

/* ハンバーガーボタン */
.sidebar-hamburger {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #2a3a5a;
    font-size: 20px;
    margin-right: auto;
    padding: 0;
    flex-shrink: 0;
}

/* オーバーレイ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99;
}
.sidebar-overlay.active { display: block; }
.sidebar-overlay.active::after {
    content: '✕';
    position: fixed;
    top: 14px;
    left: 236px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #1a2a4a;
    font-weight: 700;
    cursor: pointer;
    z-index: 101;
    line-height: 36px;
    text-align: center;
}

@media (max-width: 1024px) {
    /* ハンバーガー表示 */
    .sidebar-hamburger { display: flex; }

    /* サイドバーを画面外に隠す */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.25s ease, width 0.25s ease, min-width 0.25s ease;
        width: 220px !important;
        min-width: 220px !important;
    }

    /* サイドバーopen時 */
    .sidebar.mobile-open {
        transform: translateX(0);
    }

    /* collapsed状態はモバイルでは無効化 */
    .sidebar.collapsed {
        width: 220px !important;
        min-width: 220px !important;
    }
    .sidebar.collapsed .sidebar-logo__text { opacity: 1; width: auto; }
    .sidebar.collapsed .sidebar-nav__label { opacity: 1; width: auto; pointer-events: auto; }
    .sidebar.collapsed .sidebar-user__name { opacity: 1; width: auto; }
    .sidebar.collapsed .sidebar-nav > ul > li > a,
    .sidebar.collapsed .sidebar-nav__parent {
        justify-content: flex-start;
        padding: 10px 16px;
        gap: 10px;
    }
    .sidebar.collapsed .sidebar-nav__icon { width: auto; text-align: left; margin: 0; }
    .sidebar.collapsed .sidebar-logo { flex-direction: row; align-items: center; padding: 16px; gap: 10px; }
    .sidebar.collapsed .sidebar-toggle { margin: 0; order: unset; }
    .sidebar.collapsed .sidebar-sub { display: block; max-height: none; }

    /* トップバーのfold-toggleボタン（PCのみ）を隠す */
    .sidebar-toggle { display: none; }

    /* admin-shellはモバイルで通常フロー */
    .admin-shell { overflow: hidden; }
    .admin-main { overflow-y: auto; overflow-x: hidden; }
    .admin-content { overflow: visible; }

    /* ページ見出し */
    .page-heading { font-size: 20px; padding: 16px 16px 6px; }

    /* パンくず */
    .breadwrap { padding: 0 16px; margin-bottom: 16px; }

    /* テーブルセルの折り返し防止 */
    .noworder-table td,
    .noworder-table th,
    .inproduction-table td,
    .inproduction-table th,
    .accept td,
    .accept th {
        white-space: nowrap;
    }

    /* テーブル内ボタンの変形防止 */
    .noworder-detail-link,
    .inproduction-detail-link {
        white-space: nowrap;
        display: inline-block;
        padding: 4px 10px;
    }
    .btn {
        white-space: nowrap;
        width: auto !important;
        margin-top: 0 !important;
        padding: 6px 12px !important;
    }

    /* contentのpadding調整 */
    .content { margin: 0 0 16px; border-radius: 10px; }
    .admin-content { padding: 0 12px; }

    /* 詳細画面のグリッドを1カラムに */
    .item-grid { grid-template-columns: 1fr; gap: 12px; }

    /* ステータス進捗を横スクロール */
    .modern-progress-grid,
    .modern-progress-grid-8 {
        grid-template-columns: repeat(6, minmax(80px, 1fr));
        overflow-x: auto;
    }

    /* palette-labelled-btnのmargin-top修正 */
    .palette-labelled-btn { margin-top: 8px; }
}
