/* C:\Netformic\Biggin\Portal\styles.css */
:root {
  color-scheme: dark;
  --bg-core: #09090b; /* Very dark, almost black */
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-light: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --n-pink: #e6007e;
  --n-pink-glow: rgba(230, 0, 126, 0.3);
  --n-yellow: #fff100;
  --success: #22c55e;
  --danger: #ef4444;
}

body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: var(--bg-core);
  background-image: 
    radial-gradient(at 0% 0%, rgba(230, 0, 126, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(255, 241, 0, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}

.app-layout { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 260px; background: #09090b; border-right: 1px solid var(--border-light); display: flex; flex-direction: column; padding-top:20px;}
.sidebar .brand { padding: 0 25px 30px; border-bottom: 1px solid var(--border-light); margin-bottom: 20px;}
.nav-item { padding: 15px 25px; color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 15px; border-left: 3px solid transparent; transition: all 0.2s; cursor: pointer; display: flex; align-items:center; gap: 10px;}
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.03); }
.nav-item.active { color: var(--n-yellow); border-left-color: var(--n-pink); background: linear-gradient(90deg, rgba(230, 0, 126, 0.1) 0%, transparent 100%); font-weight:600;}

.main-content { flex: 1; overflow-y: auto; padding: 30px 40px; position:relative;}
.main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.page-title { font-size: 26px; font-weight: 700; color: #fff; margin: 0; display:flex; align-items:center; gap:10px; letter-spacing: -0.5px;}
.page-title .accent { color: var(--n-pink); font-weight: 800;}

.filter-bar { background: var(--bg-core); border-radius: 12px; border: 1px solid var(--border-light); border-left: 5px solid var(--n-pink); padding: 20px; margin-bottom: 25px; display: flex; flex-direction: column; gap: 15px; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5); position: sticky; top: -10px; z-index: 100;}
.filter-row { display: flex; flex-wrap: wrap; gap: 15px; width: 100%;}
.filter-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 250px;}
.filter-actions { display: flex; justify-content: flex-end; gap: 10px; width: 100%; align-items: flex-end; margin-top:-5px;}
.filter-group label { font-size: 14px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing:0.5px;}
.filter-group > select, .filter-group > input { width: 100%; box-sizing: border-box; background: rgba(255,255,255,0.05); border: 1px solid var(--border-light); color: #fff; padding: 10px; border-radius: 8px; font-family: 'Inter'; font-size: 15px; outline:none; transition:0.2s;}
.filter-group select option { background-color: var(--bg-core); color: #fff; font-size:15px; }
.filter-group > select:focus, .filter-group > input:focus { border-color: var(--n-pink); box-shadow: 0 0 0 2px var(--n-pink-glow); }
.btn-primary { padding:10px 20px; background:var(--n-pink); color:#fff; border:none; border-radius:8px; font-weight:bold; cursor:pointer; align-self: flex-end; margin-bottom: 2px; transition:0.2s;}
.btn-primary:hover { background: #ff008c; box-shadow: 0 0 15px var(--n-pink-glow);}
.btn-secondary { padding:10px 20px; margin-bottom:2px; background:rgba(255,255,255,0.05); color:var(--text-muted); border:1px solid var(--border-light); border-radius:8px; cursor:pointer; font-weight:bold; transition:0.2s;}
.btn-secondary:hover { color:#fff; border-color:var(--border-light); background:rgba(255,255,255,0.1); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 30px; }
.kpi-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 12px; padding: 25px; display:flex; flex-direction:column; gap:10px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); position:relative; overflow:hidden;}
.kpi-card::before { content: ''; position:absolute; top:0; left:0; width:100%; height:3px; background: var(--n-pink); transition:0.3s;}
.kpi-card:hover::before { background: var(--n-yellow); }
.kpi-card h3 { margin:0; font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;}
.kpi-card h2 { margin:0; font-size: 32px; font-weight: 800; color: #fff; }
.kpi-alert::before { background: var(--danger); }
.kpi-alert h2 { color: var(--danger); }

.glass-panel { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 12px; padding: 25px; margin-bottom: 30px;}
.glass-panel h2 { margin-top:0; font-size: 18px; font-weight: 600; color: #fff; display:flex; align-items:center; justify-content:space-between; margin-bottom:20px;}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }

table.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px;}
table.data-table th { padding: 15px; color: var(--text-muted); font-weight: 600; border-bottom: 2px solid var(--border-light); text-transform: uppercase; font-size:12px; letter-spacing:0.5px;}
table.data-table td { padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--text-main); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
table.data-table tr:hover td { background: rgba(255,255,255,0.04); }
table.data-table .pill { padding: 5px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; background:rgba(255,255,255,0.1); }
table.data-table .pill.risk { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
table.data-table .pill.won { background: rgba(34, 197, 94, 0.2); color: #86efac; }
table.data-table .pill.orange { background: rgba(230, 0, 126, 0.2); color: #f472b6; }
table.data-table td.strong { color: var(--n-yellow); font-weight:600; }

.tab-content { display: none; animation: fadeIn 0.3s ease forwards;}
.tab-content.active { display: block; }
@keyframes fadeIn { from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(0);} }

.user-menu { display:flex; gap:15px; align-items:center; z-index:200;}
.user-menu a { color: var(--text-muted); text-decoration: none; font-size: 13px; font-weight: 600; padding: 8px 16px; border: 1px solid var(--border-light); border-radius: 6px; transition:0.2s;}
.user-menu a:hover { color: #fff; background: rgba(255,255,255,0.1);}

#global-loader { position:fixed; top:0; left:0; right:0; height:3px; background:var(--n-yellow); z-index:9999; transform-origin:left; transform:scaleX(0); transition:transform 0.2s;}
.loading #global-loader { transform:scaleX(1); animation: progress 1s ease infinite alternate;}
@keyframes progress { 0% { transform: scaleX(0.1); } 100% { transform: scaleX(0.4); } }

/* Chatbot Styles */
.chat-btn { position: fixed; bottom: 30px; right: 40px; width: 60px; height: 60px; background: var(--n-pink); border-radius: 50%; display: flex; align-items:center; justify-content:center; color:#fff; font-size:24px; cursor:pointer; box-shadow: 0 10px 20px var(--n-pink-glow); z-index: 1000; transition: 0.3s;}
.chat-btn:hover { transform: scale(1.1); box-shadow: 0 10px 30px var(--n-pink);}
.chat-window { position: fixed; bottom: 105px; right: 40px; width: 350px; height: 500px; background: rgba(9, 9, 11, 0.9); backdrop-filter: blur(20px); border: 1px solid var(--border-light); border-top: 4px solid var(--n-pink); border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.8); z-index: 1000; display:flex; flex-direction:column; transform: translateY(20px); opacity:0; pointer-events:none; transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);}
.chat-window.open { transform: translateY(0); opacity:1; pointer-events:all;}
.chat-header { background: rgba(255,255,255,0.02); padding: 15px 20px; border-bottom: 1px solid var(--border-light); font-weight:700; color:var(--text-main); border-radius: 16px 16px 0 0; display:flex; justify-content:space-between; align-items:center;}
.chat-header span { display:flex; align-items:center; gap:10px;}
.chat-header .dot { width:8px; height:8px; background:var(--n-yellow); border-radius:50%; box-shadow:0 0 10px var(--n-yellow);}
.chat-messages { flex:1; overflow-y:auto; padding:20px; display:flex; flex-direction:column; gap:18px;}
.msg-bubble { max-width: 85%; padding: 12px 14px; border-radius: 12px; font-size: 15px; line-height: 1.5; word-wrap: break-word;}
.msg-user { background: rgba(255,255,255,0.05); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; border: 1px solid var(--border-light);}
.msg-ai { background: rgba(230,0,126,0.05); color: #fff; align-self: flex-start; border-bottom-left-radius: 4px; border: 1px solid var(--n-pink-glow);}
.chat-input-area { padding: 15px; border-top: 1px solid var(--border-light); display:flex; gap:10px; background: rgba(0,0,0,0.3); border-radius: 0 0 16px 16px;}
.chat-input { flex:1; background: rgba(255,255,255,0.05); border: 1px solid var(--border-light); border-radius: 8px; padding: 10px 15px; color: #fff; outline: none; font-family:'Inter'; font-size:15px; transition:0.2s;}
.chat-input:focus { border-color: var(--n-pink); background:rgba(255,255,255,0.1); }
.chat-send { background: var(--n-pink); border:none; width: 45px; border-radius:8px; color:#111; font-weight:bold; cursor:pointer;}
.chat-send:hover { background: var(--n-yellow); box-shadow:0 0 15px var(--n-yellow);}
/* Choices UI Override */
.netformic-choices.choices { margin-bottom: 0; min-width: 140px; width: 100%; max-width: 100%; box-sizing: border-box; }
.netformic-choices .choices__inner { width: 100%; max-width: 100%; box-sizing: border-box; overflow-x: hidden; background: rgba(255,255,255,0.05); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; color: #fff; font-family: 'Inter'; font-size: 14px; min-height: 41px; padding: 5px 10px; }
.netformic-choices.is-focused .choices__inner { border-color: #e6007e; box-shadow: 0 0 0 2px rgba(230, 0, 126, 0.3); }
.netformic-choices .choices__list--dropdown { background: #09090b; border: 1px solid rgba(255, 255, 255, 0.08); color: #fff; z-index: 1000; width: auto; min-width: 100%; word-break: keep-all;}
.netformic-choices .choices__list--dropdown .choices__item--selectable.is-highlighted { background: rgba(255,255,255,0.1); }
.netformic-choices .choices__item--choice { color: #fff; white-space: nowrap; }
.netformic-choices .choices__list--multiple .choices__item { background-color: #e6007e; border: 1px solid #e6007e; border-radius: 6px; padding: 2px 7px; margin-top:2px;}
.netformic-choices .choices__input { display: none !important; }

@keyframes mic-pulse {
    0% { transform: scale(1); color: var(--n-pink); }
    50% { transform: scale(1.3); color: #ff0000; }
    100% { transform: scale(1); color: var(--n-pink); }
}
.mic-recording i {
    animation: mic-pulse 1s infinite;
}
