/* =========================================================
   SMS Webhook — Professional Admin Panel
   Golden Blue Theme
   ========================================================= */

.admin-body {
    font-family: 'Segoe UI', system-ui, -apple-system, 'Inter', sans-serif;
    background: var(--gb-body-bg);
    color: var(--gb-text);
    overflow-x: hidden;
}

/* ===================== Layout ===================== */
.wrapper { display: flex; min-height: 100vh; }

/* ===================== Sidebar ===================== */
.sidebar {
    width: var(--gb-sidebar-w);
    background: linear-gradient(180deg, var(--gb-dark) 0%, var(--gb-darker) 100%);
    color: #cdd6f0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    transition: width .25s ease, transform .25s ease;
    z-index: 1040;
    box-shadow: 4px 0 24px rgba(15, 28, 63, .15);
}
.sidebar.collapsed { width: 72px; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-list li a span,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .sidebar-user-logout,
.sidebar.collapsed .nav-badge { display: none; }
.sidebar.collapsed .nav-list li a { text-align: center; padding: .75rem; }
.sidebar.collapsed .sidebar-user { justify-content: center; }
.sidebar.collapsed .sidebar-user-info { display: none; }

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}
.brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    white-space: nowrap;
}
.brand i {
    color: var(--gb-gold);
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 6px rgba(245,181,10,.4));
}
.btn-toggle {
    background: transparent;
    border: none;
    color: #8a96c0;
    font-size: 1.1rem;
    cursor: pointer;
    padding: .25rem .5rem;
    border-radius: 6px;
    transition: all .15s;
}
.btn-toggle:hover { color: var(--gb-gold); background: rgba(255,255,255,.06); }

/* Sidebar nav sections */
.sidebar-nav { flex: 1; overflow-y: auto; padding: .5rem; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.nav-section { padding: 1rem .75rem .35rem; }
.nav-section-title {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #5a6a9a;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.nav-list li a {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .7rem 1rem;
    color: #b8c2e8;
    border-radius: 10px;
    margin-bottom: .15rem;
    font-weight: 500;
    font-size: .92rem;
    transition: all .18s ease;
    position: relative;
}
.nav-list li a i { width: 20px; text-align: center; font-size: 1rem; }
.nav-list li a:hover {
    background: rgba(255,255,255,.07);
    color: #fff;
    transform: translateX(2px);
}
.nav-list li a.active {
    background: linear-gradient(135deg, var(--gb-gold), var(--gb-gold-600));
    color: #1a1a1a;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(245,181,10,.3);
}
.nav-list li a.active i { color: #1a1a1a; }

.nav-badge {
    margin-left: auto;
    background: var(--gb-danger);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: .1rem .45rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Sidebar user card */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.08);
    background: rgba(0,0,0,.15);
    flex-shrink: 0;
}
.sidebar-user-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gb-gold), var(--gb-gold-600));
    color: #1a1a1a;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    overflow: hidden;
}
.sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
    color: #fff;
    font-weight: 600;
    font-size: .88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    color: #8a96c0;
    font-size: .75rem;
}
.sidebar-user-logout {
    color: #8a96c0;
    padding: .4rem;
    border-radius: 6px;
    transition: all .15s;
}
.sidebar-user-logout:hover { color: var(--gb-danger); background: rgba(220,38,38,.15); }

/* ===================== Main ===================== */
.main {
    margin-left: var(--gb-sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left .25s ease;
}
.main.expanded { margin-left: 72px; }

/* ===================== Topbar ===================== */
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--gb-border);
    padding: .65rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 1px 3px rgba(30,58,138,.04);
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-right { display: flex; align-items: center; gap: .75rem; }

.btn-toggle-mobile {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--gb-blue);
    cursor: pointer;
    padding: .25rem;
}

.breadcrumb-bar { display: flex; flex-direction: column; }
.topbar-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gb-dark);
    line-height: 1.2;
}
.breadcrumb-nav { margin: 0; }
.breadcrumb {
    margin: 0;
    padding: 0;
    font-size: .78rem;
    background: transparent;
}
.breadcrumb-item a { color: var(--gb-muted); }
.breadcrumb-item a:hover { color: var(--gb-blue); }
.breadcrumb-item.active { color: var(--gb-blue); font-weight: 600; }
.breadcrumb-item + .breadcrumb-item::before { content: '/'; color: var(--gb-border); }

