/**
 * GT-NET 被害発生状況 - フロントエンドスタイル
 */

.gtnet-damage-status-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding-bottom: 5rem !important;
    margin-bottom: 3rem !important;
}

/* フィルター */
.gtnet-damage-filter {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.gtnet-filter-form {
    margin: 0;
}

.gtnet-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.gtnet-filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gtnet-damage-select,
.gtnet-damage-search-input {
    padding: 0 1rem !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.5rem !important;
    font-size: 0.875rem !important;
    line-height: 38px !important;
    height: 38px !important;
    background-color: #fff !important;
    min-width: 150px;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.gtnet-damage-select {
    padding-right: 2.5rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
}

.gtnet-damage-search-input {
    width: 100%;
}

.gtnet-damage-select:focus,
.gtnet-damage-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.gtnet-damage-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gtnet-filter-search {
    flex: 1;
    min-width: 200px;
}

.gtnet-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    height: 38px;
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.gtnet-filter-btn:hover {
    background: #334155;
}

/* 統計 */
.gtnet-damage-stats {
    margin-bottom: 1rem;
    color: #64748b;
    font-size: 0.875rem;
}

.gtnet-damage-stats strong {
    color: #1e293b;
    font-weight: 700;
}

/* テーブル */
.gtnet-damage-table-wrap {
    overflow-x: auto;
    /* 枠の角丸はここで管理し、中身のテーブルを内側にぴったり収める */
    border-radius: 0.75rem;
    background: #fff;
    /* 実線の枠はボックスシャドウで描画して隙間をなくす */
    border: none;
    box-shadow: 0 0 0 1px #e2e8f0;
    overflow: hidden;
}

.gtnet-damage-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.gtnet-damage-table thead {
    background: #000000 !important;
}

.gtnet-damage-table thead th {
    padding: 1rem !important;
    text-align: center !important;
    font-weight: 700 !important;
    color: #fff !important;
    white-space: nowrap;
    border: none !important;
    background: transparent !important;
    height: 3rem;
}

.gtnet-damage-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.15s;
}

.gtnet-damage-table tbody tr.gtnet-damage-row {
    cursor: pointer;
}

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

.gtnet-damage-table tbody tr:hover {
    background: #f8fafc;
}

.gtnet-damage-table tbody td {
    padding: 1rem;
    color: #334155;
    vertical-align: middle;
    text-align: center;
}

.gtnet-damage-table tbody td.col-fraud {
    text-align: left;
}

.gtnet-damage-table tbody td.col-machine {
    text-align: left;
}

.gtnet-damage-table .col-no {
    width: 56px;
    min-width: 56px;
    text-align: center;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.gtnet-damage-table .col-date {
    width: 120px;
    min-width: 120px;
    font-weight: 600;
    color: #1e293b;
}

.gtnet-damage-table .col-region {
    width: 80px;
}

.gtnet-damage-table .col-pref {
    width: 80px;
}

.gtnet-damage-table .col-machine {
    max-width: 280px;
}

.gtnet-damage-table .col-fraud {
    font-weight: 500;
}

.gtnet-damage-table .col-fraud a {
    color: #3b82f6 !important;
    text-decoration: none;
    transition: color 0.15s;
}

.gtnet-damage-table .col-fraud a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline;
}

.gtnet-damage-table .no-data {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

/* ページネーション */
.gtnet-damage-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.gtnet-damage-pagination a,
.gtnet-damage-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-decoration: none;
    color: #334155;
    background: #fff;
    transition: all 0.15s;
}

.gtnet-damage-pagination a:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.gtnet-damage-pagination span.current {
    background: #1e293b;
    color: #fff;
    border-color: #1e293b;
    font-weight: 700;
}

.gtnet-damage-pagination .prev,
.gtnet-damage-pagination .next {
    padding: 0 1rem;
}

/* ログイン必要 */
.gtnet-damage-login-required {
    text-align: center;
    padding: 4rem 2rem 4rem 2rem !important;
    background: #f8fafc;
    border-radius: 1rem;
    margin: 3rem 0 5rem 0 !important;
}

.gtnet-damage-login-required .gtnet-login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    background: #e2e8f0;
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.gtnet-damage-login-required .gtnet-login-icon svg {
    width: 2.5rem;
    height: 2.5rem;
    color: #64748b;
}

.gtnet-damage-login-required h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.gtnet-damage-login-required p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.gtnet-damage-login-required .gtnet-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: #1e293b;
    color: #fff;
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: background 0.2s;
}

.gtnet-damage-login-required .gtnet-login-btn:hover {
    background: #334155;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .gtnet-filter-row {
        flex-direction: column;
    }
    
    .gtnet-filter-item {
        width: 100%;
    }
    
    .gtnet-filter-item select,
    .gtnet-filter-item input[type="text"] {
        width: 100%;
    }
    
    .gtnet-damage-table {
        font-size: 0.8125rem;
    }
    
    .gtnet-damage-table thead th,
    .gtnet-damage-table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .gtnet-damage-table .col-machine {
        max-width: none;
    }
}
