/* === 共通リセット・ベース === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
}

.center {
    text-align: center;
}

/* === ボタン === */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.85;
}

.btn-primary {
    background: #06c755;
    color: #fff;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

/* === LIFF画面 === */
.container {
    max-width: 480px;
    margin: 40px auto;
    padding: 0 16px;
}

.profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 12px;
}

.status-box {
    padding: 12px;
    border-radius: 6px;
    margin: 16px 0;
    font-weight: bold;
}

.status-friend {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-not-friend {
    background: #fff3e0;
    color: #e65100;
}

.success-message {
    color: #2e7d32;
    font-weight: bold;
}

.error-message {
    color: #c62828;
    font-weight: bold;
}

/* === ダッシュボード === */
.dashboard-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 16px;
}

.dashboard-container h1 {
    margin-bottom: 24px;
    font-size: 24px;
}

/* サマリーカード */
.summary-section {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.summary-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 16px 24px;
    min-width: 140px;
    flex: 1;
}

.summary-card.total-card {
    background: #06c755;
    color: #fff;
}

.summary-label {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.summary-count {
    font-size: 28px;
    font-weight: bold;
}

/* フィルタ */
.filter-section {
    margin-bottom: 16px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* エクスポート */
.export-section {
    margin-bottom: 16px;
}

/* テーブル */
.table-section {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead th {
    background: #f0f0f0;
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    white-space: nowrap;
}

tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

tbody tr:hover {
    background: #fafafa;
}

.mono {
    font-family: "SF Mono", "Consolas", monospace;
    font-size: 12px;
}

.ref-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-friend {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-not-friend {
    background: #fff3e0;
    color: #e65100;
}

.badge-already {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-converted {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-pending {
    background: #fff3e0;
    color: #e65100;
}

/* コンバージョンカード */
.conversion-card {
    background: #1565c0;
    color: #fff;
}

.rate-card {
    background: #2e7d32;
    color: #fff;
}

.empty-message {
    text-align: center;
    padding: 32px;
    color: #999;
}

/* レスポンシブ */
@media (max-width: 600px) {
    .summary-section {
        flex-direction: column;
    }

    .filter-form {
        flex-direction: column;
    }

    table {
        font-size: 12px;
    }

    thead th,
    tbody td {
        padding: 8px;
    }
}