/* User dropdown */
.topbar-user-dropdown { position: relative; }
.topbar-user {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .4rem .65rem;
    border-radius: 10px;
    cursor: pointer;
    color: var(--gb-text);
    transition: background .15s;
    text-decoration: none;
}
.topbar-user:hover { background: var(--gb-blue-tint); }
.topbar-user-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gb-blue-500), var(--gb-blue));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
}
.topbar-user-text { line-height: 1.2; }
.topbar-user-name { font-weight: 600; font-size: .88rem; color: var(--gb-dark); }
.topbar-user-role { font-size: .75rem; color: var(--gb-muted); }
.topbar-user-caret { font-size: .7rem; color: var(--gb-muted); }

.dropdown-menu {
    border: 1px solid var(--gb-border);
    border-radius: 12px;
    box-shadow: var(--gb-shadow-lg);
    padding: .5rem;
    min-width: 200px;
}
.dropdown-item {
    border-radius: 8px;
    padding: .55rem .85rem;
    font-size: .9rem;
    font-weight: 500;
}

/* ===================== Content ===================== */
.content { padding: 1.75rem; flex: 1; }

/* ===================== Footer ===================== */
.footer {
    padding: 1rem 1.5rem;
    text-align: center;
    color: var(--gb-muted);
    font-size: .82rem;
    border-top: 1px solid var(--gb-border);
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-version {
    background: var(--gb-blue-soft);
    color: var(--gb-blue);
    padding: .15rem .55rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: .72rem;
}

/* ===================== Page Title Bar ===================== */
.page-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.page-title-bar h2 {
    margin: 0;
    color: var(--gb-dark);
    font-weight: 700;
    font-size: 1.5rem;
}
.page-title-bar .text-muted { font-size: .88rem; }

/* ===================== Stat Cards ===================== */
.stat-card {
    background: #fff;
    border: 1px solid var(--gb-border);
    border-radius: var(--gb-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--gb-shadow);
    position: relative;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--gb-shadow-lg); }
.stat-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 5px;
}
.stat-card::after {
    content: '';
    position: absolute;
    right: -20px; top: -20px;
    width: 80px; height: 80px;
    border-radius: 50%;
    opacity: .06;
}
.stat-blue::before    { background: var(--gb-blue); }
.stat-blue::after     { background: var(--gb-blue); }
.stat-gold::before    { background: var(--gb-gold); }
.stat-gold::after     { background: var(--gb-gold); }
.stat-success::before { background: var(--gb-success); }
.stat-success::after  { background: var(--gb-success); }
.stat-danger::before  { background: var(--gb-danger); }
.stat-danger::after   { background: var(--gb-danger); }

.stat-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    z-index: 1;
}
.stat-blue    .stat-icon { background: var(--gb-blue-soft);  color: var(--gb-blue); }
.stat-gold    .stat-icon { background: var(--gb-gold-soft); color: var(--gb-gold-600); }
.stat-success .stat-icon { background: var(--gb-success-soft); color: var(--gb-success); }
.stat-danger  .stat-icon { background: var(--gb-danger-soft);  color: var(--gb-danger); }

.stat-body { z-index: 1; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--gb-dark); line-height: 1; }
.stat-label { color: var(--gb-muted); font-size: .85rem; margin-top: .25rem; }

