/* 管理画面 共通CSS */

.form-card {
    padding: 18px;
    margin-bottom: 22px;
    border: 1px solid #ddd;
    border-radius: 14px;
    background: #fafafa;
}

.form-card h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 260px));
    gap: 14px;
    align-items: end;
}

.form-item label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
}

.form-item input,
.form-item select {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid #bbb;
    border-radius: 8px;
    background: white;
    font-size: 15px;
}

.form-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.primary-button {
    padding: 10px 18px;
    border: none;
    border-radius: 9px;
    background: #222;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.primary-button:hover {
    background: #000;
}

.secondary-button {
    display: inline-block;
    padding: 7px 11px;
    border: 1px solid #999;
    border-radius: 8px;
    background: white;
    color: #222;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.secondary-button:hover {
    background: #f3f4f6;
}

.danger-button {
    display: inline-block;
    padding: 7px 11px;
    border: 1px solid #b00020;
    border-radius: 8px;
    background: white;
    color: #b00020;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.danger-button:hover {
    background: #fff0f3;
}

.button-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

.message-card {
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    background: #fff8d8;
    border-radius: 8px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 70vh;
    border: 1px solid #ddd;
    background: white;
}

.admin-table,
.status-table,
.history-table {
    border-collapse: collapse;
    min-width: 1200px;
    width: 100%;
}

.admin-table th,
.admin-table td,
.status-table th,
.status-table td,
.history-table th,
.history-table td {
    padding: 8px 10px;
    font-size: 14px;
    white-space: nowrap;
    border: none;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}

.admin-table th,
.status-table th,
.history-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f0f0f0;
    font-weight: bold;
    text-align: left;
}

.admin-table tbody tr:hover,
.status-table tbody tr:hover,
.history-table tbody tr:hover {
    background: #fafafa;
}

.url-cell {
    max-width: 520px;
    white-space: normal !important;
    word-break: break-all;
    font-size: 13px;
}

.url-cell a {
    color: #0066cc;
    text-decoration: underline;
}

.small-url {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    word-break: break-all;
    white-space: normal;
    min-width: 280px;
}

.narrow-form-card {
    max-width: 760px;
}

.base-form-grid {
    grid-template-columns: 1fr 220px;
}

@media (max-width: 700px) {
    .base-form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Status.razor タブ・表・ボタン */

.tab-button {
    padding: 10px 16px;
    border: 1px solid #999;
    background: white;
    border-radius: 8px;
    cursor: pointer;
}

.tab-button-active {
    padding: 10px 16px;
    border: 1px solid #222;
    background: #222;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.status-table {
    border-collapse: collapse;
    min-width: 1100px;
    width: 100%;
}

.status-table th,
.status-table td {
    padding: 8px 10px;
    font-size: 14px;
    white-space: nowrap;
    border: none;
    border-bottom: 1px solid #ddd;
}

.status-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f0f0f0;
    font-weight: bold;
    text-align: left;
}

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

.status-table .danger-button {
    padding: 6px 10px;
    border: 1px solid #b00020;
    border-radius: 6px;
    background: white;
    color: #b00020;
    cursor: pointer;
    font-size: 13px;
}

.status-table .danger-button:hover {
    background: #fff0f3;
}

.tab-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}