/* style.css - Premium Malakos AI Operations Theme */
:root {
    --bg-primary: #0b0f17;
    --bg-secondary: #131b2e;
    --bg-card: #1e293b;
    --bg-input: #0f172a;
    --border-color: #334155;
    --border-focus: #6366f1;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --bg-header: #070a0f;
    --bg-hover: rgba(255, 255, 255, 0.05);
    --bg-th: rgba(255, 255, 255, 0.02);
    --bg-row-hover: rgba(255, 255, 255, 0.01);
    --bg-switch: rgba(255, 255, 255, 0.1);
    --border-subtle: rgba(255, 255, 255, 0.04);
    --bg-input-readonly: rgba(255, 255, 255, 0.02);
    
    /* Brand Accent Gradients */
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --accent-glow: 0 0 20px rgba(99, 102, 241, 0.4);
    
    /* Health & Status Colors */
    --color-active: #10b981;
    --color-inactive: #ef4444;
    --color-paid: #10b981;
    --color-denied: #ef4444;
    --color-rejected: #f97316; /* Orange for rejected claims */
    --color-partial: #eab308;  /* Yellow for partially paid */
    --color-pending: #64748b;
    --color-cob: #a855f7;      /* Purple for Coordination Risk */
    
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    /* Transition */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme {
    --bg-primary: #f1f5f9;      /* Slate 100 */
    --bg-secondary: #f8fafc;    /* Slate 50 */
    --bg-card: #ffffff;         /* White */
    --bg-input: #ffffff;        /* White */
    --border-color: #cbd5e1;    /* Slate 300 */
    --border-focus: #4f46e5;    /* Indigo 600 */
    --text-primary: #0f172a;    /* Slate 900 */
    --text-secondary: #475569;  /* Slate 600 */
    --text-muted: #64748b;      /* Slate 500 */
    
    --bg-header: #ffffff;
    --bg-hover: rgba(0, 0, 0, 0.05);
    --bg-th: rgba(0, 0, 0, 0.02);
    --bg-row-hover: rgba(0, 0, 0, 0.015);
    --bg-switch: rgba(0, 0, 0, 0.08);
    --border-subtle: rgba(0, 0, 0, 0.05);
    --bg-input-readonly: rgba(0, 0, 0, 0.03);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    height: 100vh;
}

/* App Container Layout */
.mop-app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* Top Header Navigation Styling */
.mop-top-header {
    height: 72px;
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mop-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mop-logo-circle {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 18px;
    color: #ffffff;
    box-shadow: var(--accent-glow);
}

.mop-header-brand h2 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.mop-header-brand p {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mop-top-nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mop-nav-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition);
}

.mop-nav-btn i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: var(--transition);
}

.mop-nav-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.mop-nav-btn:hover i {
    color: var(--text-primary);
}

.mop-nav-btn.active {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: var(--accent-glow);
}

.mop-nav-btn.active i {
    color: #ffffff;
}

.mop-header-right-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mop-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}

.mop-dot.green { background-color: var(--color-active); }
.mop-dot.yellow { background-color: var(--color-partial); }
.mop-dot.red { background-color: var(--color-inactive); }

.green { color: var(--color-active) !important; }
.yellow { color: var(--color-partial) !important; }
.red { color: var(--color-inactive) !important; }
.orange { color: var(--color-rejected) !important; }

.mop-badge {
    background-color: rgba(99, 102, 241, 0.15);
    color: #8b5cf6;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Main Content Area */
.mop-main {
    flex: 1;
    overflow-y: auto;
    background-color: var(--bg-secondary);
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
}

/* Tab Management */
.mop-tab-content {
    display: none;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.4s ease;
}

.mop-tab-content.active {
    display: flex;
}

.mop-tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.mop-tab-header h1 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.mop-tab-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.mop-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Buttons */
.mop-btn-primary, .mop-btn-secondary, .mop-btn-accent, .mop-btn-danger {
    padding: 10px 20px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.mop-btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: var(--accent-glow);
}

.mop-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.6);
}