/* ===================== Cards ===================== */
.card {
    border: 1px solid var(--gb-border);
    border-radius: var(--gb-radius);
    box-shadow: var(--gb-shadow);
}
.card-header {
    background: linear-gradient(135deg, var(--gb-blue-tint), #fff);
    border-bottom: 1px solid var(--gb-border);
    padding: 1rem 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h5 { margin: 0; font-weight: 700; color: var(--gb-dark); }

/* ===================== Tables ===================== */
.table { margin-bottom: 0; }
.table thead th {
    background: var(--gb-blue-tint);
    color: var(--gb-dark);
    font-weight: 600;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 2px solid var(--gb-border);
    padding: .85rem 1rem;
    white-space: nowrap;
}
.table tbody td {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--gb-border);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr { transition: background .12s; }
.table-hover tbody tr:hover { background: var(--gb-blue-tint); }

/* ===================== Badges ===================== */
.badge { font-weight: 600; padding: .35em .65em; border-radius: 6px; font-size: .75rem; }
.bg-blue-soft   { background: var(--gb-blue-soft) !important; }
.text-blue      { color: var(--gb-blue) !important; }
.bg-success-soft{ background: var(--gb-success-soft) !important; }
.bg-danger-soft { background: var(--gb-danger-soft) !important; }
.bg-gold-soft   { background: var(--gb-gold-soft) !important; }
.text-gold      { color: var(--gb-gold-600) !important; }
.bg-warning-soft{ background: #fff5e0 !important; }

/* Status indicators */
.status-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: .4rem;
}
.status-dot.active   { background: var(--gb-success); box-shadow: 0 0 0 3px var(--gb-success-soft); }
.status-dot.inactive { background: var(--gb-muted); box-shadow: 0 0 0 3px #eee; }

/* ===================== Search Box ===================== */
.search-box { max-width: 520px; }
.search-box .input-group-text {
    background: #fff;
    color: var(--gb-muted);
    border-color: var(--gb-border);
    border-right: none;
}
.search-box .form-control {
    border-left: none;
    padding-left: 0;
}
.search-box .form-control:focus { box-shadow: none; border-color: var(--gb-blue-400); }

/* ===================== Forms ===================== */
.form-label { font-weight: 600; color: var(--gb-dark); font-size: .9rem; margin-bottom: .35rem; }
.form-control, .form-select {
    border-color: var(--gb-border);
    padding: .6rem .85rem;
    border-radius: 10px;
    font-size: .92rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--gb-blue-400);
    box-shadow: 0 0 0 .2rem rgba(59,98,212,.12);
}
.input-group-text {
    background: var(--gb-blue-tint);
    color: var(--gb-blue);
    border-color: var(--gb-border);
    border-radius: 10px;
}

/* ===================== Message Body ===================== */
.message-body {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Consolas', 'Courier New', monospace;
    line-height: 1.7;
    color: var(--gb-text);
    background: var(--gb-blue-tint);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    border: 1px dashed var(--gb-blue-400);
    font-size: .92rem;
}

/* ===================== Detail List ===================== */
.detail-list { list-style: none; padding: 0; margin: 0; }
.detail-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 0;
    border-bottom: 1px solid var(--gb-border);
    gap: 1rem;
}
.detail-list li:last-child { border-bottom: none; }
.detail-key { color: var(--gb-muted); font-weight: 500; font-size: .88rem; }
.detail-val { text-align: right; font-size: .9rem; }

/* ===================== Empty State ===================== */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--gb-muted);
}
.empty-state i {
    font-size: 3.5rem;
    color: var(--gb-blue-400);
    margin-bottom: 1rem;
    display: block;
    opacity: .5;
}
.empty-state h5 { color: var(--gb-dark); font-weight: 700; margin-bottom: .35rem; }
.empty-state p { margin: 0; font-size: .9rem; }

/* ===================== Pagination ===================== */
.pagination { gap: .25rem; }
.pagination .page-link {
    color: var(--gb-blue);
    border: 1px solid var(--gb-border);
    border-radius: 8px !important;
    padding: .45rem .75rem;
    font-size: .88rem;
}
.pagination .page-item.active .page-link {
    background: var(--gb-blue);
    border-color: var(--gb-blue);
    color: #fff;
}
.pagination .page-item.disabled .page-link { color: var(--gb-border); }

