/* RaiseTech TALENT - 共通スタイル（#3DC4E3 ベース） */
:root {
    --color-bg: #f0f9fc;
    --color-surface: #fff;
    --color-border: #b8e3ed;
    --color-text: #333;
    --color-primary: #3DC4E3;
    --color-primary-hover: #2ab0ce;
    --color-header: #1e8fa8;
    --color-header-text: #fff;
    --color-danger: #dc2626;
    --color-danger-hover: #b91c1c;
    --color-success: #16a34a;
    --color-muted: #6b7280;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
}

.header {
    background: var(--color-header);
    border-bottom: none;
    padding: 0.5rem 1rem;
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    color: var(--color-header-text);
    text-decoration: none;
}

.logo:hover {
    color: var(--color-header-text);
    opacity: 0.9;
}

.logo-icon {
    display: block;
    flex-shrink: 0;
}

.logo-text {
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 0.25rem;
}

.nav > a,
.nav-dropdown {
    margin-left: 0.75rem;
}

.nav a {
    color: var(--color-header-text);
    text-decoration: none;
}

.nav a:hover {
    color: var(--color-header-text);
    opacity: 0.9;
}

.nav-dropdown {
    position: relative;
}

/* ホバー領域を広くし、メニューとの隙間をなくしてナビが消えにくくする */
.nav-dropdown-trigger {
    display: inline-block;
    color: var(--color-header-text);
    cursor: pointer;
    font-size: 14px;
    padding: 0.5rem 0.6rem 0.65rem;
}

.nav-dropdown-trigger:hover {
    opacity: 0.9;
}

.nav-dropdown-arrow {
    font-size: 0.6em;
    vertical-align: 0.15em;
    opacity: 0.85;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: -2px;
    min-width: 140px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    padding: 0.35rem 0;
    display: none;
    z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-text);
    font-size: 0.95rem;
}

.nav-dropdown-menu a:hover {
    background: var(--color-bg);
    color: var(--color-text);
    opacity: 1;
}

.nav-user {
    margin-left: 1rem;
    color: var(--color-header-text);
    font-size: 0.9rem;
    opacity: 0.95;
}

.nav-logout {
    margin-left: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-header-text);
}

.nav-logout:hover {
    opacity: 0.9;
}

