/* ============================================================
   アイゾールテクニカ 製品注文予定システム / 共通スタイル
   ============================================================ */

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

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
    font-size: 14px;
    background: #f0f4f8;
    color: #333;
    min-height: 100vh;
}

/* ---- ヘッダー ---- */
.site-header {
    background: #005bac;
    color: #fff;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.site-header h1 { font-size: 16px; font-weight: bold; }
.site-header .user-info { font-size: 13px; opacity: .9; }

/* ---- メインコンテナ ---- */
.container {
    max-width: 1100px;
    margin: 32px auto;
    padding: 0 16px;
}

/* ---- カード ---- */
.card {
    background: #fff;
    border: 1px solid #d0dce8;
    border-radius: 6px;
    padding: 32px 40px;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.card-title {
    font-size: 17px;
    font-weight: bold;
    color: #005bac;
    border-bottom: 2px solid #005bac;
    padding-bottom: 10px;
    margin-bottom: 24px;
}

/* ---- ログインフォーム ---- */
.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f0f4f8;
}
.login-box {
    background: #fff;
    border: 1px solid #d0dce8;
    border-radius: 8px;
    padding: 48px 56px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.login-box h2 {
    font-size: 18px;
    color: #005bac;
    text-align: center;
    margin-bottom: 8px;
    text-decoration: underline;
}
.login-box .site-name {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-bottom: 28px;
}

/* ---- フォーム部品 ---- */
.form-group {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.form-group label {
    width: 120px;
    flex-shrink: 0;
    background: #1ab0ea;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    padding: 7px 10px;
    border-radius: 3px;
    text-align: center;
}
.form-group label.req::after {
    content: ' ＊';
    font-size: 11px;
    opacity: .85;
}
.form-group .field { flex: 1; }
.form-control {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #aac;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color .15s;
}
.form-control:focus { outline: none; border-color: #005bac; box-shadow: 0 0 0 2px rgba(0,91,172,.15); }

/* ---- セレクトボックスグループ ---- */
.select-group { display: flex; gap: 8px; flex-wrap: wrap; }
.listbox {
    border: 1px solid #aac;
    border-radius: 3px;
    min-width: 220px;
    font-size: 14px;
    font-family: inherit;
    padding: 4px 0;
}
.listbox option { padding: 4px 8px; }
.listbox option:checked { background: #1ab0ea; color: #fff; }

/* ---- ボタン ---- */
.btn {
    display: inline-block;
    padding: 9px 28px;
    font-size: 14px;
    font-weight: bold;
    font-family: inherit;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s;
}
.btn:hover { opacity: .85; }
.btn-primary  { background: #1ab0ea; color: #fff; }
.btn-success  { background: #1ab0ea; color: #fff; }
.btn-danger   { background: #e04040; color: #fff; }
.btn-logout   { background: #e04040; color: #fff; padding: 6px 18px; font-size: 13px; }
.btn-new      { background: #1ab0ea; color: #fff; min-width: 160px; }
.btn-sm       { padding: 5px 16px; font-size: 13px; }

/* ---- テーブル ---- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 16px;
}
.data-table th {
    background: #1ab0ea;
    color: #fff;
    padding: 9px 10px;
    border: 1px solid #0d9acc;
    text-align: center;
    white-space: nowrap;
}
.data-table td {
    padding: 8px 10px;
    border: 1px solid #d0dce8;
    vertical-align: middle;
}
.data-table tr:nth-child(even) td { background: #f5f9fd; }
.data-table tr:hover td { background: #e8f4fc; }
.data-table td.num { text-align: right; }
.data-table td.center { text-align: center; }

/* ---- ページネーション ---- */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #d0dce8;
    border-radius: 3px;
    font-size: 13px;
    color: #005bac;
    text-decoration: none;
    background: #fff;
}
.pagination a:hover { background: #e8f4fc; }
.pagination .active { background: #1ab0ea; color: #fff; border-color: #1ab0ea; font-weight: bold; }
.pagination .disabled { color: #aaa; cursor: default; }

/* ---- 検索・フィルタバー ---- */
.search-bar {
    background: #eef5fb;
    border: 1px solid #d0dce8;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.search-bar label { font-size: 12px; font-weight: bold; display: block; margin-bottom: 4px; }
.search-bar .form-control { font-size: 13px; }
.search-bar select { padding: 6px 8px; border: 1px solid #aac; border-radius: 3px; font-size: 13px; }

/* ---- OTP 表示 ---- */
.otp-display {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}
.otp-digit {
    width: 44px; height: 56px;
    border: 2px solid #1ab0ea;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: #005bac;
    background: #f0f9ff;
}

/* ---- モーダルダイアログ ---- */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
    background: #fff;
    border-radius: 8px;
    padding: 40px 48px;
    text-align: center;
    min-width: 320px;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.modal-box p { font-size: 16px; font-weight: bold; margin-bottom: 24px; color: #333; }
.modal-buttons { display: flex; gap: 16px; justify-content: center; }

/* ---- アラート ---- */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 13px;
}
.alert-error   { background: #fdecea; border: 1px solid #e04040; color: #c00; }
.alert-success { background: #e8f8ea; border: 1px solid #3a9a4a; color: #2a7a3a; }
.alert-info    { background: #e8f4fc; border: 1px solid #1ab0ea; color: #005bac; }

/* ---- OTPログイン画面 ---- */
.otp-input { text-align: center; font-size: 32px; letter-spacing: 10px; width: 200px; }

/* ---- レスポンシブ ---- */
@media (max-width: 768px) {
    .card { padding: 20px; }
    .form-group { flex-direction: column; }
    .form-group label { width: 100%; }
    .data-table { font-size: 12px; }
    .data-table th, .data-table td { padding: 6px 6px; }
}
