/* =====================================================
   FUTUREVERSE ADMIN — NOTIFICATION PANEL
   Premium White UI | Shimmer Finish | Responsive
===================================================== */

/* ================= THEME VARIABLES ================= */

:root {
    color-scheme: light;

    --np-bg: #f4f6fa;
    --np-surface: #ffffff;
    --np-card: #ffffff;
    --np-hover: #f7f8fc;

    --np-text: #191c27;
    --np-muted: #747d8f;
    --np-subtle: #9aa1af;

    --np-border: #e8ebf2;
    --np-border-strong: #dce1eb;

    --np-accent: #6565d9;
    --np-accent-bg: #f0f0ff;
    --np-accent-border: #ddddff;

    --np-success: #21845b;
    --np-danger: #d64555;

    --np-sidebar: #ffffff;
    --np-sidebar-width: 252px;

    --np-radius: 15px;
    --np-shadow: 0 5px 22px rgba(25, 35, 60, 0.035);
}

/* Dark Mode */

html[data-theme="dark"] {
    color-scheme: dark;

    --np-bg: #080b12;
    --np-surface: #0d111a;
    --np-card: #10151f;
    --np-hover: #151b27;

    --np-text: #f1f3f7;
    --np-muted: #98a1b2;
    --np-subtle: #697488;

    --np-border: rgba(255, 255, 255, 0.08);
    --np-border-strong: rgba(255, 255, 255, 0.14);

    --np-accent: #b3b1ff;
    --np-accent-bg: rgba(165, 169, 255, 0.1);
    --np-accent-border: rgba(165, 169, 255, 0.2);

    --np-success: #78dfae;
    --np-danger: #ff899b;

    --np-sidebar: #0d111a;

    --np-shadow: none;
}

/* ================= RESET ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--np-bg);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--np-bg);
    color: var(--np-text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 13px;
    line-height: 1.5;

    -webkit-font-smoothing: antialiased;
    transition: background-color 0.2s ease, color 0.2s ease;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--np-accent);
    outline-offset: 3px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

/* ================= MAIN LAYOUT ================= */

.admin-layout {
    min-height: 100vh;
    display: flex;
}

/* ================= SIDEBAR ================= */

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1000;

    width: var(--np-sidebar-width);
    height: 100vh;

    display: flex;
    flex-direction: column;

    padding: 24px 16px 16px;

    background: var(--np-sidebar);
    border-right: 1px solid var(--np-border);

    transition: transform 0.25s ease;
}

/* Brand */

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;

    padding: 0 7px 25px;
    border-bottom: 1px solid var(--np-border);
}

.brand-logo {
    width: 39px;
    height: 39px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--np-accent-border);
    border-radius: 12px;

    background: var(--np-accent-bg);
    color: var(--np-accent);

    font-size: 15px;
    font-weight: 800;
    letter-spacing: -2px;
}

