/* ============================================
   求人代行システム — 「和のビジネス文具」テーマ
   墨色 × 生成り × 朱色アクセント
   ============================================ */

:root {
    --ink: #1f2430;            /* 墨 */
    --ink-soft: #4b5265;
    --ink-faint: #8b90a0;
    --paper: #f7f5f0;          /* 生成り */
    --paper-raised: #fffefb;
    --line: #e3dfd5;
    --line-strong: #c9c3b4;
    --accent: #d4442e;         /* 朱 */
    --accent-deep: #b03520;
    --accent-wash: #fbeae6;
    --ok: #2e7d5b;
    --ok-wash: #e6f2ec;
    --warn: #a06a00;
    --warn-wash: #faf1dc;
    --radius: 10px;
    --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
    --font-display: "Zen Old Mincho", "Hiragino Mincho ProN", serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        radial-gradient(circle at 100% 0%, rgba(212, 68, 46, 0.045), transparent 42%),
        repeating-linear-gradient(0deg, transparent 0 31px, rgba(31, 36, 48, 0.025) 31px 32px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.65;
}

/* ---------- ヘッダー ---------- */
.site-header {
    background: var(--ink);
    color: var(--paper);
    border-bottom: 3px solid var(--accent);
}
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 32px;
    height: 60px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}
