/* ==========================================================================
   LunchBox System - 運営管理画面
   ========================================================================== */

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.system-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f6f8;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.system-header {
    background-color: #2c3e50;
    color: #fff;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.system-header__left {
    display: flex;
    align-items: center;
}

.system-header__logo {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.system-header__logo:hover {
    opacity: 0.9;
}

.system-header__right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.system-header__user {
    font-size: 13px;
    color: #ccc;
}

.system-header__logout-form {
    display: inline;
}

.system-header__logout-btn {
    padding: 5px 12px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.system-header__logout-btn:hover {
    background-color: #c0392b;
}

/* --------------------------------------------------------------------------
   Main
   -------------------------------------------------------------------------- */
.system-main {
    padding: 24px 32px;
}

.system-main--center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
}

/* --------------------------------------------------------------------------
   Container
   -------------------------------------------------------------------------- */
.system-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Page Title
   -------------------------------------------------------------------------- */
.system-page-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 28px;
}

/* --------------------------------------------------------------------------
   Section
   -------------------------------------------------------------------------- */
.system-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 20px;
}

.system-section__title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */
.system-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.system-stats__card {
    flex: 1;
    min-width: 140px;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 16px;
    text-align: center;
}

.system-stats__number {
    font-size: 28px;
    font-weight: 700;
    color: #4a90d9;
}

.system-stats__label {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Menu Buttons
   -------------------------------------------------------------------------- */
.system-menu-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */
.system-login {
    width: 100%;
    max-width: 400px;
}

.system-login__card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.system-login__title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}

.system-login__subtitle {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-bottom: 28px;
}

/* --------------------------------------------------------------------------
   Alert
   -------------------------------------------------------------------------- */
.system-alert {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 20px;
}

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

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

/* --------------------------------------------------------------------------
   Form Group
   -------------------------------------------------------------------------- */
.system-form-group {
    margin-bottom: 18px;
}

.system-form-group__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.system-form-group__input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.system-form-group__input:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

.system-form-group__input::placeholder {
    color: #aaa;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.system-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-align: center;
    color: #fff;
}

.system-btn:hover {
    transform: translateY(-1px);
}

.system-btn:active {
    transform: translateY(0);
}

.system-btn--primary {
    background-color: #4a90d9;
}

.system-btn--primary:hover {
    background-color: #3a7bc8;
}

.system-btn--success {
    background-color: #27ae60;
}

.system-btn--success:hover {
    background-color: #219a52;
}

.system-btn--secondary {
    background-color: #7f8c8d;
}

.system-btn--secondary:hover {
    background-color: #6c7a7b;
}

.system-btn--block {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 12px;
    font-size: 15px;
}


/* --------------------------------------------------------------------------
   Page Nav
   -------------------------------------------------------------------------- */
.system-page-nav {
    margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Table
   -------------------------------------------------------------------------- */
.system-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.system-table thead {
    background-color: #f8f9fa;
}

.system-table th,
.system-table td {
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
}

.system-table th {
    font-weight: 600;
    color: #555;
    font-size: 13px;
    white-space: nowrap;
}

.system-table tbody tr:hover {
    background-color: #f7fafc;
}

.system-table__th--id {
    width: 50px;
    text-align: center;
}

.system-table__th--num {
    width: 80px;
    text-align: right;
}

.system-table__th--action {
    width: 160px;
    text-align: center;
}

.system-table__td--num {
    text-align: right;
}

.system-table__td--action {
    text-align: center;
}

.system-table__td--empty {
    text-align: center;
    color: #999;
    padding: 24px;
}

.system-table-footer {
    margin-top: 12px;
    font-size: 13px;
    color: #666;
}

/* --------------------------------------------------------------------------
   Button Variants (additional)
   -------------------------------------------------------------------------- */
.system-btn--back {
    display: inline-block;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #555;
    background-color: #e2e8f0;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.system-btn--back:hover {
    background-color: #cbd5e0;
}

.system-btn--danger {
    background-color: #e74c3c;
}

.system-btn--danger:hover {
    background-color: #c0392b;
}

.system-btn--sm {
    padding: 6px 12px;
    font-size: 12px;
}


/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.system-breadcrumb {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 32px;
}

.system-breadcrumb__list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    font-size: 13px;
}

.system-breadcrumb__item {
    display: flex;
    align-items: center;
    color: #666;
}

.system-breadcrumb__item + .system-breadcrumb__item::before {
    content: ">";
    margin: 0 8px;
    color: #aaa;
}

.system-breadcrumb__item a {
    color: #4a90d9;
    text-decoration: none;
}

.system-breadcrumb__item a:hover {
    text-decoration: underline;
}

.system-breadcrumb__item--current {
    font-weight: 600;
    color: #333;
}


/* --------------------------------------------------------------------------
   Sidebar Layout
   -------------------------------------------------------------------------- */