.mop-btn-secondary {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.mop-btn-secondary:hover {
    background-color: #2e3e56;
}

.mop-btn-accent {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.mop-btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 22px rgba(6, 182, 212, 0.5);
}

.mop-btn-link {
    background: transparent;
    border: none;
    color: #6366f1;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}

.mop-btn-link:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

/* Metrics Grid */
.mop-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.mop-metric-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.mop-metric-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.5);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon i {
    width: 24px;
    height: 24px;
}

.card-icon.blue { background-color: rgba(99, 102, 241, 0.15); color: #6366f1; }
.card-icon.green { background-color: rgba(16, 185, 129, 0.15); color: var(--color-active); }
.card-icon.orange { background-color: rgba(249, 115, 22, 0.15); color: #f97316; }
.card-icon.red { background-color: rgba(239, 68, 68, 0.15); color: var(--color-inactive); }

.card-data span {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.card-data h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    margin: 4px 0;
}

.stat-trend {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-trend i {
    width: 14px;
    height: 14px;
}

/* 2-Column Dashboard Layout */
.mop-layout-2col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.mop-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.card-header h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
}

/* Chart Mockup */
.mop-chart-mock {
    height: 220px;
    display: flex;
    align-items: flex-end;
    padding-top: 20px;
}

.chart-bars {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    width: 100%;
    height: 100%;
}

.chart-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 20%;
    height: 100%;
    justify-content: flex-end;
}

.bar-fill {
    width: 32px;
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
    position: relative;
    transition: height 1s ease-out;
}

.bar-fill span {
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
}

.bar-fill.green { background: linear-gradient(180deg, #10b981 0%, rgba(16,185,129,0.3) 100%); }
.bar-fill.blue { background: linear-gradient(180deg, #6366f1 0%, rgba(99,102,241,0.3) 100%); }
.bar-fill.orange { background: linear-gradient(180deg, #f97316 0%, rgba(249,115,22,0.3) 100%); }
.bar-fill.red { background: linear-gradient(180deg, #ef4444 0%, rgba(239,68,68,0.3) 100%); }

.chart-col label {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
}

/* Activity Feed */
.activity-log-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 220px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.activity-icon-badge {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: rgba(255,255,255,0.05);
}

.activity-icon-badge.ai {
    background-color: rgba(99, 102, 241, 0.15);
    color: #8b5cf6;
}

.activity-icon-badge.user {
    background-color: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}

.activity-info p {
    font-size: 13px;
    color: var(--text-primary);
}

.activity-info span {
    font-size: 11px;
    color: var(--text-muted);
}

/* Filters and Search Styles */
.mop-filter-bar {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 130px;
}

.filter-group.search {
    flex: 1;
    min-width: 220px;
}

.filter-group label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
}

.filter-group select, .filter-group input {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.filter-group select:focus, .filter-group input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

/* Data Table Container */
.mop-table-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow-x: auto;
}

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

.mop-table th {
    background-color: var(--bg-th);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.mop-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.mop-table tbody tr:hover {
    background-color: var(--bg-row-hover);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Verification EVB Status Badges */
.status-badge.active-status {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--color-active);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.inactive-status {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--color-inactive);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Claims Status Badges */
.status-badge.paid-status {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--color-paid);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.denied-status {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--color-denied);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.rejected-status {
    background-color: rgba(249, 115, 22, 0.15);
    color: var(--color-rejected);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.status-badge.partial-status {
    background-color: rgba(234, 179, 8, 0.15);
    color: var(--color-partial);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-badge.pending-status {
    background-color: rgba(100, 116, 139, 0.15);
    color: var(--color-pending);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.status-badge.cob-status {
    background-color: rgba(168, 85, 247, 0.15);
    color: var(--color-cob);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Calling Workflow Badges */
.calling-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
}

.calling-badge.ready { background-color: rgba(239, 68, 68, 0.1); color: var(--color-inactive); border: 1px solid rgba(239, 68, 68, 0.2); }
.calling-badge.calling { background-color: rgba(6, 182, 212, 0.1); color: #06b6d4; border: 1px solid rgba(6, 182, 212, 0.2); }
.calling-badge.hold { background-color: rgba(249, 115, 22, 0.1); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.2); }
.calling-badge.resolved { background-color: rgba(16, 185, 129, 0.1); color: var(--color-active); border: 1px solid rgba(16, 185, 129, 0.2); }
.calling-badge.no-action { background-color: rgba(255, 255, 255, 0.05); color: var(--text-muted); }

/* AI Agent Terminal Grid */
.mop-terminal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    height: calc(100vh - 200px);
    min-height: 500px;
}

.mop-console-card {
    background-color: #030712;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.console-header {
    background-color: #0f172a;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
}

.console-header .circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.console-header .circle.red { background-color: #ef4444; }
.console-header .circle.yellow { background-color: #f59e0b; }
.console-header .circle.green { background-color: #10b981; }

.console-title {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 8px;
}

.console-body {
    flex: 1;
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    overflow-y: auto;
    color: #e2e8f0;
}

.log-line {
    margin-bottom: 4px;
    white-space: pre-wrap;
    word-break: break-all;
}

.text-slate { color: #94a3b8; }
.text-green { color: #4ade80; }
.text-cyan { color: #22d3ee; }
.text-yellow { color: #facc15; }
.text-red { color: #f87171; }
.text-purple { color: #c084fc; }

/* Browser Simulator */
.mop-browser-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.browser-header {
    background-color: #0f172a;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.browser-controls {
    display: flex;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.control-arrow, .control-refresh {
    cursor: pointer;
}

.browser-address {
    flex: 1;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.browser-address input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    font-size: 12px;
    width: 100%;
}

.lock-icon {
    font-size: 10px;
    color: var(--color-active);
}

.browser-viewport {
    flex: 1;
    background-color: #f1f5f9; /* standard light grey browser workspace */
    color: #0f172a;
    position: relative;
    overflow: hidden;
}

/* Payer Portal Mock Interface */
.mock-payer-portal-view {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
}

.portal-login-box {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid #e2e8f0;
}

.portal-logo {
    color: #0284c7;
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.5px;
}

.portal-login-box h3 {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: #334155;
    margin-bottom: 8px;
}

.p-input-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    background-color: #f8fafc;
}

.portal-btn {
    background-color: #0284c7;
    color: white;
    font-weight: 600;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.portal-btn:hover {
    background-color: #0369a1;
}

/* Browser Inner Pages */
.browser-dashboard-layout {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #f8fafc;
}

.browser-navbar {
    background-color: #0284c7;
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.browser-navbar .logo {
    font-weight: 700;
    font-size: 16px;
}

.browser-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.browser-spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #0284c7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Slide-out Edit Drawer CSS */
.mop-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: flex-end;
    z-index: 100;
    animation: fadeIn 0.3s ease;
}

.mop-drawer-overlay.active {
    display: flex;
}

.mop-drawer {
    width: 600px;
    height: 100%;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mop-drawer-overlay.active .mop-drawer {
    transform: translateX(0);
}

.mop-drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card);
}

.mop-drawer-header h2 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
}

.close-drawer-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.close-drawer-btn:hover {
    color: var(--text-primary);
}

.mop-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.drawer-section {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drawer-section h4 {
    font-family: var(--font-heading);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6366f1;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 8px;
}

.drawer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dr-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dr-field.col-span-2 {
    grid-column: span 2;
}

.dr-field label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.dr-field input, .dr-field select, .dr-field textarea {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.dr-field input:focus, .dr-field select:focus, .dr-field textarea:focus {
    border-color: var(--border-focus);
}

.dr-field input[readonly], .dr-field textarea[readonly] {
    background-color: var(--bg-input-readonly);
    color: var(--text-secondary);
    border-color: var(--border-color);
    cursor: not-allowed;
}

.notes-split {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.icon-xs {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    display: inline-block;
}

/* Remediation Advisor App CSS */
.mop-remediation-advisor {
    border: 1px dashed rgba(99, 102, 241, 0.4);
    background-color: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    padding: 16px;
}

.advisor-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8b5cf6;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.advisor-body {
    font-size: 12px;
}

.advisor-body strong {
    color: var(--text-primary);
}

.advisor-body p {
    color: var(--text-secondary);
    margin: 4px 0 12px 0;
}

.appeal-preview-text {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #cbd5e1;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.5;
}

.advisor-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
}

/* Modal Overlay Styling */
.mop-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 110;
    animation: fadeIn 0.3s ease;
}

.mop-modal-overlay.active {
    display: flex;
}

.mop-modal-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 500px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mop-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mop-modal-header h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
}

.mop-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.mop-modal-body {
    padding: 20px;
}

.mop-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.mop-modal-footer {
    padding: 16px 20px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 200;
}

.mop-toast {
    background-color: var(--bg-card);
    border-left: 4px solid var(--border-focus);
    border: 1px solid var(--border-color);
    border-left: 4px solid #6366f1;
    border-radius: 8px;
    padding: 16px;
    color: var(--text-primary);
    font-size: 13px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.4);
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mop-toast.success { border-left-color: var(--color-active); }
.mop-toast.error { border-left-color: var(--color-inactive); }
.mop-toast.info { border-left-color: #06b6d4; }

.toast-close {
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 16px;
}

.toast-close:hover {
    color: var(--text-primary);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

@keyframes pulse-glow {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.8; }
}

/* Platform Switcher Header Styles */
.mop-platform-header {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mop-platform-status-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.mop-status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.mop-status-indicator.active {
    background-color: var(--color-active);
    box-shadow: 0 0 10px var(--color-active);
}

.mop-status-indicator::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--color-active);
    animation: pulse-glow 2s infinite ease-in-out;
}

.mop-platform-selector-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mop-platform-selector-box label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mop-platform-select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
    border-color: #6366f1;
}

.mop-platform-select:focus {
    border-color: #8b5cf6;
    box-shadow: var(--accent-glow);
}

/* Inline Table Dropdown Selector Styles */
.mop-table-select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.mop-table-select:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--border-focus);
}

.mop-table-select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
}
/* Summary Strip Layout */
.mop-summary-strip {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 0;
    animation: fadeIn 0.4s ease;
}

.strip-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.strip-item span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.strip-item strong {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Three-Column Dashboard Grid Layout */
.mop-layout-3col {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 24px;
    margin-top: 10px;
}

@media (max-width: 1200px) {
    .mop-layout-3col {
        grid-template-columns: 1fr;
    }
}

/* Custom Autopilot Toggle Switches */
.mop-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.mop-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mop-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-switch);
    transition: 0.3s;
    border-radius: 22px;
    border: 1px solid var(--border-color);
}

.mop-switch input:checked + .mop-slider {
    background-color: #10b981;
}

.mop-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.mop-switch input:checked + .mop-slider:before {
    transform: translateX(22px);
}

/* User login overlay styling */
.mop-login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #030712;
    z-index: 1000;
    display: none;
    overflow: hidden;
    font-family: var(--font-body);
}

.mop-login-overlay.active {
    display: flex;
}

body.light-theme .mop-login-overlay {
    background-color: #f8fafc;
}

/* Split Screen Container */
.login-split-container {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Left Pane - Product Showcase */
.login-left-pane {
    flex: 1.2;
    padding: 60px;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(9, 13, 24, 0.98) 0%, rgba(17, 24, 39, 0.95) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 40px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.login-left-pane::-webkit-scrollbar {
    width: 6px;
}
.login-left-pane::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

body.light-theme .login-left-pane {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

/* Right Pane - Secure Login Panel */
.login-right-pane {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background-color: #060913;
    position: relative;
    overflow-y: auto;
}

body.light-theme .login-right-pane {
    background-color: #ffffff;
}

/* Glassmorphic Login Card inside Right Pane */
.login-right-pane .mop-login-card {
    background: rgba(19, 27, 46, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1010;
    animation: fadeIn 0.4s ease-out;
}

body.light-theme .login-right-pane .mop-login-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.12);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
}

.login-card-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-card-header h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.login-card-header p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Left Pane Components styling */
.login-brand-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-brand-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.login-brand-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.login-hero-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-hero-headline {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    color: transparent;
    background: linear-gradient(135deg, #fff 30%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

body.light-theme .login-hero-headline {
    background: linear-gradient(135deg, #0f172a 30%, #6366f1 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.login-hero-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Feature Grid & Cards */
.login-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.login-feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.03);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.4);
}

body.light-theme .login-feature-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-theme .login-feature-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.02);
    box-shadow: 0 12px 24px -10px rgba(99, 102, 241, 0.08);
}

.feature-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.feature-card-header i {
    width: 20px;
    height: 20px;
    color: #8b5cf6;
    flex-shrink: 0;
}

body.light-theme .feature-card-header i {
    color: #6366f1;
}

.feature-card-header h4 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.feature-card-body ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Highlights Section */
.login-highlights-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-section-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

.highlight-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.highlight-tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.highlight-tag:hover {
    border-color: rgba(99, 102, 241, 0.25);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

body.light-theme .highlight-tag {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-theme .highlight-tag:hover {
    background: rgba(99, 102, 241, 0.04);
}

/* Why Malakos Quote Box */
.why-malakos-card {
    background: linear-gradient(135deg, rgba(9, 13, 24, 0.3) 0%, rgba(99, 102, 241, 0.06) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 22px 26px;
    position: relative;
    overflow: hidden;
}

.why-malakos-card p {
    font-style: italic;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 2;
}

.why-malakos-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 10px;
    font-size: 120px;
    font-family: Georgia, serif;
    color: rgba(99, 102, 241, 0.08);
    line-height: 1;
    z-index: 1;
}

body.light-theme .why-malakos-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(99, 102, 241, 0.04) 100%);
}

/* CTA Card */
.login-cta-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

body.light-theme .login-cta-card {
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.login-cta-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.login-cta-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.login-cta-btn {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.login-cta-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
}

body.light-theme .login-cta-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.login-cta-btn.primary {
    background: var(--color-active);
    color: white;
    border: none;
}

.login-cta-btn.primary:hover {
    background: #059669;
}

.login-cta-text {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* Login Panel Utilities */
.login-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    font-size: 13px;
}

.login-remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.login-remember-me input {
    cursor: pointer;
    width: 14px;
    height: 14px;
    accent-color: #8b5cf6;
}

.login-forgot-password {
    color: #8b5cf6;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
}

.login-forgot-password:hover {
    color: #a78bfa;
    text-decoration: underline;
}

body.light-theme .login-forgot-password {
    color: #6366f1;
}
body.light-theme .login-forgot-password:hover {
    color: #4f46e5;
}

.login-panel-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Typographic Brand Logo */
.login-brand-text-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
    user-select: none;
}

.brand-text-main {
    color: var(--text-primary);
}

.brand-text-accent {
    background: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Glowing Blobs for Right Pane background */
.login-glow-blob-1, .login-glow-blob-2 {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    z-index: 1001;
    pointer-events: none;
}

.login-glow-blob-1 {
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    top: -50px;
    left: -50px;
    animation: pulse-glow 6s infinite ease-in-out;
}

.login-glow-blob-2 {
    background: radial-gradient(circle, #ec4899 0%, transparent 70%);
    bottom: -50px;
    right: -50px;
    animation: pulse-glow 8s infinite ease-in-out alternate;
}

body.light-theme .login-glow-blob-1, body.light-theme .login-glow-blob-2 {
    opacity: 0.2;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .login-split-container {
        flex-direction: column;
        overflow-y: auto;
    }
    .login-left-pane {
        flex: none;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 40px 24px;
        gap: 30px;
    }
    body.light-theme .login-left-pane {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
    .login-right-pane {
        flex: none;
        padding: 60px 24px;
    }
}

/* User Directory List Row styling */
.team-member-row {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.team-member-row:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.team-member-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.team-member-info strong {
    font-size: 13px;
    color: var(--text-primary);
}

.team-member-info span {
    font-size: 11px;
    color: var(--text-muted);
}

.team-member-role-badge {
    background-color: rgba(99, 102, 241, 0.12);
    color: #8b5cf6;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.team-member-role-badge.admin-role {
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--color-active);
}

.btn-delete-user {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-delete-user:hover:not(:disabled) {
    color: var(--color-inactive);
    background-color: rgba(239, 68, 68, 0.08);
}

.btn-delete-user:disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

/* Sortable Table Headers */
.mop-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mop-table th.sortable:hover {
    background-color: var(--bg-input);
    color: var(--text-primary);
}

.mop-table th .sort-icon {
    font-family: var(--font-body);
    font-size: 10px;
    margin-left: 6px;
    color: var(--color-active);
    font-weight: bold;
    display: inline-block;
    vertical-align: middle;
}

.mop-table th.sortable.sorted {
    color: var(--text-primary);
    background-color: rgba(99, 102, 241, 0.05);
}