/* ===================== Alerts ===================== */
.alert-toast {
    border: none;
    border-radius: 12px;
    box-shadow: var(--gb-shadow);
    margin-bottom: 1.25rem;
    animation: slideDown .3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===================== Login ===================== */
.login-body {
    background: linear-gradient(135deg, var(--gb-dark) 0%, var(--gb-blue-600) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}
.login-body::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(245,181,10,.15), transparent 70%);
    border-radius: 50%;
}
.login-body::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(59,98,212,.2), transparent 70%);
    border-radius: 50%;
}
.login-wrapper { width: 100%; max-width: 440px; position: relative; z-index: 1; }
.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.75rem 2.25rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    text-align: center;
}
.login-icon {
    width: 76px; height: 76px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gb-gold), var(--gb-gold-600));
    color: #1a1a1a;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 24px rgba(245,181,10,.4);
}
.login-title { color: var(--gb-dark); font-weight: 800; margin-bottom: .25rem; font-size: 1.4rem; }
.login-subtitle { color: var(--gb-muted); margin-bottom: 2rem; font-size: .92rem; }
.login-card .input-group-text {
    background: var(--gb-blue-tint);
    color: var(--gb-blue);
    border-color: var(--gb-border);
}
.login-card .form-control { border-color: var(--gb-border); }
.login-card .form-control:focus { border-color: var(--gb-blue-400); box-shadow: 0 0 0 .2rem rgba(59,98,212,.15); }
.login-hint {
    margin-top: 1.5rem;
    font-size: .82rem;
    color: var(--gb-muted);
    background: var(--gb-blue-tint);
    border-radius: 10px;
    padding: .65rem;
}

/* ===================== User Avatar (table) ===================== */
.user-avatar-sm {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gb-blue-500), var(--gb-blue));
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}
.user-avatar-lg {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gb-blue-500), var(--gb-blue));
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 1.8rem;
}

/* ===================== Action Buttons ===================== */
.btn-icon {
    width: 34px; height: 34px;
    padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px;
}

/* ===================== Mobile ===================== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--gb-shadow-lg);
    }
    .sidebar.show { transform: translateX(0); }
    .main { margin-left: 0; }
    .btn-toggle-mobile { display: inline-block; }
    .btn-toggle { display: none; }
    .content { padding: 1rem; }
    .topbar { padding: .65rem 1rem; }
    .topbar-user-text { display: none; }
    .breadcrumb-nav { display: none; }
}

/* ===================== OTP Box (Inbox) ===================== */
.otp-box {
    margin: 1rem 1rem 0 1rem;
    padding: 1rem 1rem;
    border-radius: 12px;
    background: var(--gb-gold-soft);
    border: 1px dashed var(--gb-gold);
    font-family: 'Consolas', 'Courier New', monospace;
    line-height: 1.7;
    display: flex;
    align-items: center;
    gap: 1rem;  
    padding: 1rem 1rem;
    border-radius: 12px;
    background: var(--gb-gold-soft);
    border: 1px dashed var(--gb-gold);
    font-family: 'Consolas', 'Courier New', monospace;
    line-height: 1.7;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.otp-box-glow { display: none; }
.otp-box-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}
.otp-box-label {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--gb-gold-600);
    font-size: .82rem;
    font-weight: 700;
    flex-shrink: 0;
}
.otp-box-label i { font-size: .9rem; }
.otp-box-code {
    flex: 1;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gb-dark);
    letter-spacing: 3px;
    cursor: pointer;
    user-select: all;
}
.otp-box-code:hover { color: var(--gb-gold-600); }
.otp-box-copy {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 8px;
    border: 1px solid var(--gb-gold);
    background: #fff;
    color: var(--gb-gold-600);
    font-size: .9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.otp-box-copy:hover {
    background: var(--gb-gold);
    color: #1a1a1a;
}

/* OTP badge in tables */
.otp-badge-list {
    cursor: pointer;
    transition: transform .15s ease;
}
.otp-badge-list:hover { transform: scale(1.05); }

/* ===================== Inbox (Email-style) ===================== */
.inbox {
    display: flex;
    gap: 0;
    border: 1px solid var(--gb-border);
    border-radius: var(--gb-radius);
    overflow: hidden;
    box-shadow: var(--gb-shadow);
    height: calc(100vh - 280px);
    min-height: 500px;
    background: #fff;
}

/* Left list */
.inbox-list {
    width: 380px;
    min-width: 320px;
    max-width: 420px;
    border-right: 1px solid var(--gb-border);
    overflow-y: auto;
    flex-shrink: 0;
}
.inbox-list::-webkit-scrollbar { width: 5px; }
.inbox-list::-webkit-scrollbar-thumb { background: var(--gb-border); border-radius: 4px; }

.inbox-item {
    display: flex;
    gap: .75rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--gb-border);
    cursor: pointer;
    transition: background .15s ease;
    position: relative;
}
.inbox-item:hover { background: var(--gb-blue-tint); }
.inbox-item.active {
    background: var(--gb-blue-tint);
    border-left: 3px solid var(--gb-blue);
    padding-left: calc(1rem - 3px);
}

