/* =========================
   Fonts
========================= */
@font-face {
    font-family: 'IranSans';
    src: url('fonts/IRANSansWeb(FaNum).woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* =========================
   Root
========================= */
:root {
    --bg: #07111f;
    --bg-2: #0d1728;
    --panel: rgba(17, 25, 40, 0.72);
    --panel-strong: rgba(14, 22, 36, 0.95);
    --panel-soft: rgba(255,255,255,0.04);
    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.14);

    --text: #f8fbff;
    --muted: #96a6bf;

    --primary: #4f8cff;
    --primary-2: #6d5dfc;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --cyan: #06b6d4;
    --purple: #8b5cf6;
    --orange: #fb923c;

    --shadow-lg: 0 20px 70px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 35px rgba(0, 0, 0, 0.22);

    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;

    --container: 1320px;
    --transition: all .28s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at top right, rgba(79,140,255,.18), transparent 25%),
        radial-gradient(circle at top left, rgba(139,92,246,.15), transparent 22%),
        radial-gradient(circle at bottom left, rgba(34,197,94,.10), transparent 20%),
        linear-gradient(180deg, #06101c 0%, #091321 35%, #0b1524 100%);
    color: var(--text);
    font-family: 'IranSans', Tahoma, sans-serif;
    direction: rtl;
    min-height: 100vh;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

body.role-admin .hero {
    background: linear-gradient(135deg, rgba(79,140,255,.20), rgba(109,93,252,.16));
}

body.role-user .hero {
    background: linear-gradient(135deg, rgba(34,197,94,.14), rgba(6,182,212,.12));
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(var(--container), 94%);
    margin: 0 auto;
    padding: 24px 0 110px;
    position: relative;
    z-index: 2;
}

.dashboard-bg::before,
.dashboard-bg::after {
    content: "";
    position: fixed;
    inset: auto;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .18;
    z-index: 0;
    pointer-events: none;
}

.dashboard-bg::before {
    top: 40px;
    right: -80px;
    background: #4f8cff;
}

.dashboard-bg::after {
    bottom: 40px;
    left: -80px;
    background: #8b5cf6;
}

/* =========================
   Glass Card
========================= */
.glass-card {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* =========================
   Topbar
========================= */
.topbar {
    border-radius: var(--radius-xl);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.topbar-right,
.topbar-left {
    display: flex;
    align-items: center;
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo-wrap {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(79,140,255,.18), rgba(109,93,252,.18));
    border: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.brand-info h1 {
    font-size: 1.18rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.brand-info p {
    color: var(--muted);
    font-size: .88rem;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 8px 12px;
}

.user-chip-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 10px 25px rgba(79,140,255,.35);
}

.user-chip-info {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.user-chip-info strong {
    font-size: .95rem;
}

.user-chip-info span {
    font-size: .8rem;
    color: var(--muted);
}

/* =========================
   Hero
========================= */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.5fr .9fr;
    gap: 20px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,.08);
    overflow: hidden;
    padding: 26px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255,255,255,.05), transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,.08), transparent 22%);
    pointer-events: none;
}

.hero-content,
.hero-side {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: .74rem;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #dfeaff;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
}

.hero h2 {
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.5;
    margin-bottom: 10px;
    font-weight: 900;
}

.hero p {
    color: #c3d1e6;
    max-width: 760px;
    font-size: .96rem;
    margin-bottom: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-side {
    border-radius: 24px;
    padding: 18px;
    background: rgba(8,14,26,.38);
}

.hero-side-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 14px;
}

.mini-stat-list {
    display: grid;
    gap: 12px;
}

.mini-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.05);
}

.mini-stat span {
    color: var(--muted);
    font-size: .88rem;
}

.mini-stat strong {
    font-size: .94rem;
    text-align: left;
}

/* =========================
   Buttons
========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 11px 18px;
    font-size: .92rem;
    font-weight: 700;
    border: 1px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 12px 25px rgba(79,140,255,.24);
}

.btn-primary:hover {
    filter: brightness(1.08);
}

.btn-secondary {
    color: #eaf1ff;
    background: rgba(255,255,255,.04);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.16);
}

.full-btn {
    width: 100%;
}

/* =========================
   Stats Grid
========================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    border-radius: 24px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(79,140,255,.22);
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: auto -40px -40px auto;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255,255,255,.05), transparent 65%);
    border-radius: 50%;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,.08);
}

.stat-icon.blue   { background: rgba(79,140,255,.14); }
.stat-icon.purple { background: rgba(139,92,246,.14); }
.stat-icon.cyan   { background: rgba(6,182,212,.14); }
.stat-icon.green  { background: rgba(34,197,94,.14); }
.stat-icon.red    { background: rgba(239,68,68,.14); }
.stat-icon.orange { background: rgba(251,146,60,.14); }

.stat-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-label {
    color: var(--muted);
    font-size: .82rem;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.04rem;
    font-weight: 800;
    word-break: break-word;
}

.license-text {
    font-family: monospace;
    color: #90c2ff;
}

/* =========================
   Dashboard Grid
========================= */
.dashboard-grid {
    display: grid;
    gap: 20px;
}

.user-layout {
    grid-template-columns: 1.1fr .9fr;
}

.admin-layout {
    grid-template-columns: 1.2fr .8fr;
}

