/* AYDSR CRM - matches amann-nordin.com design system exactly */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #304FFE;
  --blue-dark: #1a3ae0;
  --blue-light: #E8EEFF;
  --blue-mid: #748FFF;
  --dark: #0a1440;
  --gray: #6b7280;
  --light-gray: #f9fafb;
  --border: #e5e7eb;
  --white: #ffffff;
  --success: #10b981;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--dark); background: var(--light-gray); line-height: 1.6; font-size: 16px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── NAVBAR (matches main site exactly) ── */
.crm-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 999;
  background: var(--white); border-bottom: 1px solid var(--border);
  height: 72px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 3rem; box-shadow: 0 1px 12px rgba(48,79,254,0.07);
}
.crm-header .logo {
  font-family: 'Arial Black', 'Impact', 'Franklin Gothic Heavy', sans-serif;
  font-weight: 900; font-size: 24px; color: var(--blue);
  letter-spacing: 1px; white-space: nowrap; text-decoration: none;
}
.crm-header .logo .dot { font-family: Arial, sans-serif; font-size: 28px; vertical-align: -3px; font-weight: 900; }
.crm-header .nav-right { display: flex; align-items: center; gap: 1rem; }
.crm-header a.nav-about { font-size: 14px; font-weight: 500; color: var(--dark); padding: 8px 14px; border-radius: 8px; transition: all .2s; }
.crm-header a.nav-about:hover { color: var(--blue); background: var(--blue-light); }
.crm-header a.nav-cta { background: var(--blue); color: white; padding: 10px 22px; border-radius: 8px; font-size: 14px; font-weight: 600; transition: background .2s; white-space: nowrap; }
.crm-header a.nav-cta:hover { background: var(--blue-dark); }

/* ── LAYOUT ── */
.crm-container { max-width: 1100px; margin: 0 auto; padding: 100px 24px 40px; }

.crm-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 14px;
  padding: 28px; margin-bottom: 20px; box-shadow: 0 2px 12px rgba(10,20,64,0.04);
}

.crm-credit-balance { font-size: 42px; font-weight: 800; color: var(--blue); }

/* ── BUTTONS (matches btn-primary / btn-secondary) ── */
.crm-btn {
  background: var(--blue); color: white; border: none;
  padding: 14px 28px; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif;
}
.crm-btn:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(48,79,254,0.3); }

.crm-btn-outline {
  background: transparent; color: var(--dark); border: 2px solid var(--border);
  padding: 12px 26px;
}
.crm-btn-outline:hover { border-color: var(--blue); color: var(--blue); background: transparent; transform: none; box-shadow: none; }

/* ── FORM ELEMENTS ── */
.crm-input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 15px; margin-bottom: 14px; font-family: 'Inter', sans-serif; color: var(--dark);
}
.crm-input:focus { outline: none; border-color: var(--blue); }

.crm-label { font-size: 13px; font-weight: 600; color: var(--gray); margin-bottom: 6px; display: block; text-transform: uppercase; letter-spacing: 0.3px; }

/* ── TABLE ── */
.crm-table { width: 100%; border-collapse: collapse; }
.crm-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--gray); padding: 10px; border-bottom: 2px solid var(--border); font-weight: 600;
}
.crm-table td { padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: 14px; }

.crm-badge {
  display: inline-block; padding: 4px 10px; border-radius: 100px; font-size: 12px;
  font-weight: 600; background: var(--blue-light); color: var(--blue);
}