.brand-logo span + span {
    margin-left: 1px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-text strong {
    color: var(--np-text);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.brand-text small {
    margin-top: 3px;

    color: var(--np-muted);
    font-size: 8px;
    font-weight: 750;
    letter-spacing: 1.4px;
}

.sidebar-close {
    display: none;
    margin-left: auto;

    width: 32px;
    height: 32px;

    border: 1px solid var(--np-border);
    border-radius: 9px;

    background: var(--np-card);
    color: var(--np-muted);
}

/* Sidebar Section Label */

.sidebar-label {
    margin: 27px 10px 11px;

    color: var(--np-subtle);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

/* Navigation */

.admin-navigation {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    width: 100%;
    min-height: 43px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 11px 12px;

    border: 1px solid transparent;
    border-radius: 10px;

    background: transparent;
    color: var(--np-muted);

    text-align: left;
    font-size: 11px;
    font-weight: 600;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.nav-item > i:first-child {
    width: 17px;
    flex-shrink: 0;
    text-align: center;
    font-size: 13px;
}

.nav-item:hover {
    background: var(--np-hover);
    color: var(--np-text);
}

.nav-item.active {
    background: var(--np-accent-bg);
    border-color: var(--np-accent-border);
    color: var(--np-accent);
}

.nav-external {
    margin-left: auto;
    font-size: 9px;
    opacity: 0.65;
}

/* Sidebar Bottom */

.sidebar-bottom {
    margin-top: auto;
}

.sidebar-status {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 13px 10px;
    margin-bottom: 17px;

    border: 1px solid var(--np-border);
    border-radius: 12px;

    background: var(--np-hover);
}

.status-indicator {
    width: 7px;
    height: 7px;
    flex-shrink: 0;

    border-radius: 50%;
    background: #30a878;
    box-shadow: 0 0 0 4px rgba(48, 168, 120, 0.09);
}

.sidebar-status div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-status strong {
    font-size: 10px;
    font-weight: 700;
}

.sidebar-status small {
    margin-top: 3px;
    color: var(--np-muted);
    font-size: 9px;
}

.sidebar-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;

    padding: 12px 5px 0;

    border-top: 1px solid var(--np-border);

    color: var(--np-subtle);
    font-size: 9px;
}

/* ================= MAIN CONTENT ================= */

.admin-main {
    min-width: 0;
    min-height: 100vh;

    flex: 1;
    margin-left: var(--np-sidebar-width);
}

/* ================= TOPBAR ================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;

    min-height: 69px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 13px 34px;

    background: var(--np-surface);
    border-bottom: 1px solid var(--np-border);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 13px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--np-muted);
    font-size: 11px;
}

.breadcrumb i {
    color: var(--np-subtle);
    font-size: 9px;
}

.breadcrumb strong {
    color: var(--np-text);
    font-weight: 700;
}

.mobile-menu-btn {
    display: none;
}

.admin-badge {
    display: flex;
    align-items: center;
    gap: 9px;
}

.admin-avatar {
    width: 35px;
    height: 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--np-border);
    border-radius: 11px;

    background: var(--np-hover);
    color: var(--np-accent);
    font-size: 13px;
}

.admin-badge-text {
    display: flex;
    flex-direction: column;
}

.admin-badge-text strong {
    font-size: 10px;
    font-weight: 750;
}

.admin-badge-text small {
    margin-top: 2px;
    color: var(--np-muted);
    font-size: 9px;
}

/* ================= PAGE CONTENT ================= */

.page-content {
    width: min(100%, 1400px);
    margin: 0 auto;
    padding: 31px 34px 26px;
}

/* Page Heading */

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 25px;
}

.page-heading-text {
    min-width: 0;
}

.eyebrow,
.section-eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;

    color: var(--np-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.25px;
}

.eyebrow-dot {
    width: 6px;
    height: 6px;

    border-radius: 50%;
    background: var(--np-accent);
}

.page-heading h1 {
    margin-top: 10px;

    font-size: clamp(25px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -1.1px;
    line-height: 1.2;
}

.page-heading h1 span {
    color: var(--np-accent);
}

.page-heading p {
    margin-top: 9px;

    color: var(--np-muted);
    font-size: 11px;
    line-height: 1.8;
}

.preview-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    flex-shrink: 0;
    padding: 11px 14px;

    border: 1px solid var(--np-border);
    border-radius: 10px;

    background: var(--np-surface);
    color: var(--np-text);

    font-size: 10px;
    font-weight: 650;

    transition: 0.2s ease;
}

.preview-button:hover {
    border-color: var(--np-accent-border);
    background: var(--np-accent-bg);
}

/* ================= STATS GRID ================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;

    margin-bottom: 26px;
}

.stat-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    min-width: 0;
    padding: 17px 15px;

    border: 1px solid var(--np-border);
    border-radius: 14px;

    background: var(--np-surface);
    box-shadow: var(--np-shadow);

    transition: border-color 0.2s ease;
}

.stat-card:hover {
    border-color: var(--np-border-strong);
}

.stat-icon {
    width: 37px;
    height: 37px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--np-border);
    border-radius: 11px;

    background: var(--np-hover);
    font-size: 13px;
}

.users-icon {
    color: #6565d9;
}

.instructors-icon {
    color: #398b74;
}

.sent-icon {
    color: #8a6bce;
}

.courses-icon {
    color: #bf8740;
}

.stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-info > span {
    color: var(--np-muted);
    font-size: 10px;
    font-weight: 600;
}

.stat-info strong {
    margin-top: 4px;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.stat-info small {
    margin-top: 3px;
    color: var(--np-subtle);
    font-size: 9px;
}

/* ================= WORKSPACE SECTIONS ================= */

.workspace-section {
    min-width: 0;
    margin-bottom: 23px;
    padding: 24px;

    border: 1px solid var(--np-border);
    border-radius: 17px;

    background: var(--np-surface);
    box-shadow: var(--np-shadow);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 22px;
}

.section-header > div:first-child {
    min-width: 0;
}

.section-header h2 {
    margin-top: 6px;

    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.section-header p {
    margin-top: 5px;

    color: var(--np-muted);
    font-size: 10px;
    line-height: 1.7;
}

/* Refresh Button */

.refresh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    flex-shrink: 0;
    padding: 9px 11px;

    border: 1px solid var(--np-border);
    border-radius: 9px;

    background: var(--np-card);
    color: var(--np-muted);

    font-size: 10px;
    font-weight: 650;

    transition: 0.2s ease;
}

.refresh-button:hover {
    color: var(--np-text);
    background: var(--np-hover);
    border-color: var(--np-border-strong);
}

.refresh-button.is-loading i {
    animation: np-spin 0.8s linear infinite;
}

@keyframes np-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================= RECIPIENT TABS ================= */

.recipient-tabs {
    display: flex;
    align-items: center;
    gap: 5px;

    padding: 5px;
    margin-bottom: 19px;

    border: 1px solid var(--np-border);
    border-radius: 12px;

    background: var(--np-hover);
}

.recipient-tab {
    min-width: 0;
    flex: 1;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 11px 10px;

    border: 1px solid transparent;
    border-radius: 9px;

    background: transparent;
    color: var(--np-muted);

    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;

    transition: 0.2s ease;
}

.recipient-tab:hover {
    color: var(--np-text);
    background: var(--np-card);
}

.recipient-tab.active {
    color: var(--np-accent);
    background: var(--np-card);
    border-color: var(--np-accent-border);
    box-shadow: var(--np-shadow);
}

.recipient-tab > i {
    font-size: 12px;
}

.tab-count {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;
    background: var(--np-hover);

    color: var(--np-muted);
    font-size: 9px;
    font-weight: 800;
}

.recipient-tab.active .tab-count {
    background: var(--np-accent-bg);
    color: var(--np-accent);
}

/* ================= TOOLBAR ================= */

.directory-toolbar {
    display: flex;
    align-items: center;
    gap: 11px;

    margin-bottom: 24px;
}

.search-box {
    min-width: 0;
    flex: 1;

    display: flex;
    align-items: center;
    gap: 10px;

    min-height: 42px;
    padding: 0 12px;

    border: 1px solid var(--np-border);
    border-radius: 10px;

    background: var(--np-card);
    color: var(--np-muted);

    transition: border-color 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--np-accent-border);
}

.search-box > i {
    flex-shrink: 0;
    font-size: 12px;
}

.search-box input {
    width: 100%;
    min-width: 0;
    height: 40px;

    border: 0;
    outline: 0;

    background: transparent;
    color: var(--np-text);

    font-size: 11px;
}

.search-box input::placeholder {
    color: var(--np-subtle);
}

.search-box kbd {
    flex-shrink: 0;

    padding: 3px 6px;

    border: 1px solid var(--np-border);
    border-radius: 5px;

    color: var(--np-subtle);
    font-size: 10px;
}

.select-all-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    flex-shrink: 0;
    min-height: 42px;
    padding: 0 12px;

    border: 1px solid var(--np-border);
    border-radius: 10px;

    background: var(--np-card);
    color: var(--np-muted);

    font-size: 10px;
    font-weight: 650;

    transition: 0.2s ease;
}