.panel-card {
    border-radius: 26px;
    padding: 22px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.section-head h3 {
    font-size: 1.08rem;
    font-weight: 900;
}

.section-head span {
    color: var(--muted);
    font-size: .85rem;
}

/* =========================
   Info List
========================= */
.modern-info-list {
    display: grid;
    gap: 12px;
}

.info-row,
.support-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid rgba(255,255,255,.06);
    background: rgba(255,255,255,.03);
    padding: 14px 15px;
    border-radius: 16px;
}

.info-row span,
.support-item span {
    color: var(--muted);
    font-size: .9rem;
}

.info-row strong,
.support-item strong {
    font-size: .95rem;
    text-align: left;
}

/* =========================
   Progress
========================= */
.progress-wrap {
    margin-top: 6px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.05);
}

.progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
    font-size: .88rem;
}

.progress-meta span {
    color: var(--muted);
}

.progress-bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,.08);
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--success), #34d399);
    box-shadow: 0 0 20px rgba(34,197,94,.3);
}

.progress-fill.expired {
    background: linear-gradient(90deg, var(--danger), #fb7185);
    box-shadow: 0 0 20px rgba(239,68,68,.3);
}

/* =========================
   Support
========================= */
.support-box {
    display: grid;
    gap: 12px;
}

.support-actions {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

/* =========================
   Admin Quick Links
========================= */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.quick-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    transition: var(--transition);
    min-height: 72px;
}

.quick-link:hover {
    transform: translateY(-4px);
    border-color: rgba(79,140,255,.22);
    background: rgba(79,140,255,.08);
}

.quick-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.06);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.notification-link {
    overflow: visible;
}

.notif-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    box-shadow: 0 8px 18px rgba(239,68,68,.28);
}

/* =========================
   Nav Tiles
========================= */
.nav-tile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.nav-tile {
    padding: 15px 14px;
    border-radius: 16px;
    text-align: center;
    font-weight: 700;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    transition: var(--transition);
}

.nav-tile:hover {
    transform: translateY(-3px);
    background: rgba(79,140,255,.09);
    border-color: rgba(79,140,255,.22);
}

.nav-tile.danger {
    color: #ffb4be;
    border-color: rgba(239,68,68,.16);
}

.nav-tile.danger:hover {
    background: rgba(239,68,68,.10);
    border-color: rgba(239,68,68,.28);
}

/* =========================
   Mobile Bottom Nav
========================= */
.bottom-mobile-nav {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: min(94%, 500px);
    z-index: 20;
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(11, 18, 32, 0.88);
    border: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0,0,0,.28);
}

.bottom-mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 6px;
    border-radius: 16px;
    color: #e9f0fb;
    transition: var(--transition);
}

.bottom-mobile-nav a:hover {
    background: rgba(79,140,255,.10);
}

.bottom-mobile-nav span {
    font-size: 1.1rem;
}

.bottom-mobile-nav small {
    font-size: .7rem;
    color: var(--muted);
}

/* =========================
   Utility
========================= */
.text-success { color: #4ade80; }
.text-danger { color: #fb7185; }

/* =========================
   Responsive
========================= */
@media (max-width: 1100px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .user-layout,
    .admin-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        width: min(96%, 96%);
        padding-top: 16px;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
        text-align: right;
        padding: 16px;
    }

    .topbar-left,
    .topbar-right {
        width: 100%;
    }

    .user-chip {
        width: 100%;
        justify-content: flex-start;
    }

    .brand-box {
        align-items: center;
    }

    .hero {
        padding: 18px;
        border-radius: 24px;
    }

    .hero h2 {
        font-size: 1.25rem;
    }

    .hero p {
        font-size: .9rem;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions-grid,
    .nav-tile-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .info-row,
    .support-item,
    .mini-stat {
        align-items: flex-start;
        flex-direction: column;
    }

    .bottom-mobile-nav {
        display: grid;
    }
}

@media (max-width: 480px) {
    .brand-info h1 {
        font-size: 1rem;
    }

    .brand-info p {
        font-size: .8rem;
    }

    .brand-logo-wrap {
        width: 54px;
        height: 54px;
    }

    .brand-logo {
        width: 36px;
        height: 36px;
    }

    .hero-actions {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
    }
}


.profile-grid {
    grid-template-columns: 1.15fr .85fr;
    margin-bottom: 24px;
}

.modern-form {
    display: grid;
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #dbe7f8;
}

.form-control {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    color: var(--text);
    padding: 14px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: rgba(79,140,255,.45);
    box-shadow: 0 0 0 4px rgba(79,140,255,.10);
    background: rgba(255,255,255,.06);
}

.form-control::placeholder {
    color: #7f91ad;
}

.disabled-input {
    opacity: .72;
    cursor: not-allowed;
}

.glass-soft {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 18px;
    padding: 14px;
}

.password-strength {
    margin-top: -4px;
}

.strength-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    font-size: .88rem;
}

.strength-label span:first-child {
    color: var(--muted);
}

.strength-bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,.08);
}

.strength-fill {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: #ef4444;
    transition: width .25s ease, background .25s ease;
}

.guide-text {
    color: var(--muted);
    font-size: .92rem;
    margin-bottom: 16px;
    line-height: 1.9;
}

.modern-requirements {
    list-style: none;
    display: grid;
    gap: 12px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 15px;
    border-radius: 16px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.05);
    color: #c7d3e3;
    transition: var(--transition);
}

.requirement-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.06);
    color: #cbd5e1;
    font-weight: 900;
}

.requirement-item.valid {
    border-color: rgba(34,197,94,.20);
    background: rgba(34,197,94,.08);
    color: #dcfce7;
}