.crm-error { color: #dc2626; font-size: 13px; margin: -8px 0 14px; }
.crm-success { color: var(--success); font-size: 13px; margin: -8px 0 14px; }

/* ── STAT GRID ── */
.crm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.crm-stat-box {
  background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
  box-shadow: 0 2px 12px rgba(10,20,64,0.04);
}
.crm-stat-box .label { font-size: 11px; color: var(--gray); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
.crm-stat-box .value { font-size: 30px; font-weight: 800; color: var(--dark); margin-top: 6px; }

a.crm-link { color: var(--blue); font-weight: 500; }
a.crm-link:hover { text-decoration: underline; }

/* ── SITE FOOTER (matches amann-nordin.com main site exactly) ── */
.site-footer { background: var(--dark); padding: 60px 2rem 30px; margin-top: 60px; }
.site-footer .footer-inner { max-width: 1200px; margin: 0 auto; }
.site-footer .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.site-footer .footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 1rem; }
.site-footer .footer-brand p { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.7; max-width: 280px; }
.site-footer .footer-social { display: flex; gap: 10px; margin-top: 1.5rem; }
.site-footer .footer-social a { width: 36px; height: 36px; background: rgba(255,255,255,0.08); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6); font-size: 14px; transition: all .2s; text-decoration:none; }
.site-footer .footer-social a:hover { background: var(--blue); color: white; }
.site-footer .footer-col h5 { font-size: 13px; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1.2rem; }
.site-footer .footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; padding:0; margin:0; }
.site-footer .footer-col ul li a { font-size: 14px; color: rgba(255,255,255,0.5); transition: color .2s; text-decoration:none; }
.site-footer .footer-col ul li a:hover { color: white; }
.site-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer .footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.4); margin:0; }
.site-footer .footer-bottom-links { display: flex; gap: 1.5rem; }
.site-footer .footer-bottom-links a { font-size: 13px; color: rgba(255,255,255,0.4); transition: color .2s; text-decoration:none; }
.site-footer .footer-bottom-links a:hover { color: white; }
@media (max-width: 800px) {
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .site-footer .footer-grid { grid-template-columns: 1fr; }
  .site-footer .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── ADMIN POWER-UPS: badges, PnL, tabs ── */
.crm-pill { display:inline-block; padding:3px 10px; border-radius:100px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.3px; }
.crm-pill-green { background:#dcfce7; color:#15803d; }
.crm-pill-red { background:#fee2e2; color:#dc2626; }
.crm-pill-gray { background:#f3f4f6; color:#6b7280; }
.pnl-pos { color: var(--success); font-weight: 700; }
.pnl-neg { color: #dc2626; font-weight: 700; }
.crm-tabs { display:flex; gap:4px; border-bottom:2px solid var(--border); margin-bottom:20px; }
.crm-tab { padding:10px 18px; font-size:14px; font-weight:600; color:var(--gray); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px; }
.crm-tab.active { color:var(--blue); border-bottom-color:var(--blue); }
.crm-tab-badge { display:inline-block; background:#dc2626; color:white; font-size:11px; font-weight:700; border-radius:100px; padding:1px 7px; margin-left:6px; vertical-align:middle; }
.crm-modal-backdrop { position:fixed; inset:0; background:rgba(10,20,64,0.5); z-index:9998; display:flex; align-items:center; justify-content:center; padding:20px; }
.crm-modal { background:#fff; border-radius:16px; padding:28px; max-width:600px; width:100%; max-height:85vh; overflow-y:auto; }
.crm-modal-close { float:right; cursor:pointer; color:var(--gray); font-size:20px; background:none; border:none; }
.crm-small-btn { padding:6px 12px; font-size:12px; border-radius:6px; }

/* ── INFO TOOLTIP BUTTON (used on partner request forms) ── */
.crm-info-btn {
  display:inline-flex; align-items:center; justify-content:center;
  width:16px; height:16px; border-radius:50%; background:var(--blue-light); color:var(--blue);
  font-size:11px; font-weight:700; font-style:italic; font-family:Georgia, serif;
  cursor:pointer; user-select:none; flex-shrink:0; text-transform:none; letter-spacing:0;
}
.crm-info-btn:hover { background:var(--blue); color:white; }
.crm-info-box {
  background:var(--blue-light); color:var(--blue-dark); font-size:12.5px; line-height:1.5;
  padding:10px 12px; border-radius:8px; margin:-4px 0 14px;
}

/* ── NOTIFICATION BELL ── */
.crm-notif-wrap { position: relative; }
.crm-notif-bell {
  position: relative; width: 40px; height: 40px; border-radius: 10px; border: none;
  background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--dark); transition: background .2s;
}
.crm-notif-bell:hover { background: var(--blue-light); }
.crm-notif-bell svg { width: 20px; height: 20px; }
.crm-notif-dot {
  position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px;
  background: #dc2626; color: white; border-radius: 100px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.crm-notif-dropdown {
  position: absolute; top: 50px; right: 0; width: 360px; max-width: 90vw; max-height: 440px;
  overflow-y: auto; background: var(--white); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(10,20,64,0.16); z-index: 1000; display: none;
}
.crm-notif-dropdown.open { display: block; }
.crm-notif-header {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 16px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--white);
}
.crm-notif-header h4 { font-size: 14px; margin: 0; }
.crm-notif-header button {
  background: none; border: none; color: var(--blue); font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.crm-notif-item { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.crm-notif-item:last-child { border-bottom: none; }
.crm-notif-item.unread { background: var(--blue-light); }
.crm-notif-item .title { font-size: 13px; font-weight: 700; color: var(--dark); margin-bottom: 3px; }
.crm-notif-item .msg { font-size: 12.5px; color: var(--gray); line-height: 1.5; }
.crm-notif-item .time { font-size: 11px; color: var(--gray); margin-top: 5px; }
.crm-notif-empty { padding: 30px 16px; text-align: center; color: var(--gray); font-size: 13px; }

/* ── BROKER LINK CARDS (client dashboard) ── */
.crm-broker-list { display: flex; flex-direction: column; gap: 10px; }
.crm-broker-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--light-gray);
}
.crm-broker-row .name { font-weight: 700; font-size: 14px; color: var(--dark); }
.crm-broker-row .tag { font-size: 11px; color: var(--gray); text-transform: uppercase; letter-spacing: 0.3px; }

/* ── TRADING ACCOUNT LIST (client dashboard) ── */
.crm-account-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px;
}
.crm-account-row .acct-main { font-weight: 700; font-size: 14px; }
.crm-account-row .acct-sub { font-size: 12.5px; color: var(--gray); margin-top: 2px; }
.crm-account-row .reject-reason { font-size: 12.5px; color: #dc2626; margin-top: 4px; }

/* ── PARTNER PROGRAM STATUS BANNERS ── */
.crm-banner { border-radius:12px; padding:16px 18px; font-size:14px; line-height:1.5; }
.crm-banner-pending { background:#fef9c3; color:#854d0e; }
.crm-banner-approved { background:#dcfce7; color:#15803d; }
.crm-banner-rejected { background:#fee2e2; color:#991b1b; }
.crm-banner-waiting { background:var(--blue-light); color:var(--blue-dark); }
.crm-banner h4 { margin:0 0 6px; font-size:14px; }
.crm-banner-dismiss { background:none; border:none; color:inherit; text-decoration:underline; font-size:12px; cursor:pointer; padding:0; margin-top:10px; font-family:'Inter',sans-serif; }