.select-all-button:hover {
    background: var(--np-hover);
    color: var(--np-text);
}

/* ================= DIRECTORY SUMMARY ================= */

.directory-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding-bottom: 13px;
    margin-bottom: 2px;

    border-bottom: 1px solid var(--np-border);
}

.directory-summary h3 {
    font-size: 12px;
    font-weight: 750;
}

.directory-summary p {
    margin-top: 3px;
    color: var(--np-muted);
    font-size: 10px;
}

.directory-count {
    color: var(--np-muted);
    font-size: 10px;
    font-weight: 650;
}

/* ================= RECIPIENT LIST ================= */

.recipient-list {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.recipient-row {
    display: flex;
    align-items: center;
    gap: 13px;

    min-width: 0;
    padding: 15px 8px;

    border-bottom: 1px solid var(--np-border);

    transition: background 0.2s ease;
}

.recipient-row:hover {
    background: var(--np-hover);
}

.recipient-row.selected {
    background: var(--np-accent-bg);
}

.recipient-select {
    width: 17px;
    height: 17px;
    flex-shrink: 0;

    accent-color: var(--np-accent);
    cursor: pointer;
}

.recipient-avatar {
    width: 39px;
    height: 39px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border: 1px solid var(--np-border);
    border-radius: 12px;

    background: var(--np-hover);
    color: var(--np-accent);

    font-size: 13px;
    font-weight: 750;
}

.recipient-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipient-main {
    flex: 1;
    min-width: 0;
}

.recipient-name {
    display: block;

    color: var(--np-text);
    font-size: 11px;
    font-weight: 750;

    overflow-wrap: anywhere;
}

.recipient-email {
    display: block;
    margin-top: 3px;

    color: var(--np-muted);
    font-size: 10px;

    overflow-wrap: anywhere;
}

.recipient-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;

    margin-top: 7px;
}

.role-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 4px 7px;

    border: 1px solid var(--np-border);
    border-radius: 6px;

    background: var(--np-hover);
    color: var(--np-muted);

    font-size: 8px;
    font-weight: 750;
}

.role-badge.instructor {
    background: rgba(33, 132, 91, 0.07);
    border-color: rgba(33, 132, 91, 0.15);
    color: var(--np-success);
}

.status-badge.active {
    color: var(--np-success);
}

.status-badge.inactive {
    color: var(--np-danger);
}

.recipient-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.icon-button {
    width: 33px;
    height: 33px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--np-border);
    border-radius: 9px;

    background: var(--np-card);
    color: var(--np-muted);

    font-size: 11px;
    transition: 0.2s ease;
}

.icon-button:hover {
    background: var(--np-accent-bg);
    border-color: var(--np-accent-border);
    color: var(--np-accent);
}

/* ================= DIRECTORY FOOTER ================= */

.directory-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding-top: 17px;
}

.directory-footer > span {
    color: var(--np-muted);
    font-size: 10px;
}

.view-selected-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 9px 12px;

    border: 1px solid var(--np-border);
    border-radius: 9px;

    background: var(--np-card);
    color: var(--np-text);

    font-size: 10px;
    font-weight: 650;

    transition: 0.2s ease;
}

.view-selected-button:hover:not(:disabled) {
    background: var(--np-accent-bg);
    border-color: var(--np-accent-border);
    color: var(--np-accent);
}

/* ================= LOADING / EMPTY / ERROR ================= */

.directory-state {
    min-height: 150px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 11px;

    padding: 24px;

    text-align: center;
    color: var(--np-muted);
}

.directory-state > i {
    font-size: 23px;
    color: var(--np-subtle);
}

.directory-state p {
    max-width: 360px;
    font-size: 11px;
    line-height: 1.8;
}

.loading-spinner {
    width: 27px;
    height: 27px;

    border: 2px solid var(--np-border);
    border-top-color: var(--np-accent);
    border-radius: 50%;

    animation: np-spin 0.75s linear infinite;
}

.error-state > i {
    color: var(--np-danger);
}

.error-state button {
    padding: 8px 12px;

    border: 1px solid var(--np-border);
    border-radius: 8px;

    background: var(--np-card);
    color: var(--np-text);

    font-size: 10px;
    font-weight: 650;
}

/* ================= RECIPIENT DETAILS ================= */

.recipient-profile {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 18px;

    border: 1px solid var(--np-border);
    border-radius: 13px;

    background: var(--np-hover);
}

.profile-placeholder {
    width: 52px;
    height: 52px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--np-border);
    border-radius: 15px;

    background: var(--np-card);
    color: var(--np-accent);
    font-size: 18px;
}