.requirement-item.valid .requirement-icon {
    background: rgba(34,197,94,.18);
    color: #4ade80;
}

.alert-glass {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 700;
}

.alert-glass.success,
.alert-glass.ok,
.alert-glass.alert-success {
    background: rgba(34,197,94,.10);
    color: #86efac;
    border-color: rgba(34,197,94,.16);
}

.alert-glass.error,
.alert-glass.danger,
.alert-glass.alert-danger {
    background: rgba(239,68,68,.10);
    color: #fca5a5;
    border-color: rgba(239,68,68,.16);
}

.alert-glass.warning {
    background: rgba(245,158,11,.10);
    color: #fcd34d;
    border-color: rgba(245,158,11,.16);
}


.btn-danger-solid {
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 12px 25px rgba(239,68,68,.22);
}

.btn-danger-solid:hover {
    filter: brightness(1.05);
}

.single-license-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .profile-page .topbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .single-license-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .profile-page .topbar-actions {
        grid-template-columns: 1fr;
    }
}
.contact-page .topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.contact-grid {
    grid-template-columns: 1.15fr .85fr;
    margin-bottom: 24px;
}

.modern-form {
    display: grid;
    gap: 16px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #dbe7f8;
}

.form-control {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    color: var(--text);
    padding: 14px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: rgba(79,140,255,.45);
    box-shadow: 0 0 0 4px rgba(79,140,255,.10);
    background: rgba(255,255,255,.06);
}

.form-control::placeholder {
    color: #7f91ad;
}

.form-textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.9;
}

.glass-soft {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 18px;
    padding: 14px;
}

.guide-text {
    color: var(--muted);
    font-size: .92rem;
    margin-bottom: 16px;
    line-height: 1.95;
}

.modern-requirements {
    list-style: none;
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 15px;
    border-radius: 16px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.05);
    color: #c7d3e3;
    transition: var(--transition);
}

.requirement-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.06);
    color: #cbd5e1;
    font-weight: 900;
}

.support-info-box {
    margin-top: 8px;
}

.support-info-title {
    font-size: .95rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}

.support-info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
    color: #d6deea;
    font-size: .92rem;
}

.support-info-row:last-child {
    border-bottom: none;
}

.captcha-modern-box {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
    align-items: stretch;
}

.captcha-image-wrap {
    display: grid;
    gap: 10px;
}

.captcha-img {
    width: 100%;
    height: 52px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    cursor: pointer;
}

.captcha-refresh-btn {
    min-height: 44px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.05);
    color: #e5edf8;
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    transition: var(--transition);
}

.captcha-refresh-btn:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.14);
}

.alert-glass {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 700;
}

.alert-glass.success,
.alert-glass.ok {
    background: rgba(34,197,94,.10);
    color: #86efac;
    border-color: rgba(34,197,94,.16);
}

.alert-glass.error,
.alert-glass.danger {
    background: rgba(239,68,68,.10);
    color: #fca5a5;
    border-color: rgba(239,68,68,.16);
}

.alert-glass.warning {
    background: rgba(245,158,11,.10);
    color: #fcd34d;
    border-color: rgba(245,158,11,.16);
}

@media (max-width: 1100px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-grid.two-col {
        grid-template-columns: 1fr;
    }

    .captcha-modern-box {
        grid-template-columns: 1fr;
    }

    .support-info-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .contact-page .topbar-actions {
        width: 100%;
    }

    .contact-page .topbar-actions .btn {
        width: 100%;
    }
}
.members-page .topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.members-grid {
    grid-template-columns: 1fr;
    margin-bottom: 28px;
}

.full-span {
    grid-column: 1 / -1;
}

.section-head-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.section-tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.modern-table-wrap {
    overflow-x: auto;
    border-radius: 20px;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
}

.modern-table thead th {
    text-align: right;
    padding: 16px 14px;
    color: #dbe7f8;
    font-size: .88rem;
    font-weight: 800;
    background: rgba(255,255,255,.04);
    border-bottom: 1px solid rgba(255,255,255,.08);
    white-space: nowrap;
}

.modern-table tbody td {
    padding: 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    vertical-align: middle;
    color: #e5edf8;
}

.modern-table tbody tr {
    transition: var(--transition);
}

.modern-table tbody tr:hover {
    background: rgba(255,255,255,.03);
}

.modern-table tbody tr:last-child td {
    border-bottom: none;
}

.td-company .company-name {
    font-weight: 800;
    color: #fff;
}

.td-muted {
    color: var(--muted);
}

.license-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(79,140,255,.12);
    border: 1px solid rgba(79,140,255,.22);
    color: #cfe1ff;
    font-family: monospace;
    font-size: .88rem;
    cursor: pointer;
    transition: var(--transition);
    user-select: all;
}

.license-chip:hover {
    background: rgba(79,140,255,.18);
    border-color: rgba(79,140,255,.35);
}

.qr-action-btn {
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.05);
    color: #e5edf8;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    transition: var(--transition);
}

