/* ==============================================================================
   First National Bank — Relationship Manager (RM) Executive Suite Design System
   Color Palette: Electric Cyber Cyan (#00d2ff), Sapphire Azure (#0ea5e9 / #0284c7),
   Deep Oceanic Void (#020712 / #030d1e), Executive Amber (#f59e0b), Crisp White
   ============================================================================== */

@keyframes rmLogoPulse {
    0%, 100% {
        box-shadow:
            0 0 0 1.5px rgba(56, 130, 220, 0.35),
            0 0 16px rgba(56, 130, 220, 0.65),
            0 0 35px rgba(30, 80, 180, 0.4),
            0 0 65px rgba(20, 60, 150, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.95);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 0 2.5px rgba(56, 150, 255, 0.65),
            0 0 26px rgba(56, 150, 255, 0.9),
            0 0 52px rgba(30, 100, 220, 0.65),
            0 0 90px rgba(20, 80, 200, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 1);
        transform: scale(1.03);
    }
}

:root {
    --rm-bg-root: #020712;
    --rm-bg-surface: #030d1e;
    --rm-bg-card: rgba(2, 13, 30, 0.86);
    --rm-bg-input: rgba(3, 16, 36, 0.75);
    --rm-border: rgba(255, 255, 255, 0.1);
    --rm-border-focus: #00d2ff;
    --rm-primary: #00d2ff;
    --rm-primary-hover: #38bdf8;
    --rm-primary-strong: #00172e;
    --rm-secondary-strong: #002b52;
    --rm-accent: #f59e0b;
    --rm-accent-hover: #d97706;
    --rm-text-primary: #ffffff;
    --rm-text-secondary: #e2e8f0;
    --rm-text-muted: #94a3b8;
    --rm-success: #10b981;
    --rm-warning: #f59e0b;
    --rm-danger: #ef4444;
    --rm-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --rm-radius-sm: 8px;
    --rm-radius-md: 12px;
    --rm-radius-lg: 20px;
    --rm-radius-xl: 28px;
    --rm-shadow-card: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--rm-bg-root);
    background-image: 
        radial-gradient(ellipse 70% 50% at 50% -10%, rgba(0, 210, 255, 0.16), transparent 70%),
        radial-gradient(ellipse 50% 40% at 85% 20%, rgba(14, 165, 233, 0.12), transparent 65%),
        radial-gradient(circle at 10% 80%, rgba(2, 43, 82, 0.25), transparent 50%);
    color: var(--rm-text-primary);
    font-family: var(--rm-font);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── TOAST NOTIFICATIONS ── */
.rm-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.rm-toast {
    pointer-events: auto;
    background: #0f172a;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--rm-radius-md);
    padding: 12px 18px;
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: rmSlideIn 0.3s ease;
    min-width: 280px;
    max-width: 420px;
}

.rm-toast.success { border-color: var(--rm-success); }
.rm-toast.error { border-color: var(--rm-danger); }
.rm-toast.warning { border-color: var(--rm-warning); }

@keyframes rmSlideIn {
    from { transform: translateX(40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes malPillSweep {
    0%, 15% { transform: translateX(-140%); opacity: 0; }
    18% { opacity: 0.85; }
    38% { transform: translateX(260%); opacity: 0.85; }
    42%, 100% { transform: translateX(260%); opacity: 0; }
}

@keyframes logoPulse {
    0%, 100% {
        box-shadow: 0 0 24px rgba(0, 210, 255, 0.35);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 36px rgba(0, 210, 255, 0.55);
        transform: scale(1.02);
    }
}

@keyframes rmAuroraDrift1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.06); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes rmAuroraDrift2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40px, 30px) scale(0.95); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes rmCardGlowBreath {
    0%, 100% {
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 35px rgba(0, 210, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.12);
    }
    50% {
        box-shadow: 0 32px 80px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 55px rgba(0, 210, 255, 0.22);
        border-color: rgba(0, 210, 255, 0.35);
    }
}

/* ── DIALOGUE & CARD MOVING BEAM / BREATHING GLOW (mal.ai style) ── */
@keyframes dialogueBeamSweep {
    0% {
        transform: translateX(-120%);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        transform: translateX(380%);
        opacity: 0;
    }
}

@keyframes dialogueGlowBreath {
    0%, 100% {
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 20px rgba(0, 210, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.12);
    }
    50% {
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.88), inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 38px rgba(0, 210, 255, 0.22);
        border-color: rgba(0, 210, 255, 0.38);
    }
}