.login-box {
    max-width: 400px;
    margin: 2rem auto;
    background: var(--color-surface);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.login-box h1 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.main {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.flash-success {
    background: #dcfce7;
    color: #166534;
}

.flash-error {
    background: #fee2e2;
    color: #991b1b;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.page-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.page-header-actions {
    display: flex;
    gap: 0.5rem;
}

/* フィルタタブ（セグメント風：枠を減らし選択だけ強調） */
.filter-tabs {
    display: inline-flex;
    gap: 0;
    margin-bottom: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.filter-tabs .tab {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--color-text);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
}

.filter-tabs .tab:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.filter-tabs .tab.is-active {
    background: var(--color-primary);
    color: #fff;
}

.filter-tabs-sub {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    margin-left: 0.5rem;
}

.filter-tabs-sub .tab {
    font-size: 0.85rem;
    padding: 0.35rem 0.7rem;
}

/* 求人検索フォーム: 上余白・入力とselectの見た目を統一 */
.job-search-form.form {
    max-width: none;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0 1rem;
    padding-top: 2rem;
}

.job-search-form {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

/* 共通 .form-group の margin-bottom を打ち消し（flex-end でボタンが入力行と揃うようにする） */
.job-search-form .form-group {
    margin-bottom: 0;
}

.job-search-form .job-search-control {
    box-sizing: border-box;
    min-height: 2.25rem;
    padding: 0.5rem 0.6rem;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.job-search-form .job-search-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(61, 196, 227, 0.25);
}

.job-search-form input[type="number"].job-search-control {
    width: 70px;
}

.job-search-form select.job-search-control {
    width: 140px;
}

.job-search-form input[name="city"].job-search-control {
    width: 120px;
}

.job-search-form input[name="keyword"].job-search-control {
    width: 160px;
}

.job-search-form .btn-primary {
    min-height: 2.25rem;
    box-sizing: border-box;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.table th,
.table td {
    padding: 0.65rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.table th {
    background: var(--color-bg);
    font-weight: 600;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: #fafafa;
}

.table .row-inactive {
    opacity: 0.75;
}

.table .empty {
    text-align: center;
    color: var(--color-muted);
    padding: 1.5rem;
}

.table .actions {
    white-space: nowrap;
}

.table .actions .btn,
.table .actions .form-inline {
    display: inline-block;
    margin-right: 0.35rem;
    margin-bottom: 0.25rem;
}

.table .actions .form-inline {
    margin-right: 0;
}

.btn {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    line-height: 1.4;
}

.btn:hover {
    background: var(--color-bg);
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: #fff;
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
}

.btn-danger:hover {
    background: var(--color-danger-hover);
    border-color: var(--color-danger-hover);
    color: #fff;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

.form-inline {
    display: inline;
}

.form {
    max-width: 480px;
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.form-group .required {
    color: var(--color-danger);
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(61, 196, 227, 0.25);
}

.form-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.5rem;
}

.errors {
    list-style: none;
    padding: 0.75rem 1rem;
    margin: 0 0 1rem 0;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 4px;
}

.errors li + li {
    margin-top: 0.25rem;
}

.muted {
    color: var(--color-muted);
}

.template-preview-box {
    padding: 0.75rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 4em;
    color: var(--color-text);
}

.footer {
    margin-top: 2rem;
    padding: 1rem;
    text-align: center;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    font-size: 1.1rem;
    margin: 0 0 0.75rem 0;
}

.contact-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0;
    background: var(--color-surface);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.contact-check {
    display: block;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.12s;
}

.contact-check:last-child {
    border-bottom: none;
}

.contact-check:hover {
    background: var(--color-bg);
}

.contact-check input {
    margin-right: 0.5rem;
}

/* 一斉送信：送信先を企業ごとにグループ化 */
.contact-list-by-company {
    max-height: 380px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.contact-company-group {
    border-bottom: 1px solid var(--color-border);
}

.contact-company-group:last-child {
    border-bottom: none;
}

.contact-company-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg);
    font-weight: 600;
    font-size: 0.95rem;
}

.contact-company-header label {
    margin: 0;
    cursor: pointer;
    font-weight: 600;
}

.contact-company-contacts {
    padding: 0.25rem 0;
}

.contact-company-contacts .contact-check {
    padding-left: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.select-all-row {
    margin-bottom: 0.75rem;
    padding: 0.35rem 0;
}

.select-all-row label {
    cursor: pointer;
    font-weight: 500;
}

.radio-group label {
    margin-right: 1rem;
}

.hidden {
    display: none !important;
}

.text-preview {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-static {
    padding: 0.5rem 0;
    color: var(--color-text);
}

.result-summary {
    margin-bottom: 1.5rem;
}

.result-errors {
    color: var(--color-danger);
}

.error-detail {
    font-size: 0.8rem;
    max-width: 400px;
    white-space: pre-wrap;
    word-break: break-all;
    margin-top: 0.25rem;
    padding: 0.5rem;
    background: var(--color-bg);
    border-radius: 4px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
    padding: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.filter-form .form-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.filter-form .form-row label {
    font-size: 0.85rem;
    white-space: nowrap;
    color: var(--color-muted);
}

.filter-form .btn {
    flex-shrink: 0;
}

.filter-form .btn-primary,
.filter-form .btn.search-submit {
    padding: 0.5rem 1rem;
}

/* ソートバー（並び順を1つ選ぶ） */
.sort-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sort-bar label {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin: 0;
}

.sort-bar .form-control,
.sort-bar select {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    min-width: 180px;
}

.form-control-sm {
    padding: 0.3rem 0.5rem;
    font-size: 0.9rem;
}

.pagination {
    margin: 1rem 0 0.25rem 0;
}

.pagination .page-current {
    margin: 0 0.25rem;
    font-weight: 600;
}

.pagination .page-link {
    margin: 0 0.25rem;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid var(--color-border);
    padding: 0.5rem 0.75rem;
}

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

.document-list li {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--color-border);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.checkbox-label {
    cursor: pointer;
    margin: 0;
}

.job-seeker-select-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}

.job-seeker-select-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.job-seeker-select-list li .btn {
    margin-right: 0.75rem;
}

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

.settings-menu li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.settings-menu li a {
    font-weight: 600;
}

/* 推薦文：送信先（企業×求人）をカードで整理 */
.destination-company {
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.destination-company:last-child {
    margin-bottom: 0;
}

.destination-company-header {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.destination-company .form-group {
    margin-bottom: 0.75rem;
}

.destination-company .form-group:last-child {
    margin-bottom: 0;
}

.destination-company .form-group label {
    font-size: 0.9rem;
    color: var(--color-muted);
}

.destination-jobs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.destination-jobs .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
    background: var(--color-bg);
    border-radius: 6px;
    border: 1px solid transparent;
    transition: border-color 0.15s, background 0.15s;
}

.destination-jobs .checkbox-label:hover {
    border-color: var(--color-border);
}

.destination-jobs .checkbox-label input {
    margin: 0;
}

.destination-select-all-jobs {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

/* 送信先エリアの検索（一斉送信で絞り込み） */
.send-dest-filter {
    margin-bottom: 0.75rem;
}

.send-dest-filter .form-control {
    max-width: 280px;
    padding: 0.45rem 0.65rem;
    border-radius: 6px;
}

/* メッセージ・バッジ（第2弾） */
.message {
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 6px;
    border: 1px solid var(--color-border);
}
.message-info {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e40af;
}
.message-warning {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}
.badge {
    display: inline-block;
    padding: 0.2em 0.5em;
    font-size: 0.85rem;
    border-radius: 4px;
}
.badge-muted {
    background: var(--color-muted);
    color: #fff;
}
.badge-danger {
    background: #dc2626;
    color: #fff;
}
.badge-warning {
    background: #d97706;
    color: #fff;
}
.badge-info {
    background: #0284c7;
    color: #fff;
}
.table tbody tr.overdue { background: #fef2f2; }
.table tbody tr.due-today,
.table tbody tr.due-1day { background: #fffbeb; }
.table tbody tr.due-3days { background: #eff6ff; }