.qr-action-btn:hover {
    background: rgba(255,255,255,.08);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-pill.active {
    color: #bbf7d0;
    background: rgba(34,197,94,.12);
    border: 1px solid rgba(34,197,94,.22);
}

.status-pill.expired {
    color: #fecaca;
    background: rgba(239,68,68,.12);
    border: 1px solid rgba(239,68,68,.22);
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.inline-form {
    display: inline-flex;
}

.btn-xs,
.btn-sm {
    min-height: 38px;
    padding: 8px 12px;
    font-size: .82rem;
}

.btn-sms {
    min-height: 38px;
    padding: 8px 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: #fff;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(6,182,212,.20);
    transition: var(--transition);
}

.btn-sms:hover {
    filter: brightness(1.05);
}

.empty-state-cell {
    text-align: center;
    color: var(--muted);
    padding: 28px !important;
}

.floating-notification {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    min-width: 240px;
    max-width: calc(100% - 32px);
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(15,23,42,.92);
    color: #fff;
    box-shadow: 0 15px 40px rgba(0,0,0,.28);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: .25s ease;
    text-align: center;
    font-weight: 800;
    border: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.floating-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(2,6,23,.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-panel {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.modal-sm {
    max-width: 380px;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-head h3 {
    margin: 0;
}

.modal-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.05);
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: rgba(255,255,255,.08);
}

.modal-body {
    margin-bottom: 18px;
}

.center-content {
    text-align: center;
}

.qr-box {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 220px;
    margin-bottom: 12px;
}

.qr-box img,
.qr-box canvas {
    background: #fff;
    padding: 10px;
    border-radius: 16px;
}

.qr-label {
    margin-bottom: 0;
    font-family: monospace;
    color: var(--muted);
    font-size: 0.85rem;
    word-break: break-word;
}

.vertical-actions {
    display: grid;
    gap: 10px;
}

.modal-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
}

.confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-yes,
.btn-no {
    min-height: 46px;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}

.btn-yes {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 12px 25px rgba(239,68,68,.22);
}

.btn-no {
    background: rgba(255,255,255,.06);
    color: #e5edf8;
    border: 1px solid rgba(255,255,255,.08);
}

.btn-no:hover,
.btn-yes:hover {
    filter: brightness(1.05);
}

.alert-glass {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 700;
}

.alert-glass.success,
.alert-glass.ok {
    background: rgba(34,197,94,.10);
    color: #86efac;
    border-color: rgba(34,197,94,.16);
}

.alert-glass.error,
.alert-glass.danger {
    background: rgba(239,68,68,.10);
    color: #fca5a5;
    border-color: rgba(239,68,68,.16);
}

.alert-glass.warning {
    background: rgba(245,158,11,.10);
    color: #fcd34d;
    border-color: rgba(245,158,11,.16);
}

@media (max-width: 768px) {
    .members-page .topbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .confirm-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .members-page .topbar-actions {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 14px;
    }

    .modal-panel {
        max-width: 100%;
    }
}
.portfolio-page .container {
    position: relative;
    z-index: 1;
}

.portfolio-page .topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.portfolio-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin-bottom: 28px;
}

.portfolio-sidebar,
.portfolio-content {
    min-width: 0;
}

.sidebar-card {
    padding: 22px;
    margin-bottom: 20px;
}

.modern-form {
    display: grid;
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #dbe7f8;
}

.form-control {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    color: var(--text);
    padding: 14px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: rgba(79,140,255,.45);
    box-shadow: 0 0 0 4px rgba(79,140,255,.10);
    background: rgba(255,255,255,.06);
}

.form-control::placeholder {
    color: #7f91ad;
}

.full-btn {
    width: 100%;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    color: #dbe7f8;
    font-size: 0.88rem;
}

.modern-category-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.05);
    color: #dbe7f8;
    text-decoration: none;
    transition: var(--transition);
}

.category-link:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.10);
}

.category-link.active {
    background: rgba(79,140,255,.12);
    border-color: rgba(79,140,255,.22);
    color: #fff;
}

.cat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    color: #cfe1ff;
    font-size: 0.78rem;
    font-weight: 800;
}

.modern-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.portfolio-card {
    overflow: hidden;
    padding: 0;
}

.modern-post-thumb {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: rgba(255,255,255,.04);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.modern-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9fb0c9;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(79,140,255,.10), rgba(168,85,247,.08));
}

.post-body {
    padding: 18px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.meta-item,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.meta-item {
    background: rgba(255,255,255,.05);
    color: #c7d3e3;
    border: 1px solid rgba(255,255,255,.06);
}

.meta-pill.category {
    background: rgba(79,140,255,.12);
    color: #cfe1ff;
    border: 1px solid rgba(79,140,255,.18);
}

.meta-pill.pinned {
    background: rgba(245,158,11,.12);
    color: #fde68a;
    border: 1px solid rgba(245,158,11,.18);
}

.post-title {
    margin: 0 0 12px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-title a {
    color: #fff;
    text-decoration: none;
}

.post-title a:hover {
    color: #cfe1ff;
}

.post-excerpt {
    color: var(--muted);
    line-height: 1.95;
    font-size: 0.93rem;
    margin-bottom: 16px;
}

.post-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f8cff, #6d5dfc);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 12px 25px rgba(79,140,255,.18);
    transition: var(--transition);
}

.read-more-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.empty-state-card {
    padding: 28px;
    text-align: center;
}

.empty-state-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #fff;
}

.empty-state-card p {
    color: var(--muted);
    margin-bottom: 16px;
}

.pagination-wrap {
    margin-top: 26px;
    display: flex;
    justify-content: center;
}

.modern-pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.modern-pagination li a,
.modern-pagination li span {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 800;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    color: #e5edf8;
}