.inbox-item-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gb-blue-500), var(--gb-blue));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .8rem;
    flex-shrink: 0;
}

.inbox-item-body { flex: 1; min-width: 0; }
.inbox-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .15rem;
}
.inbox-item-sender {
    font-weight: 600;
    color: var(--gb-dark);
    font-size: .88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.inbox-item-time {
    font-size: .72rem;
    color: var(--gb-muted);
    flex-shrink: 0;
    margin-left: .5rem;
}
.inbox-item-preview {
    font-size: .82rem;
    color: var(--gb-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: .3rem;
    line-height: 1.4;
}
.inbox-item-meta {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Right detail pane */
.inbox-detail {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.inbox-detail::-webkit-scrollbar { width: 5px; }
.inbox-detail::-webkit-scrollbar-thumb { background: var(--gb-border); border-radius: 4px; }

.inbox-detail-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--gb-muted);
    padding: 2rem;
}
.inbox-detail-empty i {
    font-size: 3.5rem;
    color: var(--gb-blue-400);
    opacity: .4;
    margin-bottom: 1rem;
}
.inbox-detail-empty h5 { color: var(--gb-dark); font-weight: 700; margin-bottom: .35rem; }
.inbox-detail-empty p { margin: 0; font-size: .9rem; }

.inbox-detail-content { display: flex; flex-direction: column; height: 100%; }

.inbox-detail-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 1.25rem;
    border-bottom: 1px solid var(--gb-border);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 5;
}
.inbox-detail-subject {
    font-weight: 700;
    color: var(--gb-dark);
    font-size: 1.1rem;
}

.inbox-detail-meta { display: none; }

/* Info popover */
.inbox-info-popover {
    padding: 1rem 1.25rem;
    min-width: 320px;
    border-radius: 14px;
    box-shadow: var(--gb-shadow-lg);
    border: 1px solid var(--gb-border);
}
.popover-title {
    font-size: .82rem;
    font-weight: 700;
    color: var(--gb-dark);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--gb-border);
}
.inbox-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .4rem 0;
    font-size: .88rem;
}
.inbox-meta-label {
    color: var(--gb-muted);
    font-weight: 500;
}
.inbox-meta-val { text-align: right; }

.inbox-detail-body {
    padding: 1rem 1rem 0 1rem;
    flex: 1;
    overflow-y: auto;
}

/* Live indicator */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-left: .5rem;
    font-size: .72rem;
    font-weight: 600;
    color: var(--gb-success);
    background: var(--gb-success-soft);
    padding: .15rem .5rem;
    border-radius: 999px;
}
.live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--gb-success);
    animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .4; transform: scale(.8); }
}
.live-indicator.pulse {
    animation: liveFlash .8s ease;
}
@keyframes liveFlash {
    0%   { background: var(--gb-gold); color: #1a1a1a; }
    100% { background: var(--gb-success-soft); color: var(--gb-success); }
}

/* Mobile: show list or detail */
@media (max-width: 991.98px) {
    .inbox {
        height: calc(100vh - 240px);
        min-height: 400px;
        position: relative;
    }
    .inbox-list {
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        position: absolute;
        top: 0; left: 0; bottom: 0;
        z-index: 2;
        transition: transform .25s ease;
    }
    .inbox.show-detail .inbox-list {
        transform: translateX(-100%);
    }
    .inbox-detail {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        z-index: 1;
        background: #fff;
    }
}