/* ── 1. RM LOGIN SCREEN & AMBIENT AURORA ── */
.rm-login-wrap {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    z-index: 10000;
    background: var(--rm-bg-root, #020712);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.rm-aurora-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.rm-aurora-glow {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    pointer-events: none;
}

.rm-aurora-glow.glow-1 {
    width: 750px;
    height: 750px;
    top: -150px;
    left: 10%;
    background: radial-gradient(50% 50% at 50% 50%, rgba(0, 210, 255, 0.28) 0%, rgba(2, 132, 199, 0.16) 45%, transparent 75%);
    filter: blur(65px);
    animation: rmAuroraDrift1 18s ease-in-out infinite alternate;
}

.rm-aurora-glow.glow-2 {
    width: 900px;
    height: 900px;
    bottom: -200px;
    right: 5%;
    background: radial-gradient(50% 50% at 50% 50%, rgba(14, 165, 233, 0.24) 0%, rgba(0, 23, 46, 0.25) 48%, transparent 75%);
    filter: blur(80px);
    animation: rmAuroraDrift2 22s ease-in-out infinite alternate;
}

.rm-aurora-glow.glow-3 {
    width: 550px;
    height: 550px;
    top: 40%;
    left: 45%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 65%);
    filter: blur(55px);
}

.rm-aurora-beam {
    position: absolute;
    width: 600px;
    height: 1800px;
    background: linear-gradient(180deg, rgba(0, 210, 255, 0.08) 0%, rgba(2, 132, 199, 0.04) 50%, transparent 100%);
    pointer-events: none;
    mix-blend-mode: plus-lighter;
}

.rm-aurora-beam.beam-1 {
    top: -400px;
    left: 20%;
    transform: rotate(35deg);
    opacity: 0.6;
}

.rm-aurora-beam.beam-2 {
    top: -200px;
    right: 15%;
    transform: rotate(-25deg);
    opacity: 0.5;
}

.rm-grid-sheen {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.35;
    mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 80%);
    pointer-events: none;
}

.rm-login-card {
    background: rgba(2, 13, 30, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--rm-radius-xl, 28px);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85),
                inset 0 1px 0 rgba(255, 255, 255, 0.16),
                0 0 45px rgba(0, 210, 255, 0.12);
    width: 100%;
    max-width: 470px;
    height: 615px;
    min-height: 615px;
    padding: 44px 38px 36px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.12s ease-out;
    animation: rmCardGlowBreath 6s ease-in-out infinite;
    z-index: 10;
}

.rm-card-glare {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.65), rgba(255, 255, 255, 0.9), rgba(0, 210, 255, 0.65), transparent);
    pointer-events: none;
    z-index: 20;
}

.rm-login-header {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
}

.rm-logo-mark {
    width: 148px;
    height: 76px;
    background: #eef2f6;
    border: 1.5px solid rgba(56, 130, 220, 0.7);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-bottom: 16px;
    animation: rmLogoPulse 4s ease-in-out infinite;
    box-shadow:
        0 0 0 1.5px rgba(56, 130, 220, 0.35),
        0 0 18px rgba(56, 130, 220, 0.75),
        0 0 40px rgba(30, 90, 200, 0.45),
        0 0 70px rgba(20, 70, 170, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    overflow: hidden;
}

.rm-logo-mark .rm-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rm-login-title {
    font-size: 25px;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.25;
    letter-spacing: -0.6px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, #ffffff 55%, rgba(255, 255, 255, 0.65) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

.rm-login-sub {
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: -0.2px;
    margin: 0;
}

.rm-clearance-pill {
    display: inline-flex;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 11px;
    color: #93c5fd;
    font-weight: 600;
}

.rm-form-group {
    margin-bottom: 18px;
}

.rm-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88) !important;
    margin: 0 0 8px 0;
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.rm-req {
    color: var(--rm-danger);
}

.rm-hint {
    display: block;
    font-size: 11px;
    color: var(--rm-text-muted);
    margin-top: 5px;
}

.rm-input {
    width: 100%;
    height: 50px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: #ffffff !important;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 20px;
    box-sizing: border-box;
    transition: all 0.15s cubic-bezier(0.2, 0, 0, 1);
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.rm-input::placeholder {
    color: rgba(255, 255, 255, 0.35) !important;
}

.rm-input:focus {
    border-color: var(--rm-border-focus);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.25), 0 0 20px rgba(0, 210, 255, 0.15);
    background: rgba(255, 255, 255, 0.07) !important;
}

.rm-input.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25), 0 0 16px rgba(239, 68, 68, 0.2) !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