.modern-pagination li.active span {
    background: linear-gradient(135deg, #4f8cff, #6d5dfc);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 25px rgba(79,140,255,.18);
}

.portfolio-footer {
    padding: 18px 22px;
    text-align: center;
    margin-bottom: 24px;
}

.portfolio-footer p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 1100px) {
    .portfolio-layout {
        grid-template-columns: 1fr;
    }

    .modern-posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .portfolio-page .topbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .modern-post-thumb {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .portfolio-page .topbar-actions {
        grid-template-columns: 1fr;
    }

    .sidebar-card,
    .post-body,
    .empty-state-card {
        padding: 16px;
    }

    .modern-post-thumb {
        height: 200px;
    }

    .meta-row {
        gap: 6px;
    }
}
.sms-page .container {
    position: relative;
    z-index: 1;
}

.sms-page .topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sms-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
    margin-bottom: 28px;
}

.sms-main,
.sms-sidebar {
    min-width: 0;
}

.sms-form-card,
.sidebar-card {
    padding: 24px;
}

.sidebar-card + .sidebar-card {
    margin-top: 20px;
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.section-head h3 {
    margin: 0;
    color: #fff;
    font-size: 1.08rem;
}

.section-head span {
    color: var(--muted);
    font-size: 0.88rem;
}

.glass-alert {
    margin-bottom: 18px;
    border-radius: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(16px);
}

.glass-alert.success,
.glass-alert.ok {
    background: rgba(34,197,94,.12);
    border-color: rgba(34,197,94,.22);
    color: #dcfce7;
}

.glass-alert.error,
.glass-alert.danger {
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.22);
    color: #fee2e2;
}

.glass-alert.warning {
    background: rgba(245,158,11,.12);
    border-color: rgba(245,158,11,.22);
    color: #fef3c7;
}

.modern-form {
    display: grid;
    gap: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #dbe7f8;
}

.form-control {
    width: 100%;
    min-height: 54px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    color: var(--text);
    padding: 14px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: rgba(79,140,255,.45);
    box-shadow: 0 0 0 4px rgba(79,140,255,.10);
    background: rgba(255,255,255,.06);
}

.form-control::placeholder {
    color: #7f91ad;
}

.modern-template-list {
    display: grid;
    gap: 14px;
}

.modern-template-item {
    position: relative;
    display: block;
    cursor: pointer;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    transition: var(--transition);
    overflow: hidden;
}

.modern-template-item:hover {
    border-color: rgba(79,140,255,.22);
    background: rgba(255,255,255,.06);
    transform: translateY(-1px);
}

.modern-template-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.template-content {
    padding: 18px;
}

.template-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.template-title {
    font-size: 0.96rem;
    font-weight: 800;
    color: #fff;
}

.template-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(79,140,255,.12);
    border: 1px solid rgba(79,140,255,.18);
    color: #cfe1ff;
    font-size: 0.78rem;
    font-weight: 800;
}

.template-desc {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.9;
}

.modern-template-item input[type="radio"]:checked + .template-content {
    background: linear-gradient(135deg, rgba(79,140,255,.10), rgba(109,93,252,.08));
}

.modern-template-item:has(input[type="radio"]:checked) {
    border-color: rgba(79,140,255,.35);
    box-shadow: 0 16px 35px rgba(79,140,255,.10);
}

.form-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 4px;
}

.btn-lg {
    min-height: 50px;
    padding: 12px 22px;
    font-weight: 800;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.info-list li {
    position: relative;
    padding-right: 18px;
    color: var(--muted);
    line-height: 1.9;
    font-size: 0.92rem;
}

.info-list li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 11px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f8cff, #6d5dfc);
    box-shadow: 0 0 0 4px rgba(79,140,255,.10);
}

.summary-list {
    display: grid;
    gap: 12px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
}

.summary-item span {
    color: #9fb0c9;
    font-size: 0.84rem;
}

.summary-item strong {
    color: #fff;
    font-size: 0.96rem;
    word-break: break-word;
}

@media (max-width: 1100px) {
    .sms-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sms-page .topbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .template-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .sms-page .topbar-actions {
        grid-template-columns: 1fr;
    }

    .sms-form-card,
    .sidebar-card {
        padding: 16px;
    }

    .template-content {
        padding: 16px;
    }
}
/* =========================
   HERO SYSTEM MEMBERS PAGE
   Unique Prefix: hsm-
   ========================= */

.hsm-members-page {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(79, 140, 255, 0.18), transparent 30%),
        radial-gradient(circle at bottom left, rgba(109, 93, 252, 0.16), transparent 28%),
        linear-gradient(135deg, #0a0f1f 0%, #0f172a 55%, #111827 100%);
    color: #e5eefc;
    position: relative;
    overflow-x: hidden;
    font-family: inherit;
}

.hsm-members-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 15% 20%, rgba(59, 130, 246, 0.14), transparent 20%),
        radial-gradient(circle at 85% 75%, rgba(168, 85, 247, 0.12), transparent 24%);
    z-index: 0;
}

.hsm-page-shell {
    position: relative;
    z-index: 1;
    max-width: 1380px;
    margin: 0 auto;
    padding: 24px 18px 100px;
}

/* Topbar */
.hsm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    margin-bottom: 22px;
}

.hsm-topbar-right,
.hsm-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hsm-brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hsm-brand-logo-wrap {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
}

.hsm-brand-logo {
    max-width: 34px;
    height: auto;
    display: block;
}

.hsm-brand-meta h1 {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 900;
    color: #fff;
}

.hsm-brand-meta p {
    margin: 0;
    color: #9fb0c9;
    font-size: 0.92rem;
    line-height: 1.8;
}

/* Alert */
.hsm-alert {
    padding: 14px 16px;
    border-radius: 18px;
    margin-bottom: 18px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    line-height: 1.9;
}