.profile-heading {
    flex: 1;
    min-width: 0;
}

.profile-heading h3 {
    font-size: 14px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.profile-heading p {
    margin-top: 4px;
    margin-bottom: 8px;

    color: var(--np-muted);
    font-size: 10px;
    overflow-wrap: anywhere;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;

    margin-top: 17px;
}

.detail-item {
    min-width: 0;
    padding: 14px;

    border: 1px solid var(--np-border);
    border-radius: 11px;

    background: var(--np-card);
}

.detail-item span {
    display: block;
    color: var(--np-muted);
    font-size: 9px;
    font-weight: 650;
}

.detail-item strong {
    display: block;
    margin-top: 6px;

    color: var(--np-text);
    font-size: 11px;
    font-weight: 700;

    overflow-wrap: anywhere;
}

/* ================= BUTTONS ================= */

.primary-button,
.secondary-button {
    min-height: 39px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 10px 14px;

    border: 1px solid transparent;
    border-radius: 9px;

    font-size: 10px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.primary-button {
    background: var(--np-accent);
    color: #ffffff;
}

.primary-button:hover:not(:disabled) {
    filter: brightness(0.96);
}

.secondary-button {
    border-color: var(--np-border);
    background: var(--np-card);
    color: var(--np-text);
}

.secondary-button:hover:not(:disabled) {
    background: var(--np-hover);
    border-color: var(--np-border-strong);
}

.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 8px 10px;

    border: 0;
    border-radius: 8px;

    background: transparent;
    color: var(--np-accent);

    font-size: 10px;
    font-weight: 700;
}

.text-button:hover {
    background: var(--np-accent-bg);
}

/* ================= COMPOSE SECTION ================= */

.draft-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 7px 9px;

    border: 1px solid var(--np-border);
    border-radius: 8px;

    background: var(--np-hover);
    color: var(--np-muted);

    font-size: 9px;
    font-weight: 700;
}

.compose-recipient {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px;
    margin-bottom: 23px;

    border: 1px solid var(--np-accent-border);
    border-radius: 12px;

    background: var(--np-accent-bg);
}

.compose-recipient-icon {
    width: 37px;
    height: 37px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--np-accent-border);
    border-radius: 10px;

    background: var(--np-card);
    color: var(--np-accent);
}

.compose-recipient-info {
    flex: 1;
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.compose-recipient-info > span {
    color: var(--np-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
}

.compose-recipient-info strong {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.compose-recipient-info small {
    margin-top: 3px;
    color: var(--np-muted);
    font-size: 9px;
}

/* Form Fields */

.form-field {
    min-width: 0;
    margin-bottom: 21px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;

    color: var(--np-text);
    font-size: 11px;
    font-weight: 750;
}

.form-field label > span {
    color: var(--np-danger);
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    min-width: 0;

    padding: 12px 13px;

    border: 1px solid var(--np-border-strong);
    border-radius: 10px;

    outline: none;

    background: var(--np-card);
    color: var(--np-text);

    font-size: 11px;

    transition: border-color 0.2s ease;
}

.form-field input {
    min-height: 43px;
}

.form-field textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.8;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--np-subtle);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--np-accent);
}

.field-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-top: 7px;

    color: var(--np-muted);
    font-size: 9px;
}

.field-footer b {
    color: var(--np-text);
}

/* Compose Options */

.compose-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.compose-options .form-field {
    margin-bottom: 10px;
}

.compose-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    padding: 12px;
    margin-top: 8px;

    border: 1px solid rgba(191, 135, 64, 0.2);
    border-radius: 10px;

    background: rgba(191, 135, 64, 0.07);
    color: var(--np-muted);
}

.compose-warning > i {
    margin-top: 2px;
    color: #bf8740;
}

.compose-warning p {
    font-size: 10px;
    line-height: 1.7;
}

.compose-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;

    padding-top: 18px;
    margin-top: 17px;

    border-top: 1px solid var(--np-border);
}

/* ================= SENT HISTORY ================= */

.sent-search {
    margin-bottom: 17px;
}

.sent-list {
    display: flex;
    flex-direction: column;
}

.sent-row {
    display: flex;
    align-items: center;
    gap: 13px;

    padding: 15px 8px;

    border-bottom: 1px solid var(--np-border);
}

.sent-row-content {
    flex: 1;
    min-width: 0;
}

.sent-row-content strong {
    display: block;
    font-size: 11px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.sent-row-content p {
    margin-top: 4px;

    color: var(--np-muted);
    font-size: 10px;
    line-height: 1.7;

    overflow-wrap: anywhere;
}

.sent-row-meta {
    margin-top: 6px;
    color: var(--np-subtle);
    font-size: 9px;
}

/* ================= TOAST ================= */

.admin-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2000;

    width: min(360px, calc(100vw - 32px));

    display: flex;
    align-items: flex-start;
    gap: 11px;

    padding: 15px;

    border: 1px solid var(--np-border);
    border-radius: 13px;

    background: var(--np-card);
    box-shadow: 0 12px 40px rgba(20, 25, 45, 0.12);

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);

    transition: 0.22s ease;
}

