/* 基幹業務システム向け — 視認性・一覧性優先 */

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

body {
    margin: 0;
    font-family: "Meiryo", "Hiragino Kaku Gothic ProN", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #1a1a1a;
    background: #f0f2f5;
}

a {
    color: #1a5276;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px 40px;
}

/* ナビゲーション */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2c3e50;
    color: #fff;
    padding: 10px 20px;
}

.nav-brand {
    font-weight: bold;
    font-size: 15px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-menu a {
    color: #ecf0f1;
    text-decoration: none;
}

.nav-menu a:hover {
    text-decoration: underline;
}

.nav-user {
    color: #bdc3c7;
    font-size: 13px;
}

.inline-form {
    display: inline;
    margin: 0;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #95a5a6;
    background: #fff;
    color: #1a1a1a;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    border-radius: 2px;
}

.btn:hover {
    background: #ecf0f1;
}

.btn-primary {
    background: #1a5276;
    border-color: #1a5276;
    color: #fff;
}

.btn-primary:hover {
    background: #154360;
}

.btn-block {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.btn-link {
    background: none;
    border: none;
    color: #ecf0f1;
    padding: 0;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

/* フォーム */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 400px;
    padding: 8px 10px;
    border: 1px solid #bdc3c7;
    border-radius: 2px;
    font-size: 14px;
}

.form-error {
    color: #c0392b;
    font-size: 13px;
    margin: 4px 0 0;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.checkbox-label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* パネル・テーブル */
.panel {
    background: #fff;
    border: 1px solid #d5dbdb;
    padding: 20px;
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    border: 1px solid #d5dbdb;
    padding: 8px 12px;
    text-align: left;
}

.table th {
    background: #eaeded;
    font-weight: bold;
}

.table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* 情報リスト */
.info-list {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px 16px;
    margin: 0;
}

.info-list dt {
    font-weight: bold;
    color: #566573;
}

.info-list dd {
    margin: 0;
}

/* アラート */
.alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid;
    border-radius: 2px;
}

.alert-success {
    background: #eafaf1;
    border-color: #27ae60;
    color: #1e8449;
}

.alert-error {
    background: #fdedec;
    border-color: #c0392b;
    color: #922b21;
}

/* ログイン画面 */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #2c3e50;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.auth-box {
    background: #fff;
    border: 1px solid #d5dbdb;
    padding: 32px;
}

.auth-title {
    margin: 0 0 4px;
    font-size: 20px;
    text-align: center;
}

.auth-subtitle {
    margin: 0 0 24px;
    text-align: center;
    color: #566573;
    font-size: 13px;
}

/* ユーティリティ */
.toolbar {
    margin-bottom: 16px;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-list li {
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
}

.text-muted {
    color: #7f8c8d;
}

.text-right {
    text-align: right;
}

.form-note {
    margin: 0;
    font-size: 13px;
    color: #566573;
    word-break: break-all;
}

/* 経理部 — 金額確認優先 */
.settlement-tabs {
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
}

.settlement-table .col-amount,
.col-amount {
    font-weight: bold;
    font-size: 16px;
    text-align: right;
    color: #c0392b;
}

.settlement-amount {
    font-size: 28px;
    font-weight: bold;
    color: #c0392b;
}

.settlement-success {
    font-size: 20px;
    font-weight: bold;
    color: #27ae60;
}

.settlement-summary {
    border-left: 4px solid #1a5276;
}

.settlement-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settlement-cancel-form {
    border-top: 1px solid #ecf0f1;
    padding-top: 16px;
}

.required {
    color: #c0392b;
}

hr {
    border: none;
    border-top: 1px solid #ecf0f1;
    margin: 24px 0;
}

/* プラットフォーム管理 */
.platform-subnav {
    background: #1a252f;
    padding: 8px 20px;
}

.platform-subnav .nav-menu {
    flex-wrap: wrap;
}

.stats-grid {
    grid-template-columns: 140px 1fr;
}

.stats-grid dd {
    font-size: 18px;
    font-weight: bold;
}

.platform-stats {
    border-left: 4px solid #8e44ad;
}

.footer {
    text-align: center;
    padding: 16px;
    color: #7f8c8d;
    font-size: 12px;
}

h1 {
    font-size: 20px;
    margin: 0 0 16px;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 8px;
}

h2 {
    font-size: 16px;
    margin: 0 0 12px;
}

/* 購買部向け（Phase 3 で拡張） */
@media (min-width: 768px) {
    body.role-purchase .btn-primary {
        min-height: 48px;
        font-size: 16px;
    }
}