.rm-input.is-valid {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}

.crn-feedback {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
    border-radius: 8px;
    padding: 6px 10px;
    transition: all 0.2s ease;
}

.crn-feedback.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.crn-feedback.success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

.rm-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.rm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    text-decoration: none;
}

.rm-btn-block,
.btn-pill-sweep,
.btn-login,
.rm-login-card .rm-btn-primary,
#rmLoginForm .rm-btn-primary {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 10px;
}

.rm-btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 52px;
    padding: 0 28px;
    border-radius: 999px;
    border: 1px solid rgba(0, 210, 255, 0.55);
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: -0.2px;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(16.7deg, var(--rm-primary) 9.6%, var(--rm-secondary-strong) 36.3%, var(--rm-primary-strong) 92.5%);
    box-shadow: inset 0 -8px 20px rgba(0, 210, 255, 0.32), 0 8px 24px rgba(0, 23, 46, 0.6);
    transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1),
                border-color 0.3s cubic-bezier(0.2, 0, 0, 1),
                box-shadow 0.3s cubic-bezier(0.2, 0, 0, 1),
                filter 0.3s cubic-bezier(0.2, 0, 0, 1);
    font-family: var(--rm-font);
    text-decoration: none;
}

.rm-btn-primary::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: -1px 0 auto;
    height: 60%;
    background: radial-gradient(60% 100% at 50% 0, rgba(255, 255, 255, 0.4), transparent 70%);
    mix-blend-mode: color-dodge;
    pointer-events: none;
}

.rm-btn-primary::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: -140%;
    left: 0;
    width: 68px;
    height: 380%;
    background: #ffffff;
    filter: blur(36px);
    mix-blend-mode: overlay;
    opacity: 0.85;
    pointer-events: none;
    animation: malPillSweep 4.5s linear infinite;
    transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.rm-btn-primary:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 210, 255, 0.9);
    box-shadow: inset 0 -8px 20px #00d2ff, 0 12px 36px rgba(0, 210, 255, 0.45);
}

.rm-btn-primary:active {
    transform: translateY(1px) scale(0.99);
}

.rm-btn-primary .btn-label {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rm-btn-demo {
    margin-top: 10px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fef08a;
}

.rm-btn-demo:hover {
    background: rgba(245, 158, 11, 0.22);
    border-color: var(--rm-accent);
}

.rm-btn-ghost {
    background: transparent;
    border: 1px solid var(--rm-border);
    color: var(--rm-text-secondary);
}

.rm-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.rm-btn-copy {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    white-space: nowrap;
}

.rm-btn-copy:hover {
    background: rgba(56, 189, 248, 0.3);
    color: #ffffff;
}

.rm-btn-launch {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff;
    white-space: nowrap;
}

.rm-btn-launch:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.rm-alert-box {
    padding: 12px 16px;
    border-radius: var(--rm-radius-md);
    font-size: 13px;
    margin-bottom: 18px;
}

.rm-alert-box.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--rm-danger);
    color: #fca5a5;
}

.rm-login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    border-top: none;
    padding-top: 0;
}

.rm-login-footer a {
    color: #a5b4fc;
    text-decoration: none;
}

.rm-footer-portal-link {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.rm-footer-portal-link a:hover {
    color: #fef08a !important;
    text-decoration: underline;
}

/* ── 2. RM DASHBOARD ── */
.rm-dashboard-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    background: var(--rm-bg-body);
}