.system-layout {
    display: flex;
    min-height: calc(100vh - 50px);
}

.system-sidebar {
    width: 200px;
    background-color: #2c3e50;
    flex-shrink: 0;
}

.system-sidebar__nav {
    padding: 16px 0;
}

.system-sidebar__item {
    display: block;
    padding: 10px 20px;
    color: #bdc3c7;
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.15s, color 0.15s;
}

.system-sidebar__item:hover {
    background-color: #34495e;
    color: #fff;
}

.system-sidebar__item--active {
    background-color: #4a90d9;
    color: #fff;
}

.system-content {
    flex: 1;
    min-width: 0;
}

/* --------------------------------------------------------------------------
   Search
   -------------------------------------------------------------------------- */
.system-search {
    margin-bottom: 16px;
}

.system-search__form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.system-search__input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    width: 260px;
    transition: border-color 0.2s;
}

.system-search__input:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.1);
}

.system-search__clear {
    font-size: 12px;
    color: #666;
    text-decoration: none;
}

.system-search__clear:hover {
    color: #333;
    text-decoration: underline;
}


/* --------------------------------------------------------------------------
   Form Section Title
   -------------------------------------------------------------------------- */
.system-form-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-top: 24px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.system-form-section-title:first-child {
    margin-top: 0;
}

/* --------------------------------------------------------------------------
   Form Group (extended)
   -------------------------------------------------------------------------- */
.system-form-group__input--short {
    width: 200px;
}

.system-form-group__required {
    color: #e74c3c;
    font-size: 12px;
}

.system-form-group__readonly {
    padding: 10px 12px;
    background-color: #f5f5f5;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
}

/* --------------------------------------------------------------------------
   Form Actions
   -------------------------------------------------------------------------- */
.system-form-actions {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* --------------------------------------------------------------------------
   Alert List
   -------------------------------------------------------------------------- */
.system-alert__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.system-alert__list li + li {
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Table Action (multi-button)
   -------------------------------------------------------------------------- */
.system-table__td--action {
    text-align: center;
    white-space: nowrap;
}

.system-table__td--action .system-btn,
.system-table__td--action form {
    display: inline-block;
    vertical-align: middle;
}

.system-table__td--action .system-btn + form,
.system-table__td--action form + .system-btn {
    margin-left: 6px;
}


/* --------------------------------------------------------------------------
   Form Hint
   -------------------------------------------------------------------------- */
.system-form-group__hint {
    margin-top: 4px;
    font-size: 12px;
    color: #888;
}

/* --------------------------------------------------------------------------
   Page Subtitle
   -------------------------------------------------------------------------- */
.system-page-subtitle {
    font-size: 14px;
    color: #666;
    margin-top: -20px;
    margin-bottom: 24px;
}


/* --------------------------------------------------------------------------
   Button Extra Small & Outline
   -------------------------------------------------------------------------- */
.system-btn--xs {
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.system-btn--outline {
    background-color: transparent;
    border: 1px solid #4a90d9;
    color: #4a90d9;
}

.system-btn--outline:hover {
    background-color: #4a90d9;
    color: #fff;
}


/* --------------------------------------------------------------------------
   Table Center Cell
   -------------------------------------------------------------------------- */
.system-table__td--center {
    text-align: center;
}

.system-table td.system-table__td--center {
    text-align: center;
}

.system-table__th--admin-btn {
    width: 90px;
    text-align: center;
}



/* --------------------------------------------------------------------------
   Form Inline (input + button)
   -------------------------------------------------------------------------- */
.system-form-group__inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.system-form-group__inline .system-form-group__input {
    flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   Help / Guide (CSV import 等の補足説明ブロック)
   -------------------------------------------------------------------------- */
/* 補足テキスト */
.system-help-text {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
    margin: 0 0 12px;
}

.system-help-text:last-child {
    margin-bottom: 0;
}

.system-help-text--mt {
    margin-top: 16px;
}

/* 補足テキスト内のコード表記（ヘッダー行の例など） */
.system-help-text code {
    display: inline-block;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    color: #334155;
    word-break: break-all;
}

/* グループ・納品先の2カラム。狭い画面では自動で縦積みになる */
.system-help-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

/* 各カラムをカード状にして区切りを分かりやすくする */
.system-help-columns > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.system-help-subtitle {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

/* 名称一覧をタグ（チップ）風に横並び表示する */
.system-help-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.system-help-list li {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Page Head（ページタイトルと右側アクションの横並び配置）
   -------------------------------------------------------------------------- */
.system-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* page-head 内ではタイトル/サブタイトルの既存の余白（負のmargin-top含む）を打ち消し、
   タイトルの下にサブタイトルが重ならず並ぶようにする */
.system-page-head .system-page-title {
    margin: 0 0 4px;
}

.system-page-head .system-page-subtitle {
    margin: 0;
}

.system-page-head__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