.admin-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.toast-icon {
    color: var(--np-success);
    font-size: 15px;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-content strong {
    display: block;
    font-size: 11px;
}

.toast-content p {
    margin-top: 4px;
    color: var(--np-muted);
    font-size: 10px;
    line-height: 1.7;
}

.admin-toast > button {
    width: 25px;
    height: 25px;
    flex-shrink: 0;

    border: 0;
    border-radius: 7px;

    background: transparent;
    color: var(--np-muted);
}

/* ================= CONFIRM MODAL ================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(20, 25, 40, 0.35);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.confirm-modal {
    width: min(100%, 440px);
    padding: 25px;

    border: 1px solid var(--np-border);
    border-radius: 18px;

    background: var(--np-card);
    box-shadow: 0 20px 70px rgba(15, 20, 35, 0.18);
}

.confirm-icon {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 18px;

    border: 1px solid var(--np-accent-border);
    border-radius: 13px;

    background: var(--np-accent-bg);
    color: var(--np-accent);

    font-size: 17px;
}

.confirm-content h2 {
    margin-top: 9px;

    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.confirm-content p {
    margin-top: 9px;

    color: var(--np-muted);
    font-size: 11px;
    line-height: 1.8;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;

    margin-top: 25px;
}

/* ================= FOOTER ================= */

.admin-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 20px 2px 8px;
    margin-top: 7px;

    border-top: 1px solid var(--np-border);

    color: var(--np-subtle);
    font-size: 9px;
}

.admin-footer > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-footer strong {
    color: var(--np-muted);
    font-weight: 800;
}

.admin-footer > div span {
    padding-left: 8px;
    border-left: 1px solid var(--np-border);
}

/* ================= SHIMMER FINISH ================= */

.np-shimmer {
    position: relative;
    overflow: hidden;

    background: #f0f2f6;
    background-image: linear-gradient(
        100deg,
        #f0f2f6 20%,
        #ffffff 38%,
        #e6e9f0 56%
    );

    background-size: 250% 100%;
    animation: np-shimmer 1.8s linear infinite;
}

html[data-theme="dark"] .np-shimmer {
    background-color: #141923;
    background-image: linear-gradient(
        100deg,
        #111620 20%,
        #252b36 38%,
        #111620 56%
    );
}

@keyframes np-shimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -150% 0;
    }
}

/* ================= MOBILE BOTTOM NAV ================= */

.mobile-bottom-nav {
    display: none;
}

/* ================= TABLET ================= */