.rm-dashboard-wrap .rm-aurora-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.rm-navbar {
    height: 70px;
    background: rgba(2, 13, 30, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.rm-nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rm-logo-mark-sm {
    width: 76px;
    height: 40px;
    background: #eef2f6;
    border: 1.5px solid rgba(56, 130, 220, 0.6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 0 10px rgba(56, 130, 220, 0.55), 0 0 22px rgba(30, 80, 180, 0.3);
    flex-shrink: 0;
    overflow: hidden;
}

.rm-logo-mark-sm .rm-logo-img-sm {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rm-nav-brand {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    display: block;
}

.rm-nav-dept {
    font-size: 11.5px;
    color: var(--rm-accent);
    font-weight: 600;
}

.rm-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rm-user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--rm-border);
    border-radius: 30px;
}

.rm-avatar {
    font-size: 18px;
}

.rm-user-info {
    display: flex;
    flex-direction: column;
}

.rm-user-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff;
}

.rm-user-title {
    font-size: 10.5px;
    color: var(--rm-text-muted);
}

.rm-branch-badge {
    font-size: 12px;
    color: #93c5fd;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.rm-btn-nav {
    font-size: 12.5px;
    font-weight: 600;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 8px 14px;
    border-radius: var(--rm-radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
}

.rm-btn-nav:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #ffffff;
}

.rm-btn-signout {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 8px 14px;
    border-radius: var(--rm-radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 12.5px;
    transition: all 0.2s ease;
}

.rm-btn-signout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ffffff;
}

/* ── MAIN CONTENT ── */
.rm-content {
    flex: 1;
    max-width: 1720px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 40px;
}

@media (min-width: 1920px) {
    .rm-content {
        max-width: 1840px;
        padding: 36px 48px;
    }
}

.rm-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.rm-header-actions .rm-btn-primary {
    height: 44px;
    padding: 0 22px;
    font-size: 13.5px;
}

.rm-page-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.rm-page-sub {
    font-size: 13.5px;
    color: var(--rm-text-muted);
    margin-top: 4px;
}

/* ── KPI METRICS ── */
.rm-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.rm-metric-card {
    background: rgba(2, 13, 30, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--rm-radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: dialogueGlowBreath 6s ease-in-out infinite;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.3s cubic-bezier(0.2, 0, 0, 1), border-color 0.3s ease;
}

.rm-metric-card:hover {
    transform: translateY(-3px) scale(1.01);
    border-color: rgba(0, 210, 255, 0.45);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.75), 0 0 32px rgba(0, 210, 255, 0.25);
}

.rm-metric-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 38%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.4) 20%, #00d2ff 50%, #ffffff 75%, #0ea5e9 90%, transparent 100%);
    box-shadow: 0 0 12px #00d2ff, 0 0 22px rgba(0, 210, 255, 0.7);
    animation: dialogueBeamSweep 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
    z-index: 5;
}

.rm-metric-card:nth-child(1)::after { animation-delay: 0s; }
.rm-metric-card:nth-child(2)::after { animation-delay: 1.25s; }
.rm-metric-card:nth-child(3)::after { animation-delay: 2.5s; }
.rm-metric-card:nth-child(4)::after { animation-delay: 3.75s; }

.rm-metric-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.rm-metric-num {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
}

.rm-metric-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--rm-text-muted);
    margin-top: 4px;
}

/* ── CARDS ── */
.rm-card {
    background: rgba(2, 13, 30, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--rm-radius-lg);
    padding: 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 20px rgba(0, 210, 255, 0.08);
    margin-bottom: 32px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    animation: dialogueGlowBreath 6s ease-in-out infinite;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.3s cubic-bezier(0.2, 0, 0, 1), border-color 0.3s ease;
}

.rm-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 35%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.4) 20%, #00d2ff 50%, #ffffff 75%, #0ea5e9 90%, transparent 100%);
    box-shadow: 0 0 14px #00d2ff, 0 0 28px rgba(0, 210, 255, 0.85);
    animation: dialogueBeamSweep 5.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
    z-index: 6;
}

.rm-dispatch-card {
    border-color: rgba(0, 210, 255, 0.35);
    position: relative;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 32px rgba(0, 210, 255, 0.16);
}

.rm-dispatch-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 210, 255, 0.25), rgba(245, 158, 11, 0.35), rgba(0, 210, 255, 0.25));
    pointer-events: none;
    z-index: 5;
}

.rm-dispatch-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 32%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00d2ff 35%, #ffffff 65%, #38bdf8 85%, transparent 100%);
    box-shadow: 0 0 18px #00d2ff, 0 0 35px rgba(0, 210, 255, 0.95);
    animation: dialogueBeamSweep 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
    z-index: 6;
}

.rm-card-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.rm-card-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rm-card-icon {
    font-size: 24px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
}

.rm-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.rm-card-sub {
    font-size: 13px;
    color: var(--rm-text-muted);
    margin-top: 2px;
}

