/* Infinity Corporate OS - v2.0 Absolute Rewrite */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-dark: #000000;
  --bg-panel: #09090b;
  --bg-hover: #18181b;
  --bg-card: #09090b;

  --border-subtle: #27272a;
  --border-hover: #3f3f46;

  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;

  --brand-coral: #ff6b6b;
  --brand-coral-hover: #fc8181;
  --brand-coral-subtle: rgba(255, 107, 107, 0.1);
  --status-red: #ff3b30;
  --status-yellow: #ffcc00;
  --status-green: #34c759;
  --status-blue: #007aff;
  --status-orange: #ff9500;

  --font-main: 'Outfit', sans-serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.6);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

body.light-mode {
  --bg-dark: #f4f4f5;
  --bg-panel: #ffffff;
  --bg-hover: #f1f1f3;
  --bg-card: #ffffff;

  --border-subtle: #e4e4e7;
  --border-hover: #d4d4d8;

  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #71717a;

  --brand-coral: #fa5252;
  --brand-coral-hover: #e03131;
  --brand-coral-subtle: rgba(250, 82, 82, 0.1);
  
  --status-red: #ff3b30;
  --status-yellow: #ffcc00;
  --status-green: #34c759;
  --status-blue: #007aff;
  --status-orange: #ff9500;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-main); background: var(--bg-dark); color: var(--text-primary);
  min-height: 100vh; display: flex; overflow: hidden; -webkit-font-smoothing: antialiased;
}

/* Base scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Typography */
h1 { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary); }
h2 { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; color: var(--text-primary); }
h3 { font-size: 18px; font-weight: 500; color: var(--text-primary); }
.text-muted { color: var(--text-secondary); }

/* New Layout Shell */
#app { width: 100vw; height: 100vh; display: flex; flex-direction: column; }

/* Top Floating Nav */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 32px; border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-panel); z-index: 50;
}

.nav-links { display: flex; gap: 8px; align-items: center; margin-left: 48px; }
.nav-link {
  font-size: 16px; font-weight: 500; color: var(--text-secondary); cursor: pointer;
  transition: all 0.2s ease; padding: 10px 18px; border-radius: var(--radius-sm);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-link.active { color: var(--brand-coral); background: var(--brand-coral-subtle); }

.user-pill {
  display: flex; align-items: center; gap: 12px; padding: 6px 16px 6px 6px;
  background: var(--bg-dark); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill); cursor: pointer; transition: all 0.2s ease;
}
.user-pill:hover { border-color: var(--border-hover); background: var(--bg-hover); }

/* Cards & Panels */
.panel {
  background: var(--bg-panel); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 24px;
}
.card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 16px; transition: all 0.2s ease;
}
.card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Logo */
.brand-logo {
  position: relative; font-size: 28px; font-weight: 700; color: #fff;
  letter-spacing: -1.5px; z-index: 1; padding-left: 4px; display: inline-flex; align-items: center; gap: 8px;
}
.brand-logo::before {
  content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand-coral); z-index: -1;
}

/* Actions */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; border: none; outline: none;
}
.btn-primary { background: var(--text-primary); color: var(--bg-dark); }
.btn-primary:hover { background: var(--brand-coral); color: #fff; box-shadow: 0 4px 14px rgba(255,107,107,0.3); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border-subtle); }
.btn-outline:hover { border-color: var(--border-hover); background: var(--bg-hover); }
.btn-danger { background: transparent; color: #ff3b30; }
.btn-danger:hover { background: rgba(255,59,48,0.1); }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 6px 12px; }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); border-radius: var(--radius-sm); }

/* Main Content Area */
.main-wrapper { flex: 1; padding: 40px 64px; overflow-y: auto; background: var(--bg-dark); }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }

/* Grid Dashboard */
.bento-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 40px;
}
.bento-card {
  background: var(--bg-panel); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 24px;
  display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden;
}
.bento-val { font-size: 48px; font-weight: 600; color: var(--text-primary); letter-spacing: -1px; }
.bento-lbl { font-size: 15px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }

.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 40px; }
.status-item { padding: 16px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); text-align: center; }

/* Calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 16px; margin-top: 16px; }
.cal-header { display: grid; grid-template-columns: repeat(7, 1fr); gap: 16px; margin-bottom: 8px; }
.cal-day-name { text-align: right; font-size: 14px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; padding-right: 8px; }
.cal-cell {
  background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  min-height: 150px; padding: 14px; display: flex; flex-direction: column; gap: 8px; transition: all 0.2s;
}
.cal-cell:hover { border-color: var(--border-hover); background: var(--bg-hover); }
.cal-date { font-size: 18px; font-weight: 600; color: var(--text-muted); align-self: flex-end; }
.cal-date.today { color: var(--brand-coral); }

.task-pill {
  font-size: 11px; padding: 6px 10px; border-radius: 4px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle); color: var(--text-primary); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.task-pill:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.06); }

/* Progress bars */
.progress-bg { width: 100%; height: 6px; background: var(--border-subtle); border-radius: 3px; overflow: hidden; margin-top: 12px; }
.progress-fill { height: 100%; background: var(--brand-coral); border-radius: 3px; }
.company-list { display: flex; flex-direction: column; gap: 16px; }

/* Login */
.login-screen {
  display: flex; align-items: center; justify-content: center; width: 100vw; height: 100vh;
  background: var(--bg-dark);
}
.login-box {
  width: 100%; max-width: 380px; padding: 48px 40px; background: var(--bg-panel);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 24px;
}
.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-label { font-size: 15px; color: var(--text-secondary); font-weight: 500; }
.input-field {
  padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);
  background: var(--bg-dark); color: var(--text-primary); font-family: var(--font-main);
  outline: none; transition: all 0.2s; font-size: 16px;
}
.input-field:focus { border-color: var(--brand-coral); box-shadow: 0 0 0 2px var(--brand-coral-subtle); }

/* Helpers */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
