/* ===== PlaceDrive - Violet & Off-White Theme ===== */
:root {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --primary-light: #a78bfa;
  --primary-xlight: #ede9fe;
  --accent: #8b5cf6;
  --bg: #faf9f7;
  --bg2: #f3f0ff;
  --white: #ffffff;
  --text: #1e1b2e;
  --text-muted: #6b7280;
  --border: #e5e0f8;
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #0284c7;
  --shadow: 0 4px 24px rgba(124,58,237,0.10);
  --radius: 12px;
  --radius-sm: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* === NAVBAR === */
.navbar {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 16px rgba(124,58,237,0.07);
}
.navbar-brand { font-size: 1.4rem; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.navbar-brand span { background: var(--primary); color: #fff; border-radius: 8px; padding: 2px 10px; }
.nav-links { display: flex; gap: 0.5rem; align-items: center; }
.nav-links a { padding: 6px 14px; border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 500; transition: all 0.2s; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { background: var(--primary-xlight); color: var(--primary); }
.nav-btn { background: var(--primary); color: #fff !important; border-radius: var(--radius-sm); padding: 8px 18px !important; font-weight: 600 !important; transition: background 0.2s !important; }
.nav-btn:hover { background: var(--primary-dark) !important; color: #fff !important; }
.hamburger { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--primary); }

/* === SIDEBAR (Admin) === */
.sidebar {
  width: 240px; background: var(--white); height: 100vh; position: fixed; top: 0; left: 0;
  border-right: 2px solid var(--border); padding: 1rem 0; z-index: 200; transition: transform 0.3s;
  overflow-y: auto;
}
.sidebar-brand { padding: 0.5rem 1.5rem 1.5rem; font-size: 1.3rem; font-weight: 800; color: var(--primary); border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 10px 1.5rem; color: var(--text-muted); font-weight: 500; transition: all 0.2s; font-size: 0.95rem; }
.sidebar a:hover, .sidebar a.active { background: var(--primary-xlight); color: var(--primary); border-right: 3px solid var(--primary); }
.sidebar a i { width: 20px; text-align: center; }
.admin-content { margin-left: 240px; padding: 2rem; min-height: 100vh; background: var(--bg); }

/* === CARDS === */
.card { background: var(--white); border-radius: var(--radius); border: 1.5px solid var(--border); padding: 1.5rem; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(124,58,237,0.13); }
.card-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.card-meta { font-size: 0.85rem; color: var(--text-muted); }

/* === STAT CARDS === */
.stat-card { background: var(--primary); color: #fff; border-radius: var(--radius); padding: 1.5rem; text-align: center; }
.stat-card.green { background: var(--success); }
.stat-card.orange { background: var(--warning); }
.stat-card.blue { background: var(--info); }
.stat-num { font-size: 2.2rem; font-weight: 800; }
.stat-label { font-size: 0.9rem; opacity: 0.9; margin-top: 4px; }

/* === BUTTONS === */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 20px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.92rem; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 0.82rem; }
.btn-block { width: 100%; justify-content: center; }

/* === FORMS === */
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--text); font-size: 0.92rem; }
.form-control { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.95rem; background: var(--white); color: var(--text); transition: border-color 0.2s; outline: none; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.12); }
select.form-control { cursor: pointer; }

/* === BADGES === */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.badge-primary { background: var(--primary-xlight); color: var(--primary); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #e0f2fe; color: #075985; }

/* === ALERTS === */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.92rem; border-left: 4px solid; }
.alert-success { background: #d1fae5; border-color: var(--success); color: #065f46; }
.alert-danger { background: #fee2e2; border-color: var(--danger); color: #991b1b; }
.alert-info { background: #e0f2fe; border-color: var(--info); color: #075985; }
.alert-warning { background: #fef3c7; border-color: var(--warning); color: #92400e; }

/* === TABLE === */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1.5px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: var(--white); }
th { background: var(--primary-xlight); color: var(--primary); padding: 12px 16px; text-align: left; font-size: 0.88rem; font-weight: 700; white-space: nowrap; }
td { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 0.92rem; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #faf5ff; }

/* === GRID === */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* === PAGE HEADER === */
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.page-header p { color: var(--text-muted); margin-top: 4px; }

/* === COMPANY CARD === */
.company-card { border-left: 4px solid var(--primary); position: relative; }
.company-logo { width: 56px; height: 56px; border-radius: 10px; background: var(--primary-xlight); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; color: var(--primary); flex-shrink: 0; }
.company-header { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.company-info { flex: 1; }
.company-name { font-size: 1.1rem; font-weight: 700; }
.company-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.75rem; }
.eligible-badge { position: absolute; top: 1rem; right: 1rem; }

/* === HERO === */
.hero { background: linear-gradient(135deg, var(--primary) 0%, #a78bfa 100%); color: #fff; padding: 4rem 2rem; text-align: center; }
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; opacity: 0.9; max-width: 500px; margin: 0 auto 2rem; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: var(--primary-xlight); }
.btn-ghost { background: transparent; border: 2px solid #fff; color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.15); }

/* === AUTH === */
.auth-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary-xlight) 0%, var(--bg) 100%); padding: 2rem; }
.auth-box { background: var(--white); border-radius: 18px; padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: 0 8px 40px rgba(124,58,237,0.15); }
.auth-logo { text-align: center; margin-bottom: 2rem; font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.auth-tabs { display: flex; background: var(--bg2); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 1.5rem; }
.auth-tab { flex: 1; text-align: center; padding: 8px; border-radius: 6px; cursor: pointer; font-weight: 600; color: var(--text-muted); transition: all 0.2s; font-size: 0.92rem; }
.auth-tab.active { background: var(--primary); color: #fff; }

/* === RESOURCE CARD === */
.resource-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.resource-card { display: flex; gap: 1rem; align-items: flex-start; }
.resource-info { flex: 1; }

/* === SIDEBAR TOGGLE === */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 150; }

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
  .nav-links { display: none; position: fixed; top: 64px; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 1rem; border-bottom: 2px solid var(--border); z-index: 99; gap: 0.25rem; }
  .nav-links.open { display: flex; }
  .hamburger { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .admin-content { margin-left: 0; padding: 1rem; }
  .auth-box { padding: 1.5rem; }
  .hero { padding: 2.5rem 1rem; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .stat-num { font-size: 1.6rem; }
  td, th { padding: 8px 10px; }
}

/* === UTILITY === */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-100 { width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 2rem 0; }
.divider { border: none; border-top: 1.5px solid var(--border); margin: 1.5rem 0; }
.hidden { display: none !important; }