.hsm-alert.success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.26);
    color: #dcfce7;
}

.hsm-alert.error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.26);
    color: #fee2e2;
}

.hsm-alert.warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.26);
    color: #fef3c7;
}

/* Card */
.hsm-members-card {
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 24px 60px rgba(0,0,0,0.30);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
}

.hsm-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.hsm-section-title h2 {
    margin: 0 0 6px;
    font-size: 1.18rem;
    font-weight: 900;
    color: #fff;
}

.hsm-section-title p {
    margin: 0;
    color: #95a7c2;
    font-size: 0.9rem;
}

.hsm-section-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.hsm-btn {
    appearance: none;
    border: 0;
    outline: 0;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1;
    transition: all 0.22s ease;
    white-space: nowrap;
}

.hsm-btn:hover {
    transform: translateY(-1px);
}

.hsm-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    box-shadow: 0 12px 26px rgba(59, 130, 246, 0.28);
}

.hsm-btn-primary:hover {
    box-shadow: 0 16px 32px rgba(59, 130, 246, 0.34);
}

.hsm-btn-muted {
    background: rgba(255,255,255,0.06);
    color: #dbeafe;
    border: 1px solid rgba(255,255,255,0.08);
}

.hsm-btn-danger {
    background: rgba(239,68,68,0.14);
    color: #fee2e2;
    border: 1px solid rgba(239,68,68,0.22);
}

.hsm-btn-sm {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.84rem;
}

.hsm-btn-xs {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.8rem;
}

/* Table */
.hsm-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.hsm-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

.hsm-table thead th {
    text-align: right;
    padding: 16px 18px;
    background: rgba(255,255,255,0.03);
    color: #bfd0ea;
    font-size: 0.83rem;
    font-weight: 800;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
}

.hsm-table tbody td {
    padding: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    vertical-align: middle;
    color: #edf4ff;
    font-size: 0.92rem;
}

.hsm-table tbody tr {
    transition: background 0.22s ease;
}

.hsm-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

.hsm-company-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hsm-company-name {
    font-weight: 800;
    color: #fff;
    line-height: 1.8;
}

.hsm-license-chip {
    border: 0;
    cursor: pointer;
    background: rgba(59, 130, 246, 0.12);
    color: #cfe3ff;
    border: 1px solid rgba(59, 130, 246, 0.20);
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1;
    direction: ltr;
    transition: all 0.2s ease;
}

.hsm-license-chip:hover {
    background: rgba(59, 130, 246, 0.18);
}

.hsm-qr-btn {
    border: 0;
    cursor: pointer;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    background: rgba(168, 85, 247, 0.16);
    color: #f3e8ff;
    font-weight: 800;
    transition: all 0.2s ease;
}

.hsm-qr-btn:hover {
    background: rgba(168, 85, 247, 0.24);
}

.hsm-date-text {
    color: #c6d4e9;
    white-space: nowrap;
}

.hsm-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.hsm-status-badge.is-active {
    background: rgba(34, 197, 94, 0.14);
    color: #dcfce7;
    border: 1px solid rgba(34, 197, 94, 0.24);
}

.hsm-status-badge.is-expired {
    background: rgba(239, 68, 68, 0.14);
    color: #fee2e2;
    border: 1px solid rgba(239, 68, 68, 0.24);
}

.hsm-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hsm-inline-form {
    display: inline-flex;
    margin: 0;
}

.hsm-btn-sms {
    appearance: none;
    border: 1px solid rgba(245, 158, 11, 0.24);
    background: rgba(245, 158, 11, 0.14);
    color: #fde68a;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 800;
    transition: all 0.2s ease;
}

.hsm-btn-sms:hover {
    background: rgba(245, 158, 11, 0.22);
}

.hsm-empty-cell {
    text-align: center;
    padding: 30px !important;
    color: #9fb0c9 !important;
    font-weight: 700;
}

/* Modal */
.hsm-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.hsm-modal-box {
    width: 100%;
    max-width: 420px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 30px 70px rgba(0,0,0,0.38);
    padding: 20px;
}

.hsm-modal-box-sm {
    max-width: 360px;
}

.hsm-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.hsm-modal-head h3 {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
}

.hsm-modal-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
}

.hsm-modal-body {
    padding: 6px 0 14px;
}

.hsm-modal-desc {
    margin: 0;
    color: #cddaf0;
    line-height: 1.9;
}

.hsm-modal-actions {
    display: flex;
    gap: 10px;
}

.hsm-modal-actions-col {
    flex-direction: column;
}

.hsm-center {
    text-align: center;
}

.hsm-qr-frame {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 18px;
    padding: 16px;
}

.hsm-qr-text {
    margin: 12px 0 0;
    color: #aebed6;
    font-size: 0.88rem;
    direction: ltr;
}

.hsm-confirm-row {
    display: flex;
    gap: 10px;
}

.hsm-confirm-yes,
.hsm-confirm-no {
    flex: 1;
    min-height: 44px;
    border-radius: 14px;
    border: 0;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.9rem;
}

.hsm-confirm-yes {
    background: #dc2626;
    color: #fff;
}

.hsm-confirm-no {
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
}

.hsm-text-danger {
    color: #fca5a5 !important;
}

/* Notification */
.hsm-float-note {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(15, 23, 42, 0.94);
    color: #fff;
    border: 1px solid rgba(59,130,246,0.24);
    box-shadow: 0 20px 50px rgba(0,0,0,0.30);
    padding: 12px 18px;
    border-radius: 14px;
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    font-size: 0.88rem;
    font-weight: 800;
}

