/* ============================================================
   TESTING Investment Platform — Main Stylesheet
   Theme: Futuristic AI · White / Blue / Black
   ============================================================ */

/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue:        #2563eb;
  --blue-dark:   #1d4ed8;
  --blue-light:  #dbeafe;
  --blue-bg:     #eff6ff;
  --navy:        #0a0f1e;
  --white:       #ffffff;
  --gray-50:     #f8fafc;
  --gray-100:    #f1f5f9;
  --gray-200:    #e2e8f0;
  --gray-400:    #94a3b8;
  --gray-500:    #64748b;
  --gray-700:    #334155;
  --green:       #059669;
  --green-bg:    #dcfce7;
  --green-text:  #166534;
  --red:         #dc2626;
  --red-bg:      #fee2e2;
  --red-text:    #991b1b;
  --yellow:      #d97706;
  --yellow-bg:   #fef3c7;
  --yellow-text: #92400e;
  --purple:      #7c3aed;
  --purple-bg:   #ede9fe;
  --cyan:        #0891b2;
  --sidebar-w:   240px;
  --radius-sm:   8px;
  --radius:      12px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:      0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:   0 8px 32px rgba(37,99,235,.12);
  --transition:  .18s ease;
  --font:        'DM Sans', 'Segoe UI', sans-serif;
  --font-mono:   'Space Grotesk', monospace;
}
body { font-family: var(--font); background: #f0f4ff; color: var(--navy); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
table { border-collapse: collapse; width: 100%; }

/* ─── Typography ───────────────────────────────────────── */
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 600; }
h4 { font-size: 15px; font-weight: 600; }
.text-muted  { color: var(--gray-500); font-size: 13px; }
.text-sm     { font-size: 13px; }
.text-lg     { font-size: 18px; }
.font-bold   { font-weight: 700; }
.font-mono   { font-family: var(--font-mono); }

/* ─── Layout ───────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }
.main-content { margin-left: var(--sidebar-w); padding: 2rem; flex: 1; min-height: 100vh; }
.page-header { margin-bottom: 28px; }
.page-header h2 { margin-bottom: 4px; }

/* ─── Sidebar ──────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); background: var(--white); border-right: 1px solid var(--gray-200);
  display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 200; overflow-y: auto;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px; padding: 24px 20px 18px;
  border-bottom: 1px solid var(--gray-100);
}
.logo-icon {
  width: 36px; height: 36px; background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: white; font-family: var(--font-mono); font-weight: 700; font-size: 18px; flex-shrink: 0;
}
.logo-text { font-family: var(--font-mono); font-weight: 700; font-size: 17px; color: var(--blue-dark); letter-spacing: -.5px; }
.logo-sub  { font-size: 10px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 2px; }
.sidebar-nav { flex: 1; padding: 10px 10px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px;
  color: var(--gray-700); font-size: 14px; font-weight: 500; margin-bottom: 2px;
  transition: background var(--transition), color var(--transition); cursor: pointer;
}
.nav-item:hover { background: var(--gray-100); color: var(--navy); text-decoration: none; }
.nav-item.active { background: var(--blue-bg); color: var(--blue); font-weight: 600; }
.nav-icon { font-size: 16px; width: 22px; text-align: center; }
.nav-badge { margin-left: auto; background: var(--red); color: white; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 20px; min-width: 18px; text-align: center; }
.sidebar-footer { padding: 14px 16px; border-top: 1px solid var(--gray-100); }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.user-avatar-sm {
  width: 36px; height: 36px; background: linear-gradient(135deg, var(--blue), var(--purple));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.sidebar-user-info { overflow: hidden; }
.sidebar-user-name  { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-email { font-size: 11px; color: var(--gray-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-logout { display: block; width: 100%; padding: 8px 12px; text-align: center; border: 1.5px solid var(--gray-200); border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--gray-700); transition: all var(--transition); }
.btn-logout:hover { border-color: var(--red); color: var(--red); text-decoration: none; background: var(--red-bg); }

/* ─── Cards ─────────────────────────────────────────────── */
.card { background: var(--white); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; color: var(--navy); }

