.notif-inbox-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal, 30000);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(60px, env(safe-area-inset-top)) 12px 12px;
    background: rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.notif-inbox-panel {
    width: min(100%, 480px);
    height: min(640px, calc(100vh - 80px));
    height: min(640px, calc(100dvh - 80px));
    min-height: min(460px, calc(100vh - 80px));
    min-height: min(460px, calc(100dvh - 80px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.notif-inbox-header {
    min-height: 56px;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 10px 6px 16px;
    border-bottom: 1px solid #eee;
}

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

.notif-inbox-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notif-action-btn,
.notif-icon-btn,
.notif-tab,
.notif-del-btn,
.notif-item-main {
    font: inherit;
}

.notif-action-btn,
.notif-icon-btn,
.notif-tab,
.notif-del-btn {
    min-width: 44px;
    min-height: 44px;
}

.notif-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border: 1px solid #90caf9;
    border-radius: 8px;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.notif-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #666;
    font-size: 1.45rem;
    cursor: pointer;
}

.notif-tabs {
    display: flex;
    flex: 0 0 auto;
    gap: 2px;
    min-height: 44px;
    padding: 0 12px;
    overflow-x: auto;
    border-bottom: 1px solid #eee;
    scrollbar-width: thin;
}

.notif-tab {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #777;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.notif-tab.active {
    border-bottom-color: #1976d2;
    color: #1565c0;
}

.notif-action-status {
    min-height: 28px;
    display: flex;
    flex: 0 0 28px;
    align-items: center;
    padding: 3px 16px;
    box-sizing: border-box;
    color: #475467;
    font-size: 0.75rem;
}

.notif-action-status[data-state="success"] { color: #067647; }
.notif-action-status[data-state="warning"] { color: #b54708; }
.notif-action-status[data-state="error"] { color: #b42318; }

.notif-action-btn:disabled,
.notif-del-btn:disabled {
    cursor: wait;
    opacity: 0.65;
}

.notif-inbox-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.notif-loading-state,
.notif-state {
    min-height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 20px;
    box-sizing: border-box;
    color: #667085;
    text-align: center;
}

.notif-loading-spinner {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    border: 3px solid #dbeafe;
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: notif-inbox-spin 0.8s linear infinite;
}

@keyframes notif-inbox-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .notif-loading-spinner { animation: none; }
}

.notif-skeleton-list {
    padding: 0 16px 16px;
}

.notif-skeleton-row {
    height: 72px;
    margin-bottom: 8px;
    border-radius: 10px;
    background: linear-gradient(90deg, #f2f4f7 25%, #f8fafc 50%, #f2f4f7 75%);
    background-size: 200% 100%;
    animation: notif-inbox-skeleton 1.2s ease-in-out infinite;
}

@keyframes notif-inbox-skeleton {
    to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .notif-skeleton-row { animation: none; }
}

.notif-error-state {
    min-height: 100%;
    flex-direction: column;
}

.notif-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    min-height: 76px;
    border-bottom: 1px solid #f0f2f5;
    transition: background 0.1s;
}

.notif-item:hover {
    background: #f8fafc;
}

.notif-item.unread {
    border-left: 3px solid #1976d2;
    background: #f0f7ff;
}

.notif-item-main {
    min-width: 0;
    min-height: 76px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 3px;
    padding: 10px 8px 10px 16px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.notif-title {
    font-size: 0.88rem;
    font-weight: 650;
}

.notif-body {
    display: -webkit-box;
    overflow: hidden;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.4;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.notif-meta {
    color: #98a2b3;
    font-size: 0.7rem;
}

.notif-cat-badge {
    padding: 1px 6px;
    border-radius: 8px;
    color: #667085;
    font-size: 0.65rem;
}

.notif-del-btn {
    align-self: center;
    justify-self: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #98a2b3;
    font-size: 1.15rem;
    cursor: pointer;
}

.notif-action-btn:focus-visible,
.notif-icon-btn:focus-visible,
.notif-tab:focus-visible,
.notif-del-btn:focus-visible,
.notif-item-main:focus-visible {
    outline: 3px solid rgba(25, 118, 210, 0.35);
    outline-offset: -3px;
}

@media (max-width: 767px) {
    .notif-inbox-modal {
        align-items: stretch;
        padding: 0;
    }

    .notif-inbox-panel {
        width: 100%;
        max-width: none;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        border-radius: 0;
    }

    .notif-inbox-header {
        min-height: calc(56px + env(safe-area-inset-top));
        padding-top: max(6px, env(safe-area-inset-top));
    }

    .notif-tabs {
        min-height: 44px;
    }
}