@media (max-width: 1100px) {
    :root {
        --np-sidebar-width: 225px;
    }

    .page-content {
        padding: 26px 23px 25px;
    }

    .topbar {
        padding-right: 23px;
        padding-left: 23px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-card {
        padding: 15px;
    }

    .workspace-section {
        padding: 20px;
    }
}

/* ================= MOBILE MENU OVERLAY ================= */

.sidebar-overlay {
    display: none;
}

/* ================= MOBILE ================= */

@media (max-width: 760px) {
    :root {
        --np-sidebar-width: 270px;
    }

    body {
        padding-bottom: 77px;
    }

    .admin-sidebar {
        z-index: 1200;
        width: min(82vw, 290px);

        transform: translateX(-105%);
        box-shadow: none;
    }

    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 15px 0 45px rgba(15, 20, 35, 0.1);
    }

    .sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 1100;

        display: block;

        background: rgba(15, 20, 35, 0.38);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);

        opacity: 0;
        visibility: hidden;

        transition: 0.22s ease;
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .admin-main {
        width: 100%;
        margin-left: 0;
    }

    .topbar {
        min-height: 61px;
        padding: 11px 16px;
    }

    .topbar-left {
        gap: 10px;
    }

    .mobile-menu-btn {
        width: 36px;
        height: 36px;
        flex-shrink: 0;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        border: 1px solid var(--np-border);
        border-radius: 10px;

        background: var(--np-card);
        color: var(--np-text);
        font-size: 13px;
    }

    .breadcrumb {
        gap: 7px;
        font-size: 10px;
    }

    .admin-badge {
        gap: 0;
    }

    .admin-avatar {
        width: 33px;
        height: 33px;
    }

    .admin-badge-text {
        display: none;
    }

    .page-content {
        padding: 23px 14px 25px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;

        margin-bottom: 20px;
    }

    .page-heading h1 {
        margin-top: 9px;
        font-size: 26px;
    }

    .page-heading p {
        max-width: 420px;
        font-size: 10px;
    }

    .preview-button {
        min-height: 38px;
        padding: 9px 11px;
        font-size: 10px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;

        margin-bottom: 17px;
    }

    .stat-card {
        gap: 9px;
        padding: 12px 10px;
        border-radius: 12px;
    }

    .stat-icon {
        width: 31px;
        height: 31px;
        border-radius: 9px;
        font-size: 11px;
    }

    .stat-info > span {
        font-size: 9px;
    }

    .stat-info strong {
        font-size: 20px;
    }

    .stat-info small {
        font-size: 8px;
    }

    .workspace-section {
        padding: 15px 12px;
        margin-bottom: 16px;
        border-radius: 14px;
    }

    .section-header {
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 17px;
    }

    .section-eyebrow {
        font-size: 8px;
        letter-spacing: 0.9px;
    }

    .section-header h2 {
        margin-top: 5px;
        font-size: 14px;
    }

    .section-header p {
        font-size: 9px;
    }

    .refresh-button {
        gap: 5px;
        padding: 8px;
        font-size: 9px;
    }

    .recipient-tabs {
        gap: 3px;
        padding: 3px;
        margin-bottom: 14px;
        border-radius: 10px;
    }

    .recipient-tab {
        gap: 5px;
        padding: 10px 4px;
        border-radius: 8px;
        font-size: 10px;
    }

    .recipient-tab > i {
        font-size: 10px;
    }

    .tab-count {
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        font-size: 8px;
    }

    .directory-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 19px;
    }

    .search-box {
        min-height: 40px;
        border-radius: 9px;
    }

    .search-box input {
        height: 38px;
        font-size: 10px;
    }

    .select-all-button {
        align-self: flex-start;
        min-height: 34px;
        padding: 0 10px;
        font-size: 9px;
    }

    .directory-summary {
        padding-bottom: 11px;
    }

    .directory-summary h3 {
        font-size: 11px;
    }

    .directory-summary p,
    .directory-count {
        font-size: 9px;
    }

    .recipient-row {
        gap: 9px;
        padding: 13px 4px;
    }

    .recipient-avatar {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 11px;
    }

    .recipient-name {
        font-size: 10px;
    }

    .recipient-email {
        font-size: 9px;
        overflow-wrap: anywhere;
    }

    .recipient-meta {
        gap: 5px;
        margin-top: 6px;
    }

    .role-badge,
    .status-badge {
        padding: 3px 5px;
        font-size: 7px;
    }

    .recipient-actions {
        gap: 4px;
    }

    .icon-button {
        width: 29px;
        height: 29px;
        border-radius: 8px;
        font-size: 10px;
    }

    .directory-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding-top: 14px;
    }

    .directory-footer > span {
        font-size: 9px;
    }

    .view-selected-button {
        width: 100%;
        min-height: 36px;
        font-size: 9px;
    }

    .recipient-profile {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
    }

    .profile-placeholder {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 15px;
    }

    .profile-heading {
        flex-basis: calc(100% - 58px);
    }

    .profile-heading h3 {
        font-size: 12px;
    }

    .recipient-profile > .primary-button {
        width: 100%;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 12px;
    }

    .detail-item {
        padding: 12px;
    }

    .detail-item strong {
        font-size: 10px;
    }

    .compose-recipient {
        gap: 9px;
        padding: 11px;
        margin-bottom: 19px;
    }

    .compose-recipient-icon {
        width: 32px;
        height: 32px;
    }

    .compose-recipient-info strong {
        font-size: 10px;
    }

    .compose-recipient-info small {
        font-size: 8px;
    }

    .compose-recipient > .text-button {
        padding: 7px;
        font-size: 9px;
    }

    .form-field {
        margin-bottom: 17px;
    }

    .form-field label {
        font-size: 10px;
    }

    .form-field input,
    .form-field textarea,
    .form-field select {
        padding: 11px;
        font-size: 11px;
    }

    .form-field textarea {
        min-height: 120px;
    }

    .field-footer {
        font-size: 8px;
    }

    .compose-options {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .compose-actions {
        gap: 8px;
    }

    .compose-actions > button {
        flex: 1;
    }

    .draft-badge {
        padding: 6px;
        font-size: 8px;
    }

    .sent-row {
        gap: 9px;
        padding: 13px 3px;
    }

    .sent-row-content strong {
        font-size: 10px;
    }

    .sent-row-content p {
        font-size: 9px;
    }

    .admin-toast {
        right: 12px;
        bottom: 86px;
    }

    .confirm-modal {
        padding: 20px 16px;
        border-radius: 15px;
    }

    .confirm-content h2 {
        font-size: 18px;
    }

    .confirm-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .confirm-actions > button {
        width: 100%;
    }

    .admin-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding-top: 16px;
        font-size: 8px;
    }

    /* Mobile Bottom Navigation */

    .mobile-bottom-nav {
        position: fixed;
        inset: auto 0 0;
        z-index: 1050;

        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 2px;

        padding: 8px 5px calc(8px + env(safe-area-inset-bottom));

        border-top: 1px solid var(--np-border);

        background: var(--np-surface);
        box-shadow: 0 -5px 22px rgba(20, 25, 45, 0.04);
    }

    .mobile-nav-item {
        min-width: 0;
        min-height: 48px;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;

        padding: 5px 2px;

        border: 1px solid transparent;
        border-radius: 9px;

        background: transparent;
        color: var(--np-muted);

        font-size: 8px;
        font-weight: 650;
        white-space: nowrap;
    }

    .mobile-nav-item i {
        font-size: 14px;
    }

    .mobile-nav-item.active {
        background: var(--np-accent-bg);
        border-color: var(--np-accent-border);
        color: var(--np-accent);
    }
}

/* ================= SMALL MOBILE ================= */

@media (max-width: 380px) {
    .page-content {
        padding-right: 10px;
        padding-left: 10px;
    }

    .topbar {
        padding-right: 10px;
        padding-left: 10px;
    }

    .page-heading h1 {
        font-size: 23px;
    }

    .stat-card {
        gap: 7px;
        padding: 10px 8px;
    }

    .stat-icon {
        width: 27px;
        height: 27px;
        font-size: 10px;
    }

    .stat-info > span {
        font-size: 8px;
    }

    .stat-info strong {
        font-size: 18px;
    }

    .recipient-tab {
        gap: 3px;
        font-size: 9px;
    }

    .recipient-row {
        gap: 7px;
    }

    .recipient-avatar {
        width: 30px;
        height: 30px;
    }

    .recipient-actions {
        gap: 3px;
    }

    .icon-button {
        width: 26px;
        height: 26px;
        font-size: 9px;
    }

    .mobile-nav-item {
        font-size: 7px;
    }

    .mobile-nav-item i {
        font-size: 13px;
    }
}

/* ================= REDUCED MOTION ================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}













/* =========================================
   FUTUREVERSE — PREMIUM VIEW DETAILS BUTTON
========================================= */

