/* ============================================================
   MyStartupClub — Main CSS
   ============================================================ */

:root {
  --ink:     #0e1117;
  --paper:   #f7f5f0;
  --cream:   #ede9e0;
  --accent:  #e8622a;
  --accent2: #2a7ae8;
  --muted:   #6b6860;
  --border:  #d9d5cc;
  --white:   #ffffff;
  --card-bg: #fdfcfa;
  --success: #1a9e5c;
  --danger:  #dc3545;
  --warning: #e8a020;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  padding-top: 68px;
}

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4,h5 { font-family: 'Syne', sans-serif; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.1; letter-spacing: -1px; }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.15; letter-spacing: -0.5px; }
h3 { font-size: 1.15rem; }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── LAYOUT ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }
section { padding: 80px 5%; }
.max-w { max-width: 1200px; margin: 0 auto; }
.section-label {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.75rem;
}

/* ── NAVBAR ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(247,245,240,0.96); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 5%; height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}
.nav-logo {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.3rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.5px; white-space: nowrap;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a {
  font-size: 0.88rem; font-weight: 500; color: var(--muted);
  text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-admin { color: var(--accent) !important; }
.nav-cta { display: flex; gap: 0.6rem; align-items: center; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; }

/* User dropdown */
.nav-user-menu { position: relative; }
.nav-user-btn {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 0.4rem 0.9rem;
  font-family: 'DM Sans', sans-serif; font-size: 0.875rem;
  font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 0.5rem;
}
.nav-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 10px; min-width: 190px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12); padding: 0.5rem 0; z-index: 300;
}
.nav-dropdown.open { display: block; }
.nav-dropdown a {
  display: block; padding: 0.55rem 1.1rem;
  font-size: 0.875rem; color: var(--ink); text-decoration: none;
  transition: background 0.15s;
}
.nav-dropdown a:hover { background: var(--paper); }
.nav-dropdown a.text-danger { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 0.4rem 0; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.2rem; border-radius: 7px;
  font-family: 'DM Sans', sans-serif; font-weight: 500;
  font-size: 0.875rem; text-decoration: none; cursor: pointer;
  border: none; transition: all 0.2s; white-space: nowrap;
}
.btn-primary  { background: var(--accent); color: var(--white); }
.btn-primary:hover  { background: #d4521f; text-decoration: none; }
.btn-secondary{ background: var(--ink); color: var(--white); }
.btn-secondary:hover{ background: #1e2530; text-decoration: none; }
.btn-ghost    { background: transparent; color: var(--ink); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--ink); text-decoration: none; }
.btn-danger   { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #b52d3a; text-decoration: none; }
.btn-success  { background: var(--success); color: var(--white); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.8rem 1.8rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── FORMS ── */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 500; margin-bottom: 0.4rem; }
.form-control {
  width: 100%; background: var(--paper); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 0.7rem 0.9rem;
  font-family: 'DM Sans', sans-serif; font-size: 0.875rem; color: var(--ink);
  outline: none; transition: border-color 0.2s;
}
.form-control:focus { border-color: var(--accent); }
textarea.form-control { min-height: 120px; resize: vertical; }
.form-hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.form-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.input-error { border-color: var(--danger) !important; }
.error-msg { font-size: 0.78rem; color: var(--danger); margin-top: 0.3rem; }

/* ── FLASH MESSAGES ── */
.flash {
  padding: 0.9rem 1.25rem; margin: 0; font-size: 0.875rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid transparent;
}
.flash button { background: none; border: none; font-size: 1.2rem; cursor: pointer; opacity: 0.5; }
.flash-success { background: #dff0e8; color: #1a6e47; border-color: #b8dfc9; }
.flash-error   { background: #fde8ea; color: #8b2030; border-color: #f5c2c7; }
.flash-warning { background: #fff3cd; color: #856404; border-color: #ffecb5; }
.flash-info    { background: #cfe2ff; color: #084298; border-color: #b6d4fe; }

/* ── CARDS ── */
.card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 12px; overflow: hidden; transition: all 0.25s;
}
.card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
.card-body { padding: 1.5rem; }
.card-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); font-weight: 600; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); }

/* ── BADGES ── */
.badge {
  display: inline-block; padding: 0.25rem 0.7rem;
  border-radius: 100px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.3px;
}
.badge-central { background: #fff0e6; color: #a84e10; }
.badge-state   { background: #e8f0ff; color: #1a4ea0; }
.badge-local   { background: #f0fff8; color: #126840; }
.badge-all     { background: #f0f0f0; color: #555; }
.badge-success { background: #dff0e8; color: #1a6e47; }
.badge-danger  { background: #fde8ea; color: #8b2030; }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead tr { background: var(--paper); }
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
tr:hover td { background: var(--paper); }
.table-actions { display: flex; gap: 0.5rem; }

/* ── HERO ── */
.hero {
  padding: 80px 5% 80px;
  background: radial-gradient(ellipse 60% 50% at 80% 20%, rgba(232,98,42,0.07) 0%, transparent 60%),
              radial-gradient(ellipse 40% 40% at 10% 80%, rgba(42,122,232,0.06) 0%, transparent 60%);
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 100px; padding: 0.3rem 1rem;
  font-size: 0.78rem; font-weight: 500; color: var(--muted); margin-bottom: 1.25rem;
}
.hero-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

/* ── DOCUMENT CARDS ── */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.doc-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 1.5rem; transition: all 0.2s;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.doc-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(232,98,42,0.1); }
.doc-card-top { display: flex; align-items: flex-start; gap: 0.75rem; }
.doc-icon { font-size: 2rem; flex-shrink: 0; }
.doc-card h3 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.doc-card p { font-size: 0.82rem; color: var(--muted); }
.doc-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--border); }

/* ── CATEGORY CARDS ── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.1rem; }
.cat-card {
  background: var(--white); border: 1.5px solid var(--border); border-radius: 12px;
  padding: 1.5rem 1.25rem; text-align: center; cursor: pointer;
  transition: all 0.2s; position: relative; overflow: hidden; text-decoration: none; color: var(--ink);
  display: block;
}
.cat-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--accent); transform: scaleX(0); transition: transform 0.2s;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.cat-card:hover::after { transform: scaleX(1); }
.cat-icon { font-size: 2rem; margin-bottom: 0.6rem; }
.cat-card h3 { font-size: 0.9rem; margin-bottom: 0.25rem; }
.cat-count { font-size: 0.75rem; color: var(--muted); }

/* ── CALENDAR ── */
.cal-wrap { background: var(--white); border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; }
.cal-head { background: var(--ink); color: white; padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.cal-head h3 { font-size: 1rem; color: white; }
.cal-nav-btn { background: rgba(255,255,255,0.1); border: none; color: white; width: 30px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 1rem; transition: background 0.2s; }
.cal-nav-btn:hover { background: rgba(255,255,255,0.2); }
.cal-days-header { display: grid; grid-template-columns: repeat(7,1fr); background: var(--paper); }
.cal-day-name { text-align: center; padding: 0.6rem; font-size: 0.7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; padding: 0.75rem; }
.cal-cell { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 7px; font-size: 0.82rem; cursor: default; position: relative; }
.cal-cell.other { color: #ccc; }
.cal-cell.today { background: var(--ink); color: white; font-weight: 700; }
.cal-cell.has-due { font-weight: 600; cursor: pointer; }
.cal-cell.has-due:hover { background: var(--paper); }
.due-dot { width: 5px; height: 5px; border-radius: 50%; position: absolute; bottom: 3px; }

/* ── AUTH PAGES ── */
.auth-wrap { min-height: calc(100vh - 68px); display: flex; align-items: center; justify-content: center; padding: 2rem 5%; }
.auth-card { background: var(--white); border: 1.5px solid var(--border); border-radius: 16px; padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.08); }
.auth-card h2 { margin-bottom: 0.25rem; }
.auth-card .subtitle { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.75rem; }
.social-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  padding: 0.7rem; border: 1.5px solid var(--border); border-radius: 8px;
  background: white; cursor: pointer; font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem; font-weight: 500; transition: border-color 0.2s; margin-bottom: 0.75rem;
}
.social-btn:hover { border-color: var(--ink); }
.divider { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: 0.8rem; margin: 1rem 0; }
.divider::before,.divider::after { content:''; flex:1; height:1px; background:var(--border); }
.auth-switch { text-align: center; font-size: 0.875rem; color: var(--muted); margin-top: 1.25rem; }

/* ── ADMIN ── */
.admin-layout { display: flex; min-height: calc(100vh - 68px); }
.admin-sidebar {
  width: 240px; flex-shrink: 0; background: var(--ink); padding: 1.5rem 0;
  position: sticky; top: 68px; height: calc(100vh - 68px); overflow-y: auto;
}
.sidebar-section { padding: 0.5rem 0 0.75rem; }
.sidebar-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.3); padding: 0 1.25rem 0.5rem; }
.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 1.25rem; color: rgba(255,255,255,0.6);
  text-decoration: none; font-size: 0.875rem; transition: all 0.15s;
}
.sidebar-link:hover,.sidebar-link.active { background: rgba(255,255,255,0.07); color: white; text-decoration: none; }
.sidebar-link.active { border-left: 3px solid var(--accent); }
.admin-content { flex: 1; padding: 2rem; overflow-x: auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.admin-header h1 { font-size: 1.5rem; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card { background: var(--white); border: 1.5px solid var(--border); border-radius: 12px; padding: 1.5rem; }
.stat-card .stat-num { font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800; color: var(--ink); }
.stat-card .stat-label { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.stat-card .stat-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }

/* ── PAGINATION ── */
.pagination { display: flex; gap: 0.4rem; justify-content: center; margin-top: 2rem; }
.page-link {
  padding: 0.45rem 0.85rem; border-radius: 6px; font-size: 0.875rem;
  border: 1.5px solid var(--border); background: var(--white);
  color: var(--ink); text-decoration: none; transition: all 0.15s;
}
.page-link:hover { border-color: var(--accent); text-decoration: none; }
.page-link.active { background: var(--accent); border-color: var(--accent); color: white; }
.page-link.disabled { opacity: 0.4; pointer-events: none; }

/* ── SEARCH BAR ── */
.search-bar { display: flex; gap: 0.75rem; margin-bottom: 2rem; flex-wrap: wrap; }
.search-bar .form-control { flex: 1; min-width: 200px; }
.search-bar select.form-control { max-width: 200px; }
.search-bar input[type=text].form-control { max-width: 400px; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--muted); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; color: var(--ink); margin-bottom: 0.5rem; }

/* ── FOOTER ── */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.45); padding: 3rem 5%; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; }
.footer-logo { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.2rem; color: white; text-decoration: none; display: block; margin-bottom: 0.6rem; }
.footer-logo span { color: var(--accent); }
.footer-brand p { font-size: 0.85rem; line-height: 1.65; }
.footer-col h4 { font-family: 'Syne', sans-serif; font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: 0.9rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a { color: rgba(255,255,255,0.38); font-size: 0.875rem; text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: white; }
.footer-bottom { max-width: 1200px; margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.07); display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; flex-wrap: wrap; gap: 1rem; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--border); padding: 1rem 5%; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-sidebar.open { display: block; position: fixed; z-index: 300; top: 68px; bottom: 0; left: 0; }
}
@media (max-width: 600px) {
  section { padding: 50px 5%; }
  .footer-inner { grid-template-columns: 1fr; }
  .doc-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
}