.rm-pill-key {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--rm-accent);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ── FORMS ── */
.rm-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.rm-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 16px;
    border-top: 1px solid var(--rm-border);
    padding-top: 22px;
}

.rm-form-actions .rm-btn-primary {
    min-width: 280px;
    height: 48px;
    padding: 0 28px;
    font-size: 14px;
}

.rm-form-actions .rm-btn-ghost {
    height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
}

/* ── SUCCESS BOX & MAGIC LINK ── */
.rm-success-box {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.3), rgba(15, 23, 42, 0.95));
    border: 1.5px solid var(--rm-success);
    border-radius: var(--rm-radius-md);
    animation: rmFadeIn 0.4s ease;
}

.rm-success-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.rm-success-badge {
    font-size: 13px;
    font-weight: 800;
    color: #34d399;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rm-success-time {
    font-size: 12px;
    color: var(--rm-text-muted);
}

.rm-success-msg {
    font-size: 13.5px;
    color: #e2e8f0;
    margin-bottom: 16px;
    line-height: 1.6;
}

.rm-link-wrap {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.rm-link-input {
    flex: 1;
    background: #020617;
    border: 1.5px solid var(--rm-success);
    color: #6ee7b7;
    font-family: monospace;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 14px;
    border-radius: var(--rm-radius-md);
}

.rm-success-chips {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--rm-text-muted);
}

.rm-success-chips strong {
    color: #ffffff;
}

/* ── TABLE ── */
.rm-table-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rm-search-input {
    padding: 8px 14px;
    background: var(--rm-bg-input);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius-md);
    color: #ffffff;
    font-size: 13px;
    min-width: 260px;
    outline: none;
}

.rm-search-input:focus {
    border-color: var(--rm-border-focus);
}

.rm-btn-sm {
    padding: 8px 14px;
    font-size: 12.5px;
}

.rm-table-wrap {
    overflow-x: auto;
}

.rm-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.rm-table th {
    padding: 14px 16px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rm-text-muted);
    border-bottom: 1px solid var(--rm-border);
}

.rm-table td {
    padding: 16px;
    border-bottom: 1px solid var(--rm-border);
    color: var(--rm-text-secondary);
}

.rm-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.rm-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rm-badge.invited { background: rgba(56, 189, 248, 0.15); border: 1px solid #38bdf8; color: #38bdf8; }
.rm-badge.in_progress { background: rgba(245, 158, 11, 0.15); border: 1px solid #f59e0b; color: #fbbf24; }
.rm-badge.review { background: rgba(168, 85, 247, 0.15); border: 1px solid #a855f7; color: #c084fc; }
.rm-badge.completed { background: rgba(16, 185, 129, 0.15); border: 1px solid #10b981; color: #34d399; }

.rm-action-btns {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.rm-btn-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--rm-border);
    color: var(--rm-text-secondary);
    padding: 6px 10px;
    border-radius: var(--rm-radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.rm-btn-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.rm-btn-action.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--rm-danger);
    color: #f87171;
}

/* ── MODAL ── */
.rm-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.rm-modal-card {
    background: rgba(2, 13, 30, 0.94);
    border: 1px solid rgba(0, 210, 255, 0.35);
    border-radius: var(--rm-radius-lg);
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 45px rgba(0, 210, 255, 0.2);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    position: relative;
    overflow: hidden;
    animation: rmFadeIn 0.35s ease, dialogueGlowBreath 6s ease-in-out infinite;
}

.rm-modal-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 45%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.5) 20%, #00d2ff 50%, #ffffff 75%, #0ea5e9 90%, transparent 100%);
    box-shadow: 0 0 16px #00d2ff, 0 0 32px rgba(0, 210, 255, 0.85);
    animation: dialogueBeamSweep 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
    z-index: 10;
}

.rm-modal-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--rm-border);
    padding-bottom: 14px;
}

.rm-modal-close {
    background: none;
    border: none;
    color: var(--rm-text-muted);
    font-size: 18px;
    cursor: pointer;
}

.rm-modal-close:hover {
    color: #ffffff;
}

@keyframes rmFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
    .rm-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .rm-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .rm-navbar {
        padding: 0 16px;
    }
    .rm-content {
        padding: 16px;
    }
    .rm-metrics-grid {
        grid-template-columns: 1fr;
    }
    .rm-link-wrap {
        flex-direction: column;
    }
}