/* Stat Cards */
.stat-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
  background: var(--white); box-shadow: var(--shadow-sm);
}
.stat-card.blue   { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: white; }
.stat-card.green  { background: linear-gradient(135deg, #059669, #047857); color: white; }
.stat-card.purple { background: linear-gradient(135deg, var(--purple), #6d28d9); color: white; }
.stat-card.cyan   { background: linear-gradient(135deg, var(--cyan), #0e7490); color: white; }
.stat-card.amber  { background: linear-gradient(135deg, #d97706, #b45309); color: white; }
.stat-label { font-size: 12px; font-weight: 500; opacity: .8; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.stat-label span { font-size: 20px; }
.stat-value { font-size: 26px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.stat-sub   { font-size: 12px; opacity: .7; }

/* Plan Cards */
.plan-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.plan-card {
  background: white; border-radius: 20px; padding: 1.75rem; border: 2px solid var(--gray-200);
  transition: border-color var(--transition), box-shadow var(--transition); position: relative; overflow: hidden; cursor: pointer;
}
.plan-card:hover { box-shadow: var(--shadow-lg); }
.plan-card.selected { border-color: var(--blue); }
.plan-accent {
  position: absolute; top: 0; right: 0; width: 80px; height: 80px;
  border-radius: 0 20px 0 80px; opacity: .08;
}
.plan-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.plan-roi { font-size: 32px; font-weight: 700; line-height: 1; }
.plan-roi-label { font-size: 11px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 1px; }
.plan-meta { background: var(--gray-50); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--gray-500); margin-bottom: 14px; }
.plan-feature { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-700); margin-bottom: 6px; }
.plan-feature .check { font-size: 14px; }

/* ─── Forms ─────────────────────────────────────────────── */
.form-group  { margin-bottom: 16px; }
.form-label  { display: block; font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  font-size: 14px; font-family: var(--font); background: var(--gray-50); color: var(--navy);
  outline: none; transition: border var(--transition), background var(--transition);
}
.form-control:focus { border-color: var(--blue); background: var(--white); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-control::placeholder { color: var(--gray-400); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-hint   { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .input-addon { padding: 11px 14px; background: var(--gray-200); border: 1.5px solid var(--gray-200); border-left: none; border-radius: 0 var(--radius) var(--radius) 0; font-size: 13px; color: var(--gray-500); white-space: nowrap; display: flex; align-items: center; }

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px;
  border-radius: var(--radius); font-size: 14px; font-weight: 600; font-family: var(--font);
  border: none; cursor: pointer; transition: all var(--transition); text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; opacity: .9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary  { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: white; }
.btn-success  { background: var(--green-bg); color: var(--green-text); }
.btn-danger   { background: var(--red-bg);   color: var(--red-text); }
.btn-warning  { background: var(--yellow-bg); color: var(--yellow-text); }
.btn-outline  { background: transparent; border: 1.5px solid var(--gray-200); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost    { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-sm       { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
.btn-lg       { padding: 14px 28px; font-size: 16px; }
.btn-block    { width: 100%; justify-content: center; }

/* ─── Tables ────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table thead th {
  text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 600;
  color: var(--gray-400); text-transform: uppercase; letter-spacing: .6px;
  border-bottom: 1.5px solid var(--gray-100);
}
.data-table tbody td { padding: 13px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.data-table tbody tr:hover td { background: var(--gray-50); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ─── Badges ────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: .3px;
}
.badge-success { background: var(--green-bg);  color: var(--green-text); }
.badge-danger  { background: var(--red-bg);    color: var(--red-text); }
.badge-warning { background: var(--yellow-bg); color: var(--yellow-text); }
.badge-info    { background: var(--blue-light); color: var(--blue-dark); }
.badge-gray    { background: var(--gray-100);  color: var(--gray-700); }
.badge-purple  { background: var(--purple-bg); color: var(--purple); }

/* ─── Alerts ────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }
.alert-success { background: var(--green-bg); color: var(--green-text); border-left: 4px solid var(--green); }
.alert-danger  { background: var(--red-bg);   color: var(--red-text);   border-left: 4px solid var(--red); }
.alert-warning { background: var(--yellow-bg); color: var(--yellow-text); border-left: 4px solid var(--yellow); }
.alert-info    { background: var(--blue-light); color: var(--blue-dark); border-left: 4px solid var(--blue); }

/* ─── Toast ─────────────────────────────────────────────── */
.toast {
  position: fixed; top: 20px; right: 20px; z-index: 9999; padding: 14px 18px 14px 16px;
  border-radius: var(--radius); font-size: 14px; font-weight: 500; display: flex;
  align-items: center; gap: 12px; box-shadow: var(--shadow-lg); max-width: 400px;
  animation: slideIn .3s ease;
}
.toast-success { background: white; border-left: 4px solid var(--green); color: var(--green-text); }
.toast-danger  { background: white; border-left: 4px solid var(--red);   color: var(--red-text); }
.toast-warning { background: white; border-left: 4px solid var(--yellow); color: var(--yellow-text); }
.toast-info    { background: white; border-left: 4px solid var(--blue);  color: var(--blue-dark); }
.toast-close   { margin-left: auto; background: none; border: none; font-size: 18px; cursor: pointer; color: inherit; opacity: .6; }
@keyframes slideIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform:none; } }

/* ─── Auth Pages ────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh; background: linear-gradient(135deg, #e8f0fe 0%, #f0f4ff 50%, #e0e8ff 100%);
  display: flex; align-items: center; justify-content: center; padding: 2rem;
}
.auth-card {
  background: white; border-radius: var(--radius-xl); padding: 2.5rem; width: 100%; max-width: 460px;
  box-shadow: 0 20px 60px rgba(37,99,235,.12), 0 2px 8px rgba(0,0,0,.06);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.auth-sub   { font-size: 14px; color: var(--gray-500); margin-bottom: 28px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--gray-500); }

/* ─── Tabs ──────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 1.5px solid var(--gray-200); margin-bottom: 20px; }
.tab-item { padding: 9px 20px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--gray-500); border-bottom: 2px solid transparent; margin-bottom: -1.5px; transition: all var(--transition); text-decoration: none; }
.tab-item:hover { color: var(--navy); text-decoration: none; }
.tab-item.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }

/* ─── Profile / Settings Layout ────────────────────────── */
.settings-wrap { display: flex; gap: 24px; }
.settings-sidebar { width: 200px; flex-shrink: 0; }
.settings-content { flex: 1; }
.settings-nav .nav-item { padding: 9px 14px; margin-bottom: 3px; }
.settings-avatar {
  width: 70px; height: 70px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex; align-items: center; justify-content: center; color: white;
  font-size: 26px; font-weight: 700; margin: 0 auto 14px;
}

/* ─── KYC Steps ─────────────────────────────────────────── */
.kyc-steps { display: flex; gap: 0; margin-bottom: 28px; }
.kyc-step { flex: 1; display: flex; align-items: center; }
.kyc-step-circle {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0;
  border: 2px solid var(--gray-200); background: white; color: var(--gray-400);
}
.kyc-step.done .kyc-step-circle   { background: var(--blue); border-color: var(--blue); color: white; }
.kyc-step.active .kyc-step-circle { border-color: var(--blue); color: var(--blue); }
.kyc-step-line { flex: 1; height: 2px; background: var(--gray-200); }
.kyc-step.done .kyc-step-line { background: var(--blue); }
.kyc-step-label { font-size: 12px; color: var(--gray-400); margin-left: 8px; white-space: nowrap; }
.kyc-step.active .kyc-step-label, .kyc-step.done .kyc-step-label { color: var(--blue); font-weight: 600; }
.upload-box {
  border: 2px dashed var(--gray-200); border-radius: var(--radius-lg); padding: 2rem; text-align: center;
  color: var(--gray-400); cursor: pointer; transition: all var(--transition); margin-bottom: 14px;
}
.upload-box:hover { border-color: var(--blue); background: var(--blue-bg); }

/* ─── Charts (CSS bars) ─────────────────────────────────── */
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 100px; padding: 0 4px; }
.chart-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chart-bar { width: 100%; background: var(--blue); border-radius: 4px 4px 0 0; min-height: 4px; transition: height .3s; }
.chart-bar-label { font-size: 9px; color: var(--gray-400); }

/* ─── Grid Utilities ─────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr;       gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr;   gap: 20px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 16px; }

/* ─── Flex Utilities ─────────────────────────────────────── */
.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-8   { gap: 8px; }
.gap-12  { gap: 12px; }
.gap-16  { gap: 16px; }
.gap-20  { gap: 20px; }

/* ─── Spacing ───────────────────────────────────────────── */
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-auto { margin-top: auto; }
.p-0   { padding: 0; }

/* ─── ROI / Growth Display ───────────────────────────────── */
.roi-positive { color: var(--green); font-weight: 600; }
.roi-negative { color: var(--red);   font-weight: 600; }
.wallet-balance-box {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border-radius: var(--radius-lg); padding: 2rem; color: white; margin-bottom: 20px;
}
.balance-label { font-size: 13px; opacity: .8; margin-bottom: 6px; }
.balance-amount { font-size: 38px; font-weight: 700; letter-spacing: -.5px; }

/* ─── Notification item ──────────────────────────────────── */
.notif-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--gray-100); }
.notif-item:last-child { border-bottom: none; }
.notif-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.notif-icon.info    { background: var(--blue-light); }
.notif-icon.success { background: var(--green-bg); }
.notif-icon.warning { background: var(--yellow-bg); }
.notif-icon.danger  { background: var(--red-bg); }
.notif-body h4 { font-size: 14px; margin-bottom: 2px; }
.notif-time { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.notif-item.unread { background: var(--blue-bg); margin: 0 -1.5rem; padding: 14px 1.5rem; }

/* ─── Empty State ────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem; color: var(--gray-400); }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .stat-cards { grid-template-columns: repeat(2,1fr); }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 800px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-240px); transition: transform .3s; }
  .sidebar.open { transform: none; --sidebar-w: 240px; }
  .main-content { margin-left: 0; }
  .grid-2, .grid-3, .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .settings-wrap { flex-direction: column; }
  .settings-sidebar { width: 100%; }
}