.hsm-float-note.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Mobile Nav */
.hsm-mobile-nav {
    position: fixed;
    right: 14px;
    left: 14px;
    bottom: 14px;
    z-index: 900;
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.28);
}

.hsm-mobile-nav a {
    text-decoration: none;
    color: #b8c7da;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 56px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 800;
    transition: all 0.2s ease;
}

.hsm-mobile-nav a.is-active {
    background: rgba(59, 130, 246, 0.16);
    color: #fff;
}

.hsm-mobile-nav a span {
    font-size: 1.1rem;
}

.hsm-mobile-nav a small {
    font-size: 0.7rem;
}

/* Responsive Table */
@media (max-width: 1100px) {
    .hsm-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .hsm-topbar-left {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 820px) {
    .hsm-page-shell {
        padding: 16px 12px 100px;
    }

    .hsm-brand-meta h1 {
        font-size: 1.1rem;
    }

    .hsm-brand-meta p {
        font-size: 0.84rem;
    }

    .hsm-section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .hsm-table,
    .hsm-table thead,
    .hsm-table tbody,
    .hsm-table th,
    .hsm-table td,
    .hsm-table tr {
        display: block;
    }

    .hsm-table {
        min-width: 100%;
    }

    .hsm-table thead {
        display: none;
    }

    .hsm-table tbody {
        display: grid;
        gap: 14px;
        padding: 14px;
    }

    .hsm-table tbody tr {
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.07);
        border-radius: 20px;
        padding: 14px;
    }

    .hsm-table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 10px 0;
        border-bottom: 1px dashed rgba(255,255,255,0.06);
        text-align: left;
    }

    .hsm-table tbody td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .hsm-table tbody td::before {
        content: attr(data-label);
        color: #8ea3c2;
        font-size: 0.8rem;
        font-weight: 800;
        text-align: right;
        margin-left: 10px;
        flex: 0 0 92px;
    }

    .hsm-company-cell,
    .hsm-action-group {
        width: 100%;
        justify-content: flex-end;
    }

    .hsm-action-group {
        flex-wrap: wrap;
    }

    .hsm-mobile-nav {
        display: grid;
    }
}

@media (max-width: 560px) {
    .hsm-topbar {
        padding: 18px;
        border-radius: 20px;
    }

    .hsm-members-card {
        border-radius: 22px;
    }

    .hsm-brand-block {
        align-items: flex-start;
    }

    .hsm-brand-logo-wrap {
        width: 50px;
        height: 50px;
    }

    .hsm-modal-box {
        padding: 16px;
        border-radius: 20px;
    }

    .hsm-confirm-row {
        flex-direction: column;
    }
}

/* Members Cards + Search */
.hsm-members-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.hsm-members-head h3 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1.1rem;
}

.hsm-members-head span {
    color: #94a3b8;
    font-size: 0.9rem;
}

.hsm-members-searchbar {
    margin-bottom: 22px;
}

.hsm-members-searchbox {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 12px;
}

.hsm-members-searchinput {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #e5eefc;
    padding: 0 16px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: 0.2s ease;
}

.hsm-members-searchinput:focus {
    border-color: rgba(79, 140, 255, 0.4);
    box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.10);
}

.hsm-members-searchinput::placeholder {
    color: #7f91ad;
}

.hsm-members-searchbtn {
    min-height: 52px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #4f8cff, #6d5dfc);
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: 0 14px 30px rgba(79, 140, 255, 0.20);
}

.hsm-members-searchbtn:hover {
    transform: translateY(-1px);
}

.hsm-members-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.hsm-members-usercard {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: 0.2s ease;
}

.hsm-members-usercard:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 140, 255, 0.18);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.16);
}

.hsm-members-usercard-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.hsm-members-company {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1rem;
    line-height: 1.8;
}

.hsm-members-manager {
    margin: 0;
    color: #94a3b8;
    font-size: 0.88rem;
}

.hsm-members-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.hsm-members-status.is-active {
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.22);
    color: #dcfce7;
}

.hsm-members-status.is-expired {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #fee2e2;
}

