/* BinManager Cloud Portal - Enterprise Light Theme */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif; background: #f5f7fa; color: #0f1f33; min-height: 100vh; -webkit-font-smoothing: antialiased; font-size: 14px; }

/* ===== LOGIN ===== */
.login-page { background: linear-gradient(180deg, #f5f7fa 0%, #eaf0f7 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 20px; position: relative; }
.login-card { background: #fff; border-radius: 12px; padding: 36px 38px; width: 440px; box-shadow: 0 1px 2px rgba(15,31,51,0.04), 0 8px 24px rgba(15,31,51,0.08); border: 1px solid #e6ebf2; position: relative; }
.login-tag-wrap { text-align: center; margin-bottom: 14px; }
.login-tag { display: inline-block; padding: 4px 12px; background: #eff5fb; color: #1860b3; border-radius: 999px; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.login-brand { display: flex; justify-content: center; margin-bottom: 10px; }
.login-brand img { height: 44px; width: auto; }
.login-sub { text-align: center; color: #5a6b80; font-size: 13px; margin-bottom: 26px; line-height: 1.5; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11px; color: #5a6b80; margin-bottom: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.field input, .field select { width: 100%; padding: 11px 13px; background: #fff; border: 1px solid #d4dbe4; border-radius: 6px; color: #0f1f33; font-size: 14px; font-family: inherit; transition: all 0.12s; }
.field input:focus, .field select:focus { outline: none; border-color: #1e7bd6; box-shadow: 0 0 0 3px rgba(30,123,214,0.1); }
.btn { width: 100%; padding: 12px; background: #1e7bd6; border: none; border-radius: 6px; color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit; transition: background 0.12s; }
.btn:hover { background: #1968b5; }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: #94a3b8; font-size: 11px; font-weight: 600; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #e6ebf2; }
.sso-btn { width: 100%; padding: 11px; background: #fff; border: 1px solid #d4dbe4; border-radius: 6px; color: #0f1f33; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; font-family: inherit; }
.sso-btn:hover { background: #f9fafc; border-color: #b8c2d1; }
.horizon-note { margin-top: 14px; padding: 10px 12px; background: #f3f7fb; border: 1px solid #d6e3f0; border-radius: 6px; font-size: 11px; color: #1860b3; display: flex; align-items: center; gap: 8px; line-height: 1.5; }
.demo-badge { position: fixed; top: 14px; right: 14px; background: #0f1f33; color: #fff; padding: 5px 11px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; z-index: 999; }
.login-hint { margin-top: 14px; padding: 10px 12px; background: #fafbfc; border: 1px dashed #d4dbe4; border-radius: 6px; font-size: 11px; color: #5a6b80; text-align: center; line-height: 1.5; }
.login-hint b { color: #0f1f33; }
.login-hint a { color: #1e7bd6; font-weight: 600; }
.powered-by { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #94a3b8; text-align: center; }
.powered-by b { color: #5a6b80; }

/* ===== PORTAL LAYOUT ===== */
.portal-layout { display: flex; min-height: 100vh; background: #f5f7fa; }
.sidebar { width: 240px; background: #fff; border-right: 1px solid #e6ebf2; display: flex; flex-direction: column; flex-shrink: 0; }
.side-brand { height: 61px; padding: 0 20px; border-bottom: 1px solid #e6ebf2; display: flex; align-items: center; gap: 8px; }
.side-brand img { height: 28px; width: auto; }
.side-brand .admin-tag { font-size: 9px; color: #92400e; background: #fef3c7; padding: 2px 7px; border-radius: 4px; font-weight: 700; letter-spacing: 0.05em; }
.nav-item { padding: 12px 20px; display: flex; align-items: center; gap: 12px; color: #5a6b80; cursor: pointer; font-size: 13px; font-weight: 500; border-left: 3px solid transparent; text-decoration: none; transition: all 0.12s; }
.nav-item:hover { background: #f5f7fa; color: #0f1f33; }
.nav-item.active { background: #eff5fb; color: #1860b3; border-left-color: #1e7bd6; font-weight: 600; }
.nav-item .icon { width: 18px; height: 18px; flex-shrink: 0; color: #94a3b8; }
.nav-item:hover .icon { color: #5a6b80; }
.nav-item.active .icon { color: #1e7bd6; }
.nav-section { padding: 14px 20px 6px; font-size: 10px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 6px; font-weight: 600; }
.side-footer { margin-top: auto; padding: 14px 18px; border-top: 1px solid #e6ebf2; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #1e7bd6; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 12px; font-weight: 600; color: #0f1f33; }
.user-tenant { font-size: 10px; color: #5a6b80; margin-top: 1px; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 61px; padding: 0 30px; border-bottom: 1px solid #e6ebf2; display: flex; justify-content: space-between; align-items: center; background: #fff; }
.topbar h1 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: #0f1f33; }
.topbar-meta { display: flex; align-items: center; gap: 16px; font-size: 12px; color: #5a6b80; }
.status-dot { display: inline-block; width: 7px; height: 7px; background: #16a34a; border-radius: 50%; margin-right: 6px; }
.content { flex: 1; padding: 26px 30px; max-width: 1400px; width: 100%; }
.greeting { margin-bottom: 22px; }
.greeting h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; color: #0f1f33; }
.greeting p { color: #5a6b80; font-size: 13px; max-width: 740px; line-height: 1.55; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; margin-top: 6px; }
.section-head h3 { font-size: 13px; font-weight: 700; color: #0f1f33; text-transform: uppercase; letter-spacing: 0.04em; }

/* ===== APP CATALOG (mirrors binmanager.com.au card style) ===== */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.app-card { background: #f1f3f6; border: 1px solid #1e7bd6; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: all 0.18s; }
.app-card.tipmanager { border-color: #d97706; }
.app-card.scrapmanager { border-color: #111827; }
.app-card.commercial { border-color: #b91c1c; }
.app-card:hover { box-shadow: 0 8px 22px rgba(15,31,51,0.10); transform: translateY(-2px); }
.app-card.disabled { opacity: 0.7; }
.app-card.disabled:hover { box-shadow: none; transform: none; }
.app-card-body { padding: 26px 22px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; }
.app-icon { width: 86px; height: 86px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.app-icon img { max-width: 86px; max-height: 86px; }
.app-name { font-size: 22px; font-weight: 700; color: #0f1f33; margin-bottom: 12px; letter-spacing: -0.01em; line-height: 1.15; }
.app-desc { font-size: 13px; color: #5a6b80; line-height: 1.55; margin-bottom: 0; }
.app-actions { display: flex; flex-direction: column; }
.app-action-btn { display: block; padding: 10px 10px; text-align: center; font-weight: 700; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; transition: filter 0.12s; color: #fff; background: #1e7bd6; }
.app-action-btn + .app-action-btn { border-top: 1px solid rgba(255,255,255,0.22); }
.app-action-btn:hover { filter: brightness(0.92); }
.app-action-btn.disabled { cursor: not-allowed; pointer-events: none; opacity: 0.5; }
.app-card.disabled .app-action-btn + .app-action-btn { opacity: 0.32; }
.app-card.tipmanager .app-action-btn { background: #d97706; }
.app-card.scrapmanager .app-action-btn { background: #111827; }
.app-card.commercial .app-action-btn { background: #b91c1c; }

/* ===== LAUNCH ===== */
.launch-page { background: #f5f7fa; min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.launch-card { text-align: center; max-width: 480px; padding: 36px 30px; background: #fff; border: 1px solid #e6ebf2; border-radius: 12px; box-shadow: 0 8px 24px rgba(15,31,51,0.06); }
.launch-logo { width: 88px; height: 88px; margin: 0 auto 18px; }
.launch-logo img { width: 100%; height: 100%; object-fit: contain; }
.launch-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; color: #0f1f33; }
.launch-card p { color: #5a6b80; font-size: 13px; margin-bottom: 22px; }
.progress-bar { width: 100%; height: 4px; background: #e6ebf2; border-radius: 2px; overflow: hidden; margin-bottom: 18px; }
.progress-fill { height: 100%; background: #1e7bd6; width: 0%; transition: width 0.4s ease; }
.launch-steps { text-align: left; background: #f9fafc; border: 1px solid #e6ebf2; border-radius: 6px; padding: 14px 16px; }
.step { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 12px; color: #94a3b8; }
.step.done { color: #0f1f33; }
.step.done .step-icon { background: #16a34a; color: #fff; }
.step.active { color: #1860b3; font-weight: 600; }
.step.active .step-icon { background: #1e7bd6; color: #fff; }
.step-icon { width: 16px; height: 16px; border-radius: 50%; background: #e6ebf2; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 9px; color: #5a6b80; font-weight: 700; }

/* ===== ADMIN ===== */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }

/* Enterprise dashboard layout */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi-card { background: #fff; border: 1px solid #e6ebf2; border-radius: 8px; padding: 16px 18px; }
.kpi-label { font-size: 10px; color: #5a6b80; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 8px; }
.kpi-value { font-size: 26px; font-weight: 700; color: #0f1f33; letter-spacing: -0.02em; line-height: 1; }
.kpi-meta { font-size: 11px; color: #5a6b80; margin-top: 8px; }
.dash-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 14px; }
.dash-aside { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.admin-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table th.numeric { text-align: right; }
.admin-table .mono { font-family: 'JetBrains Mono', 'Cascadia Mono', Consolas, ui-monospace, monospace; font-size: 11px; color: #5a6b80; white-space: nowrap; }
.admin-table.compact td { padding: 7px 12px; font-size: 11.5px; }
.panel { background: #fff; border: 1px solid #e6ebf2; border-radius: 8px; padding: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.panel-head h4 { font-size: 12px; font-weight: 700; color: #0f1f33; text-transform: uppercase; letter-spacing: 0.04em; }
.tenant-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f1f3f7; text-decoration: none; color: inherit; }
.tenant-row:last-child { border: none; }
.tenant-row:hover { background: #f9fafc; }
.tenant-info { display: flex; align-items: center; gap: 10px; }
.tenant-logo { width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; }
.tenant-name { font-size: 12px; font-weight: 600; color: #0f1f33; }
.tenant-sub { font-size: 10px; color: #5a6b80; margin-top: 1px; }
.chart { height: 130px; display: flex; align-items: flex-end; gap: 4px; margin-top: 8px; }
.bar { flex: 1; background: #1e7bd6; border-radius: 3px 3px 0 0; opacity: 0.85; }
.bar:hover { opacity: 1; }
.chart-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 9px; color: #94a3b8; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th { background: #f9fafc; color: #5a6b80; padding: 10px 12px; text-align: left; font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #e6ebf2; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid #f1f3f7; color: #0f1f33; }
.admin-table tr:hover td { background: #f9fafc; }
.admin-table .pill { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; }
.admin-table .pill.green { background: #ecfdf5; color: #047857; }
.admin-table .pill.amber { background: #fef3c7; color: #92400e; }
.admin-table .pill.red { background: #fef2f2; color: #b91c1c; }
.admin-table .pill.blue { background: #eff5fb; color: #1860b3; }

/* ===== WIZARD ===== */
.wizard-steps { display: flex; justify-content: space-between; margin-bottom: 30px; position: relative; padding: 0 30px; }
.wizard-steps::before { content: ''; position: absolute; top: 16px; left: 50px; right: 50px; height: 2px; background: #e6ebf2; z-index: 0; }
.wstep { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; z-index: 1; cursor: pointer; }
.wstep-num { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: #94a3b8; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; border: 2px solid #e6ebf2; }
.wstep.active .wstep-num { background: #1e7bd6; color: #fff; border-color: #1e7bd6; }
.wstep.done .wstep-num { background: #16a34a; color: #fff; border-color: #16a34a; }
.wstep-label { font-size: 11px; color: #5a6b80; text-align: center; }
.wstep.active .wstep-label { color: #1860b3; font-weight: 600; }
.wstep.done .wstep-label { color: #0f1f33; }
.wizard-content { background: #fff; border: 1px solid #e6ebf2; border-radius: 10px; padding: 26px; }
.wizard-content h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: #0f1f33; }
.wizard-content > p { color: #5a6b80; font-size: 13px; margin-bottom: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 11px; color: #5a6b80; font-weight: 600; }
.form-field input, .form-field select, .form-field textarea { padding: 9px 12px; background: #fff; border: 1px solid #d4dbe4; border-radius: 5px; color: #0f1f33; font-size: 13px; font-family: inherit; }
.form-field input:focus, .form-field select:focus { outline: none; border-color: #1e7bd6; }
.wizard-actions { display: flex; justify-content: space-between; margin-top: 22px; }
.wizard-btn { padding: 10px 18px; background: #1e7bd6; border: none; border-radius: 6px; color: #fff; font-weight: 600; cursor: pointer; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; font-family: inherit; }
.wizard-btn:hover { background: #1968b5; }
.wizard-btn.secondary { background: #fff; color: #0f1f33; border: 1px solid #d4dbe4; }
.wizard-btn.secondary:hover { background: #f5f7fa; }
.hidden { display: none !important; }
.muted { color: #94a3b8; }
.info-panel { padding: 14px 16px; background: #f3f7fb; border: 1px solid #d6e3f0; border-radius: 8px; font-size: 12px; color: #5a6b80; line-height: 1.5; }
.info-panel b { color: #1860b3; }
