/* =============================================================================
   inbox-outbox.css  v3.0.0
   ============================================================================= */
.gp-io-app { max-width:900px; margin:0 auto; background:#fff; border-radius:12px;
    box-shadow:0 2px 8px rgba(0,0,0,.06); overflow:hidden;
    font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* ---- Header ---- */
.gp-io-header { display:flex; justify-content:space-between; align-items:center;
    padding:16px 20px; border-bottom:1px solid #e2e8f0;
    background:linear-gradient(135deg,#4f46e5 0%, #7c3aed 100%); color:#fff; }
.gp-io-title { margin:0; font-size:18px; font-weight:600; }
.gp-io-unread-badge { background:rgba(255,255,255,.2); padding:6px 12px;
    border-radius:20px; font-size:13px; font-weight:500; }
.gp-io-unread-badge span { font-weight:700; font-size:15px; }

/* ---- Tabs ---- */
.gp-io-tabs { display:flex; padding:0 20px; background:#f8fafc; border-bottom:1px solid #e2e8f0; }
.gp-io-tab { background:transparent; border:0; padding:14px 18px; font-size:14px; font-weight:500;
    color:#64748b; cursor:pointer; border-bottom:3px solid transparent; margin-bottom:-1px;
    display:inline-flex; align-items:center; gap:8px; }
.gp-io-tab:hover { color:#0f172a; }
.gp-io-tab.active { color:#4f46e5; border-bottom-color:#4f46e5; background:#fff; }
.gp-io-tab-badge { background:#e2e8f0; color:#475569; padding:2px 8px; border-radius:10px;
    font-size:11px; font-weight:600; min-width:20px; text-align:center; }
.gp-io-tab.active .gp-io-tab-badge { background:#ede9fe; color:#5b21b6; }

/* ---- Controls ---- */
.gp-io-controls { display:flex; gap:8px; padding:12px 20px; background:#fafafa;
    border-bottom:1px solid #e2e8f0; flex-wrap:wrap; }
#gp-io-search { flex:1; min-width:220px; padding:8px 12px; border:1px solid #cbd5e1;
    border-radius:6px; font-size:13px; background:#fff; }
#gp-io-search:focus { outline:0; border-color:#6366f1; box-shadow:0 0 0 3px rgba(99,102,241,.15); }
#gp-io-filter { padding:8px 12px; border:1px solid #cbd5e1; border-radius:6px;
    font-size:13px; background:#fff; min-width:140px; }
.gp-io-btn-ghost { padding:8px 12px; border:1px solid #cbd5e1; border-radius:6px;
    background:#fff; color:#475569; font-size:13px; cursor:pointer; }
.gp-io-btn-ghost:hover:not(:disabled) { background:#f1f5f9; color:#0f172a; }
.gp-io-btn-ghost:disabled { opacity:.4; cursor:not-allowed; }

/* ---- Content area ---- */
.gp-io-content { padding:16px 20px; min-height:300px; }

/* ---- Row ---- */
.gp-io-row { display:flex; gap:12px; padding:14px; background:#fff;
    border:1px solid #f1f5f9; border-radius:10px; margin-bottom:8px;
    cursor:pointer; transition:all .15s; }
.gp-io-row:hover { border-color:#cbd5e1; box-shadow:0 2px 6px rgba(0,0,0,.04); }
.gp-io-row.gp-io-unread { background:#f8fafc; border-left:3px solid #4f46e5; }
.gp-io-row.gp-io-actionable { border-left:3px solid #7c3aed; background:#faf7ff; }

.gp-io-avatar { width:40px; height:40px; border-radius:50%; background:#ede9fe;
    color:#5b21b6; display:flex; align-items:center; justify-content:center;
    font-size:13px; font-weight:600; flex-shrink:0; }

.gp-io-row-body { flex:1; min-width:0; }
.gp-io-row-top { display:flex; justify-content:space-between; align-items:center;
    gap:12px; margin-bottom:4px; }
.gp-io-sender { font-size:14px; font-weight:500; color:#0f172a; }
.gp-io-row.gp-io-unread .gp-io-sender { font-weight:700; }
.gp-io-time { font-size:12px; color:#94a3b8; flex-shrink:0; }

.gp-io-badges { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:6px; }
.gp-io-badge { font-size:11px; padding:2px 8px; border-radius:10px;
    background:#f1f5f9; color:#475569; font-weight:500; }
.gp-io-badge-invite { background:#ede9fe; color:#5b21b6; }
.gp-io-badge-action { background:#fef3c7; color:#92400e; }
.gp-io-badge-info   { background:#e0f2fe; color:#075985; }

.gp-io-subject { margin:0 0 8px; font-size:14px; color:#334155; }
.gp-io-row.gp-io-unread .gp-io-subject { color:#0f172a; }

/* ---- Embedded house preview ---- */
.gp-io-house-preview { display:flex; align-items:center; gap:10px; padding:10px;
    background:#fff; border:1px solid #e2e8f0; border-radius:8px; margin-bottom:10px; }
.gp-io-house-icon { width:32px; height:32px; border-radius:6px; background:#ede9fe;
    color:#5b21b6; display:flex; align-items:center; justify-content:center;
    font-size:14px; font-weight:600; flex-shrink:0; }
.gp-io-house-info { flex:1; min-width:0; }
.gp-io-house-name { margin:0; font-size:13px; font-weight:500; color:#0f172a; }
.gp-io-house-sub  { margin:0; font-size:11px; color:#64748b; }

/* ---- Inline actions ---- */
.gp-io-inline-actions { display:flex; gap:8px; }
.gp-io-btn { background:#4f46e5; color:#fff; border:0; border-radius:6px;
    padding:7px 14px; font-size:13px; font-weight:500; cursor:pointer;
    display:inline-flex; align-items:center; gap:6px; }
.gp-io-btn:hover { background:#4338ca; }
.gp-io-btn-accept { background:#059669; }
.gp-io-btn-accept:hover { background:#047857; }
.gp-io-btn-secondary { background:#f1f5f9; color:#0f172a; border:0; border-radius:6px;
    padding:7px 14px; font-size:13px; font-weight:500; cursor:pointer; }
.gp-io-btn-secondary:hover { background:#e2e8f0; }
.gp-io-btn-danger { background:#ef4444; color:#fff; border:0; border-radius:6px;
    padding:7px 14px; font-size:13px; font-weight:500; cursor:pointer; }
.gp-io-btn-danger:hover { background:#dc2626; }

.gp-io-responded { display:inline-block; font-size:12px; color:#059669;
    background:#d1fae5; padding:3px 10px; border-radius:10px; }

/* ---- Pagination ---- */
.gp-io-pagination { display:flex; justify-content:center; align-items:center;
    gap:14px; padding-top:16px; margin-top:16px; border-top:1px solid #e2e8f0; }
#gp-io-page-info { font-size:13px; color:#64748b; }

/* ---- Empty / state messages ---- */
.gp-io-state { text-align:center; padding:50px 20px; color:#64748b; font-size:14px; }
.gp-io-state i { font-size:1.8em; margin-bottom:10px; display:block; }
.gp-io-state p { margin:0 0 12px; }
.gp-io-state-error { color:#dc2626; }
.gp-io-empty { text-align:center; padding:50px 20px; color:#94a3b8;
    background:#f8fafc; border-radius:10px; }
.gp-io-empty i { font-size:2.5em; margin-bottom:12px; opacity:.4; display:block; }
.gp-io-empty p { margin:0; font-size:14px; }

/* ---- Modal ---- */
.gp-io-modal-overlay { position:fixed; inset:0; z-index:9999;
    background:rgba(15,23,42,.55); backdrop-filter:blur(2px);
    display:flex; align-items:center; justify-content:center; padding:20px; }
.gp-io-modal { background:#fff; border-radius:12px; width:100%; max-width:680px;
    max-height:90vh; display:flex; flex-direction:column; overflow:hidden;
    box-shadow:0 20px 48px rgba(0,0,0,.18); }
.gp-io-modal-header { display:flex; justify-content:space-between; align-items:center;
    padding:16px 20px; border-bottom:1px solid #e2e8f0;
    background:linear-gradient(135deg,#4f46e5 0%, #7c3aed 100%); color:#fff; }
.gp-io-modal-header h3 { margin:0; font-size:16px; font-weight:600; }
.gp-io-modal-close { background:rgba(255,255,255,.2); color:#fff; border:0;
    width:32px; height:32px; border-radius:8px; cursor:pointer; font-size:20px; }
.gp-io-modal-close:hover { background:rgba(255,255,255,.3); }
.gp-io-modal-body { padding:20px; overflow-y:auto; flex:1; }
.gp-io-meta { display:flex; flex-wrap:wrap; gap:14px; padding:12px 14px;
    background:#f8fafc; border-radius:8px; margin-bottom:16px; font-size:13px; }
.gp-io-meta strong { color:#475569; margin-right:6px; }
.gp-io-body { font-size:14px; line-height:1.6; color:#334155; }
.gp-io-body p { margin:0 0 10px; }
.gp-io-actions { display:flex; gap:8px; margin-top:18px; padding-top:16px;
    border-top:1px solid #e2e8f0; }
.gp-io-modal-footer { padding:14px 20px; border-top:1px solid #e2e8f0;
    background:#f8fafc; display:flex; justify-content:flex-end; gap:8px; }

/* ---- Mini badge (for header) ---- */
.gp-io-mini-badge { display:inline-block; min-width:18px; padding:2px 6px;
    background:#ef4444; color:#fff; border-radius:10px; font-size:11px;
    font-weight:600; text-align:center; }

/* ---- Toast ---- */
.gp-io-toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px);
    background:#0f172a; color:#fff; padding:10px 18px; border-radius:8px;
    font-size:13px; box-shadow:0 8px 24px rgba(0,0,0,.2); opacity:0;
    transition:opacity .25s, transform .25s; z-index:10000; }
.gp-io-toast-show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .gp-io-controls { flex-direction:column; }
    #gp-io-search, #gp-io-filter { width:100%; }
    .gp-io-modal { max-height:100vh; border-radius:0; }
    .gp-io-modal-overlay { padding:0; }
    .gp-io-row-top { flex-direction:column; align-items:flex-start; gap:2px; }
}