.brand-mark {
    font-family: var(--font-display);
    font-size: 20px;
    background: var(--accent);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
}
.brand-text {
    font-family: var(--font-display);
    font-size: 17px;
    letter-spacing: 0.06em;
}
.global-nav {
    display: flex;
    gap: 4px;
    flex: 1;
}
.global-nav a {
    color: rgba(247, 245, 240, 0.75);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.global-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.global-nav a.is-active {
    color: #fff;
    background: rgba(212, 68, 46, 0.35);
}
.logout-form { margin: 0; }

/* ---------- メイン ---------- */
.site-main {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}
.site-footer {
    text-align: center;
    color: var(--ink-faint);
    padding: 16px;
    border-top: 1px solid var(--line);
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.page-title {
    font-family: var(--font-display);
    font-size: 26px;
    margin: 0;
    letter-spacing: 0.04em;
    position: relative;
    padding-left: 16px;
}
.page-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 5px;
    border-radius: 3px;
    background: linear-gradient(var(--accent), var(--accent-deep));
}
.page-sub { color: var(--ink-faint); font-size: 13px; }

/* ---------- カード ---------- */
.card {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(31, 36, 48, 0.04), 0 8px 24px -18px rgba(31, 36, 48, 0.25);
    padding: 24px;
    margin-bottom: 24px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 72px; height: 72px;
    background: radial-gradient(circle at top right, var(--accent-wash), transparent 70%);
}
.stat-label { font-size: 13px; color: var(--ink-soft); }
.stat-value {
    font-family: var(--font-display);
    font-size: 36px;
    line-height: 1.2;
}
.stat-value small { font-size: 14px; font-family: var(--font-body); color: var(--ink-faint); margin-left: 4px; }

/* ---------- テーブル ---------- */
.table-wrap { overflow-x: auto; }
table.list {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
table.list th {
    text-align: left;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    background: #f1eee6;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line-strong);
    white-space: nowrap;
}
table.list td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
table.list tr:last-child td { border-bottom: none; }
table.list tbody tr { transition: background 0.12s; }
table.list tbody tr:hover { background: #fbf9f3; }
td.num, th.num { text-align: right; }

a.row-link {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
a.row-link:hover { color: var(--accent-deep); border-bottom-color: var(--accent); }

/* ---------- バッジ ---------- */
.badge {
    display: inline-block;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge-準備中 { background: var(--warn-wash); color: var(--warn); border-color: #e8d4a4; }
.badge-掲載中 { background: var(--ok-wash); color: var(--ok); border-color: #bcdccd; }
.badge-停止中 { background: #eee; color: var(--ink-soft); border-color: #ddd; }
.badge-終了 { background: #eee; color: var(--ink-faint); border-color: #ddd; }
.badge-muted { background: #eee; color: var(--ink-faint); }

/* ---------- ボタン ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    padding: 9px 20px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.08s, box-shadow 0.15s, background 0.15s;
    line-height: 1.4;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px -2px rgba(212, 68, 46, 0.5);
}
.btn-primary:hover { background: var(--accent-deep); }
.btn-secondary {
    background: var(--paper-raised);
    color: var(--ink);
    border-color: var(--line-strong);
}
.btn-secondary:hover { border-color: var(--ink-faint); }
.btn-ghost {
    background: transparent;
    color: inherit;
    border-color: rgba(255, 255, 255, 0.35);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-danger-ghost {
    background: transparent;
    color: var(--accent-deep);
    border-color: var(--accent);
}
.btn-danger-ghost:hover { background: var(--accent-wash); }
.btn-sm { font-size: 12px; padding: 5px 12px; }

/* ---------- フォーム ---------- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px 24px;
}
.form-grid .span-2 { grid-column: 1 / -1; }
.field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--ink-soft);
}
.field .req {
    color: var(--accent);
    font-size: 11px;
    margin-left: 6px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="date"],
.field select,
.field textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 9px 12px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 68, 46, 0.15);
}
.field .error { color: var(--accent-deep); font-size: 12px; margin-top: 4px; }
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px dashed var(--line-strong);
}

/* ---------- 検索バー ---------- */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 18px;
}
.filter-bar input[type="text"], .filter-bar select {
    font-family: var(--font-body);
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
}
.filter-bar input[type="text"] { min-width: 220px; }

/* ---------- フラッシュ・その他 ---------- */
.flash {
    background: var(--ok-wash);
    color: var(--ok);
    border: 1px solid #bcdccd;
    border-left: 4px solid var(--ok);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    animation: flash-in 0.3s ease-out;
}
@keyframes flash-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}
.empty-state {
    text-align: center;
    color: var(--ink-faint);
    padding: 56px 20px;
}
.empty-state .empty-mark {
    font-family: var(--font-display);
    font-size: 40px;
    color: var(--line-strong);
    display: block;
    margin-bottom: 8px;
}

/* 定義リスト(詳細画面) */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0 32px;
}
.detail-grid .span-2 { grid-column: 1 / -1; }
dl.detail {
    margin: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}
dl.detail dt {
    font-size: 12px;
    color: var(--ink-faint);
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}
dl.detail dd {
    margin: 0;
    font-size: 15px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
dl.detail dd.blank { color: var(--line-strong); }

/* ページネーション(Tailwindなし用の簡易上書き) */
nav[role="navigation"] { margin-top: 20px; font-size: 14px; }
nav[role="navigation"] a, nav[role="navigation"] span[aria-current] > span {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    margin-right: 6px;
    text-decoration: none;
    color: var(--ink);
    background: var(--paper-raised);
}
nav[role="navigation"] span[aria-current] > span {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

/* ---------- ログイン ---------- */
.login-wrap {
    min-height: 70vh;
    display: grid;
    place-items: center;
}
.login-card {
    width: min(400px, 92vw);
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-top: 4px solid var(--accent);
    border-radius: 14px;
    box-shadow: 0 24px 48px -24px rgba(31, 36, 48, 0.35);
    padding: 40px 36px;
    animation: flash-in 0.4s ease-out;
}
.login-brand {
    text-align: center;
    margin-bottom: 28px;
}
.login-brand .brand-mark {
    width: 52px; height: 52px;
    font-size: 30px;
    margin: 0 auto 12px;
    background: var(--accent);
    color: #fff;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
}
.login-brand h1 {
    font-family: var(--font-display);
    font-size: 20px;
    margin: 0;
    letter-spacing: 0.08em;
}
.login-brand p { color: var(--ink-faint); font-size: 12px; margin: 6px 0 0; }
.login-card .field { margin-bottom: 16px; }
.login-card .btn { width: 100%; justify-content: center; }

@media (max-width: 720px) {
    .header-inner { gap: 12px; padding: 0 14px; }
    .brand-text { display: none; }
    .site-main { padding: 20px 14px 48px; }
}