.recipient-view-btn {
    appearance: none;
    -webkit-appearance: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-width: 112px;
    min-height: 42px;
    padding: 10px 16px;

    border: 1px solid #d9d5ff;
    border-radius: 12px;

    background: linear-gradient(
        135deg,
        #f3f1ff 0%,
        #e9e6ff 100%
    );

    color: #5b50c8;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;

    cursor: pointer;

    box-shadow:
        0 2px 5px rgba(91, 80, 200, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

/* Hover */

@media (hover: hover) {
    .recipient-view-btn:hover {
        background: linear-gradient(
            135deg,
            #6f63df 0%,
            #5749c5 100%
        );

        color: #ffffff;
        border-color: #6f63df;

        box-shadow:
            0 5px 14px rgba(91, 80, 200, 0.22);

        transform: translateY(-1px);
    }
}

/* Click */

.recipient-view-btn:active {
    transform: scale(0.97);
    box-shadow: none;
}

/* Keyboard accessibility */

.recipient-view-btn:focus-visible {
    outline: 3px solid rgba(111, 99, 223, 0.35);
    outline-offset: 3px;
}

/* Selected recipient row */

.recipient-row.selected .recipient-view-btn {
    background: #ffffff;
    border-color: #d8d2ff;
    color: #5749c5;
}

/* Mobile */

@media (max-width: 480px) {
    .recipient-view-btn {
        min-width: 92px;
        min-height: 40px;
        padding: 9px 11px;
        border-radius: 10px;
        font-size: 12px;
    }
}

/* Respect reduced motion */

@media (prefers-reduced-motion: reduce) {
    .recipient-view-btn {
        transition: none;
    }
}

























/* ============================================
   FUTUREVERSE — PREMIUM NOTIFICATION UI
   Responsive • Refined • Centered • Clean
============================================ */

/* ---------- GLOBAL POLISH ---------- */

:root {
    --np-radius: 16px;
    --np-shadow:
        0 8px 28px rgba(30, 35, 70, 0.045);
}

button {
    -webkit-tap-highlight-color: transparent;
}

button,
a,
input,
textarea,
select {
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        color 0.2s ease;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(101, 101, 217, 0.25);
    outline-offset: 3px;
}

/* ---------- PREMIUM WORKSPACE ---------- */

.workspace-section {
    border-radius: 18px;
    border-color: var(--np-border);
    box-shadow: var(--np-shadow);
    overflow: hidden;
}

.section-header {
    min-width: 0;
}

.section-header > div:first-child {
    flex: 1;
    min-width: 0;
}

/* ---------- REFRESH BUTTON ---------- */

.refresh-button {
    flex-shrink: 0;
    min-height: 42px;
    padding: 0 15px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.refresh-button:hover {
    border-color: var(--np-accent-border);
    background: var(--np-accent-bg);
    color: var(--np-accent);
}

/* ---------- RECIPIENT TABS ---------- */

.recipient-tabs {
    padding: 5px;
    gap: 5px;
    border-radius: 14px;
}

.recipient-tab {
    min-width: 0;
    min-height: 44px;
    border-radius: 10px;
    padding: 10px 8px;
}

.recipient-tab.active {
    box-shadow: 0 3px 10px rgba(35, 35, 80, 0.045);
}

/* ---------- RECIPIENT LIST FIX ---------- */

/*
   HTML row layout:
   Checkbox | Avatar | Recipient Info | View Details
*/

.recipient-list {
    width: 100%;
    min-width: 0;
}

.recipient-row {
    display: grid;

    grid-template-columns:
        18px
        42px
        minmax(0, 1fr)
        auto;

    align-items: center;
    gap: 12px;

    width: 100%;
    min-width: 0;

    padding: 17px 8px;
    border-bottom: 1px solid var(--np-border);

    overflow: hidden;
}

.recipient-row:hover {
    background: var(--np-hover);
}

.recipient-row.selected {
    background: var(--np-accent-bg);
}

/* Checkbox */

.recipient-select {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipient-checkbox {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--np-accent);
    cursor: pointer;
}

/* Avatar */

.recipient-avatar {
    width: 42px;
    height: 42px;
    min-width: 0;
    overflow: hidden;
    border-radius: 12px;
}

/* Recipient information */

.recipient-info,
.recipient-main {
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.recipient-info strong,
.recipient-name {
    display: block;
    max-width: 100%;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.recipient-info span,
.recipient-email {
    display: block;
    max-width: 100%;
    margin-top: 4px;

    font-size: 12px;
    line-height: 1.5;

    overflow-wrap: anywhere;
    word-break: break-word;
}

.recipient-info small {
    display: block;
    margin-top: 5px;
    color: var(--np-muted);
    font-size: 11px;
}

/* ---------- VIEW DETAILS BUTTON ---------- */

.recipient-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    width: auto;
    min-width: 112px;
    max-width: 150px;
    min-height: 42px;

    flex-shrink: 0;
    padding: 10px 13px;

    border: 1px solid var(--np-accent-border);
    border-radius: 12px;

    background: linear-gradient(
        135deg,
        var(--np-accent-bg),
        #ffffff
    );

    color: var(--np-accent);

    font-family: inherit;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
    text-align: center;

    white-space: normal;
    overflow-wrap: anywhere;

    box-shadow:
        0 3px 10px rgba(80, 75, 180, 0.055);
}

.recipient-view-btn:hover {
    background: var(--np-accent);
    border-color: var(--np-accent);
    color: #ffffff;

    box-shadow:
        0 6px 16px rgba(80, 75, 180, 0.17);

    transform: translateY(-1px);
}

.recipient-view-btn:active {
    transform: scale(0.98);
    box-shadow: none;
}

.recipient-view-btn:focus-visible {
    outline: 3px solid rgba(101, 101, 217, 0.25);
    outline-offset: 3px;
}

/* ---------- DIRECTORY FOOTER ---------- */

.directory-footer {
    min-width: 0;
    gap: 12px;
}

.view-selected-button {
    min-height: 43px;
    padding: 11px 16px;
    border-radius: 11px;
    font-weight: 700;
}

/* ---------- PREMIUM FORM FIELDS ---------- */

.form-field input,
.form-field textarea,
.form-field select {
    border-radius: 12px;
    border-color: var(--np-border-strong);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--np-accent);
    box-shadow: 0 0 0 4px rgba(101, 101, 217, 0.09);
}

.primary-button,
.secondary-button {
    min-height: 42px;
    padding: 11px 16px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 750;
}

.primary-button {
    box-shadow: 0 4px 12px rgba(80, 75, 180, 0.10);
}

.primary-button:hover:not(:disabled) {
    filter: brightness(0.97);
    transform: translateY(-1px);
}

/* ---------- CENTERED TOAST / ALERT ---------- */

/*
   Success, error and information messages
   appear horizontally centered on the screen.
*/

.admin-toast {
    position: fixed;

    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;

    z-index: 10000;

    width: min(390px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);

    display: flex;
    align-items: flex-start;
    gap: 13px;

    padding: 18px;

    border: 1px solid var(--np-border);
    border-radius: 16px;

    background: var(--np-card);

    box-shadow:
        0 18px 60px rgba(20, 25, 55, 0.18);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translate(-50%, calc(-50% + 12px));

    transition:
        opacity 0.22s ease,
        visibility 0.22s ease,
        transform 0.22s ease;
}

.admin-toast.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translate(-50%, -50%);
}

.toast-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;
    background: var(--np-accent-bg);
    color: var(--np-accent);

    font-size: 15px;
}

.toast-icon.success {
    background: rgba(33, 132, 91, 0.10);
    color: var(--np-success);
}

.toast-icon.error {
    background: rgba(214, 69, 85, 0.10);
    color: var(--np-danger);
}

.toast-content {
    min-width: 0;
    flex: 1;
}

.toast-content strong {
    display: block;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.toast-content p {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.admin-toast > button {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;
    background: var(--np-hover);
}

/* ---------- PREMIUM CONFIRM MODAL ---------- */

.modal-overlay {
    z-index: 11000;
    padding: 18px;
}

.confirm-modal {
    width: min(100%, 440px);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(15, 20, 40, 0.22);
}

/* ---------- MOBILE RESPONSIVENESS ---------- */

@media (max-width: 760px) {

    .workspace-section {
        border-radius: 17px;
    }

    .section-header {
        align-items: center;
        gap: 10px;
    }

    .refresh-button {
        min-height: 40px;
        padding: 0 12px;
        font-size: 11px;
    }

    .recipient-row {
        grid-template-columns:
            17px
            36px
            minmax(0, 1fr);

        gap: 9px;
        padding: 15px 3px;
    }

    .recipient-avatar {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .recipient-info strong,
    .recipient-name {
        font-size: 12px;
    }

    .recipient-info span,
    .recipient-email {
        font-size: 11px;
    }

    /*
       Put the button on its own line.
       It stays inside the recipient row.
    */

    .recipient-view-btn {
        grid-column: 3;
        justify-self: end;

        width: fit-content;
        min-width: 0;
        max-width: 100%;
        min-height: 36px;

        padding: 8px 12px;
        border-radius: 10px;
        font-size: 11px;
    }

    .directory-footer {
        align-items: stretch;
    }

    .view-selected-button {
        width: 100%;
    }

    .admin-toast {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;

        width: calc(100vw - 32px);
        max-width: 390px;

        padding: 15px;
        border-radius: 15px;

        transform: translate(-50%, calc(-50% + 12px));
    }

    .admin-toast.show {
        transform: translate(-50%, -50%);
    }
}

/* ---------- EXTRA SMALL PHONES ---------- */

@media (max-width: 380px) {

    .recipient-row {
        grid-template-columns:
            16px
            32px
            minmax(0, 1fr);

        gap: 7px;
        padding-right: 0;
        padding-left: 0;
    }

    .recipient-avatar {
        width: 32px;
        height: 32px;
    }

    .recipient-view-btn {
        max-width: 100%;
        min-height: 34px;
        padding: 7px 10px;
        font-size: 10px;
    }

    .recipient-tabs {
        gap: 2px;
        padding: 3px;
    }

    .recipient-tab {
        gap: 4px;
        padding: 9px 3px;
        font-size: 9px;
    }

    .admin-toast {
        width: calc(100vw - 24px);
        max-width: none;
        padding: 13px;
    }
}

/* ---------- DARK MODE ---------- */

html[data-theme="dark"] .recipient-view-btn {
    background: var(--np-accent-bg);
    border-color: var(--np-accent-border);
    color: var(--np-accent);
}

html[data-theme="dark"] .recipient-view-btn:hover {
    background: var(--np-accent);
    color: #ffffff;
}

html[data-theme="dark"] .admin-toast {
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.40);
}

/* ---------- REDUCED MOTION ---------- */

@media (prefers-reduced-motion: reduce) {

    .recipient-view-btn,
    .admin-toast,
    .primary-button {
        transition: none !important;
        transform: none !important;
    }
}