/* notification-history.css - マスター専用 通知履歴モーダルスタイル */

.notif-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
}

.notif-modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 1040px;
    max-height: 92vh;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: notifModalFadeIn 0.25s ease-out;
}

@keyframes notifModalFadeIn {
    from { opacity: 0; transform: scale(0.97) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.notif-modal-header {
    padding: 18px 24px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notif-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f8fafc;
}

.notif-modal-header .notif-badge-master {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.notif-modal-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #cbd5e1;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.notif-modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    color: #fff;
}

.notif-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    background: #f8fafc;
}

/* コントロールエリア */
.notif-ctrl-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
}

.notif-segmented-control {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
    gap: 2px;
}

.notif-seg-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.notif-seg-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.notif-date-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notif-nav-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.notif-nav-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.notif-input {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.85rem;
    color: #1e293b;
    background: #fff;
    font-family: inherit;
}

.notif-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.notif-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

/* KPIカード */
.notif-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.notif-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.notif-kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}

.notif-kpi-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
}

.notif-kpi-val span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-left: 2px;
}

/* 一覧テーブル */
.notif-table-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.notif-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    text-align: left;
}

.notif-table th {
    background: #f1f5f9;
    color: #475569;
    padding: 10px 12px;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.notif-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}

.notif-table tr:hover {
    background: #f8fafc;
    cursor: pointer;
}

/* バッジ類 */
.notif-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.notif-badge-kanri {
    background: #e0f2fe;
    color: #0369a1;
}

.notif-badge-sales {
    background: #fef3c7;
    color: #b45309;
}

.notif-badge-both {
    background: #ede9fe;
    color: #6d28d9;
}

.notif-badge-success {
    background: #dcfce7;
    color: #15803d;
}

.notif-badge-queued {
    background: #fef9c3;
    color: #854d0e;
}

.notif-badge-error {
    background: #fee2e2;
    color: #b91c1c;
}

.notif-channel-tag {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    margin-right: 3px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.notif-channel-lw {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.notif-channel-line {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

/* 詳細モーダル */
.notif-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(3px);
    z-index: 10050;
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
}

.notif-detail-container {
    background: #ffffff;
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    border-radius: 14px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notif-detail-header {
    padding: 14px 18px;
    background: #1e293b;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-detail-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.notif-detail-body {
    padding: 18px 20px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #334155;
}

.notif-detail-meta {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    font-size: 0.8rem;
}

.notif-detail-meta div strong {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    margin-bottom: 2px;
}

.notif-detail-msg-box {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow-y: auto;
    color: #0f172a;
}

.notif-msg-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.notif-msg-tab {
    padding: 6px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
}

.notif-msg-tab:hover {
    background: #f1f5f9;
}

.notif-msg-tab.active {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #ffffff;
}

.notif-msg-hint {
    font-size: 0.73rem;
    color: #0369a1;
    margin-bottom: 8px;
    background: #f0f9ff;
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 3px solid #0ea5e9;
}