.hsm-members-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hsm-members-meta-item {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hsm-members-meta-item-full {
    grid-column: 1 / -1;
}

.hsm-members-meta-item span {
    color: #8ea3c2;
    font-size: 0.78rem;
    font-weight: 700;
}

.hsm-members-meta-item strong {
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.8;
    word-break: break-word;
}

.hsm-members-license {
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(79, 140, 255, 0.12);
    border: 1px solid rgba(79, 140, 255, 0.20);
    color: #dbeafe;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    direction: ltr;
    text-align: left;
}

.hsm-members-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hsm-members-qrbtn {
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: rgba(168, 85, 247, 0.14);
    color: #f3e8ff;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.hsm-members-empty {
    padding: 26px 18px;
    text-align: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
    font-weight: 700;
}

@media (max-width: 1200px) {
    .hsm-members-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .hsm-members-searchbox {
        grid-template-columns: 1fr;
    }

    .hsm-members-card-grid {
        grid-template-columns: 1fr;
    }

    .hsm-members-meta {
        grid-template-columns: 1fr;
    }

    .hsm-members-usercard-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .hsm-members-head {
        flex-direction: column;
        align-items: stretch;
    }
}
 
 
 /* Contact Messages Grid Layout */
.hsm-messages-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.hsm-messages-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* افکت متمایز کننده برای پیام‌های جدید و خوانده‌نشده */
.hsm-messages-card.is-unread {
    border-left: 4px solid #4f8cff;
    background: rgba(79, 140, 255, 0.05);
}

.hsm-messages-card:hover {
    transform: translateY(-3px);
    border-color: rgba(79, 140, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.hsm-messages-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.hsm-messages-sender {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hsm-messages-name {
    margin: 0;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
}

.hsm-messages-date {
    font-size: 0.8rem;
    color: #94a3b8;
}

.hsm-messages-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
}

.hsm-messages-badge.badge-new {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.hsm-messages-badge.badge-old {
    background: rgba(16, 185, 129, 0.15);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.hsm-messages-subject {
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.6;
}

.hsm-messages-subject strong {
    color: #94a3b8;
    margin-left: 4px;
}

.hsm-messages-body-preview {
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.7;
    word-break: break-all;
}

.hsm-messages-footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.78rem;
    color: #64748b;
}

.hsm-messages-action-indicator {
    color: #4f8cff;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.hsm-messages-card:hover .hsm-messages-action-indicator {
    transform: translateX(-4px);
}

/* Modal Internal Elements */
.hsm-modal-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.hsm-modal-detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.hsm-modal-detail-item .key {
    font-size: 0.75rem;
    color: #64748b;
}

.hsm-modal-detail-item .val {
    font-size: 0.88rem;
    color: #ffffff;
}

.hsm-modal-text-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.hsm-modal-text-title {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 700;
}

.hsm-modal-message-box {
    padding: 16px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    font-size: 0.92rem;
    line-height: 1.8;
    min-height: 120px;
    max-height: 250px;
    overflow-y: auto;
    white-space: pre-line;
}

.hsm-modal-form-row {
    display: flex;
    gap: 10px;
}

/* Responsiveness for small screens */
@media (max-width: 992px) {
    .hsm-messages-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hsm-modal-details-grid {
        grid-template-columns: 1fr;
    }
}
   
   
   
   
/* ==========================================================================
   HSM Isolation Modal - Contact Messages (No Conflict & Mobile Responsive)
   ========================================================================== */

/* Overlay ایزوله شده */
.hsm-msg-modal {
    position: fixed;
    inset: 0;
    display: none; /* نمایش با JS به صورت flex تغییر می‌یابد */
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 99999; /* قرارگیری روی تمام المان‌ها */
    background: rgba(10, 10, 12, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* پنل اصلی مودال */
.hsm-msg-modal-panel {
    width: min(720px, 100%);
    max-height: 85vh;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* سربرگ مودال */
.hsm-msg-modal-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hsm-msg-modal-head h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    max-width: calc(100% - 40px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* دکمه بستن در هدر */
.hsm-msg-modal-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.hsm-msg-modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* بدنه مودال با اسکرول مستقل */
.hsm-msg-modal-body {
    flex: 1 1 auto;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* بخش عملیات پایین مودال */
.hsm-msg-modal-actions {
    flex: 0 0 auto;
    padding: 16px 20px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ساختار گرید مشخصات فرستنده پیام */
.hsm-modal-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.hsm-modal-detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.hsm-modal-detail-item .key {
    font-size: 0.75rem;
    color: #94a3b8;
}

.hsm-modal-detail-item .val {
    font-size: 0.88rem;
    color: #ffffff;
}

.hsm-modal-text-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.hsm-modal-text-title {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 700;
}

/* باکس پیام متنی */
.hsm-modal-message-box {
    padding: 16px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    font-size: 0.92rem;
    line-height: 1.8;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-line;
}

.hsm-modal-form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ==========================================
   ریسپانسیو ویژه موبایل (Mobile Bottom Sheet)
   ========================================== */
@media (max-width: 768px) {
    .hsm-msg-modal {
        padding: 0;
        align-items: flex-end; /* تبدیل به حالت کشویی پایین صفحه در موبایل */
    }

    .hsm-msg-modal-panel {
        width: 100%;
        max-height: 88vh;
        border-radius: 24px 24px 0 0; /* گرد شدن فقط در بالای مودال */
        border-bottom: none !important;
        animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .hsm-msg-modal-head h3 {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .hsm-modal-details-grid {
        grid-template-columns: 1fr; /* جزئیات تک‌ستونه */
        gap: 8px;
    }

    .hsm-modal-form-row {
        flex-direction: column;
        width: 100%;
    }

    .hsm-modal-form-row form {
        display: block !important;
        width: 100%;
    }

    .hsm-modal-form-row .btn,
    .hsm-msg-modal-actions .btn {
        width: 100% !important;
        display: block;
        text-align: center;
        box-sizing: border-box;
    }
}

/* انیمیشن کشویی برای موبایل */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}
/* مخفی کردن نوار اسکرول برای بدنه مودال */
.hsm-msg-modal-body::-webkit-scrollbar {
    display: none; /* برای کروم، سافاری و اپرا */
}
.hsm-msg-modal-body {
    -ms-overflow-style: none;  /* برای اینترنت اکسپلورر و اج قدیمی */
    scrollbar-width: none;  /* برای فایرفاکس */
}

/* مخفی کردن نوار اسکرول برای باکس پیام متنی */
.hsm-modal-message-box::-webkit-scrollbar {
    display: none; /* برای کروم، سافاری و اپرا */
}
.hsm-modal-message-box {
    -ms-overflow-style: none;  /* برای اینترنت اکسپلورر و اج */
    scrollbar-width: none;  /* برای فایرفاکس */
}
