/* ============================================================
   MAINUNIT — Main Stylesheet
   ============================================================ */

@import url('mainunit-theme.css');
@import url('navigation.css');

/* ── Auth pages (no sidebar) ─────────────────────── */
.auth-shell {
  min-height: 100vh;
  display: flex;
}

/* Split-screen: brand left, form right */
.auth-brand {
  flex: 1;
  background: linear-gradient(160deg, var(--mu-deep) 0%, #0d2461 50%, #0a3580 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--mu-2xl);
  position: relative;
  overflow: hidden;
}
.auth-brand::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(10,79,255,.15);
  top: -100px;
  right: -100px;
}
.auth-brand::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(46,168,255,.1);
  bottom: -80px;
  left: -80px;
}

.auth-brand-content { position: relative; z-index: 1; text-align: center; }

.auth-brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--mu-primary), var(--mu-glow));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: var(--mu-weight-bold);
  color: white;
  margin: 0 auto var(--mu-lg);
  box-shadow: 0 8px 32px rgba(10,79,255,.4);
}

.auth-brand-img {
  height: 72px;
  width: auto;
  margin: 0 auto var(--mu-lg);
  border-radius: 16px;
}

.auth-brand h1 {
  font-size: 32px;
  font-weight: var(--mu-weight-bold);
  color: var(--mu-white);
  margin-bottom: var(--mu-sm);
  line-height: 1.2;
}
.auth-brand p {
  font-size: 15px;
  color: rgba(255,255,255,.6);
  max-width: 320px;
  line-height: 1.7;
}

.auth-brand-features {
  margin-top: var(--mu-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--mu-md);
  text-align: left;
}
.auth-feature {
  display: flex;
  align-items: center;
  gap: var(--mu-md);
  color: rgba(255,255,255,.8);
  font-size: 14px;
}
.auth-feature-dot {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.auth-form-panel {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--mu-2xl);
  background: var(--mu-white);
}

.auth-form-header { margin-bottom: var(--mu-xl); }
.auth-form-header h2 { font-size: 24px; margin-bottom: 6px; }
.auth-form-header p { color: var(--mu-mid); font-size: 14px; }

.auth-form-footer {
  margin-top: var(--mu-xl);
  padding-top: var(--mu-lg);
  border-top: 1px solid var(--mu-border);
  text-align: center;
  font-size: 14px;
  color: var(--mu-mid);
}
.auth-form-footer a { color: var(--mu-primary); font-weight: var(--mu-weight-medium); }

/* Auth responsive: stack on mobile */
@media (max-width: 768px) {
  .auth-shell { flex-direction: column; }
  .auth-brand { min-height: 220px; flex: none; padding: var(--mu-xl) var(--mu-lg); }
  .auth-brand::before, .auth-brand::after { display: none; }
  .auth-brand h1 { font-size: 22px; }
  .auth-brand-features { display: none; }
  .auth-form-panel { max-width: 100%; padding: var(--mu-lg); }
}

/* Signup: wider panel */
.auth-form-panel.wide { max-width: 640px; }

/* ── Dashboard cards ─────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--mu-lg);
}
.dashboard-card {
  background: var(--mu-white);
  border-radius: var(--mu-radius);
  border: 1px solid var(--mu-border);
  padding: var(--mu-xl);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--mu-md);
  transition: all var(--mu-transition);
  box-shadow: var(--mu-shadow-xs);
}
.dashboard-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--mu-shadow-md);
  border-color: var(--mu-primary);
  text-decoration: none;
}
.dashboard-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.dc-blue   { background: rgba(10,79,255,.1); }
.dc-green  { background: rgba(22,163,74,.1); }
.dc-purple { background: rgba(124,58,237,.1); }
.dc-teal   { background: rgba(8,145,178,.1); }
.dc-orange { background: rgba(234,88,12,.1); }
.dc-red    { background: rgba(220,38,38,.1); }

.dashboard-card h3 {
  font-size: 15px;
  font-weight: var(--mu-weight-semibold);
  color: var(--mu-charcoal);
  margin: 0;
}
.dashboard-card p {
  font-size: 13px;
  color: var(--mu-mid);
  margin: 0;
  line-height: 1.5;
}
.dashboard-card.admin-card {
  border: 2px solid var(--mu-primary);
  background: linear-gradient(135deg, rgba(10,79,255,.03), rgba(10,79,255,.06));
}

/* ── Section headers ─────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--mu-lg);
  gap: var(--mu-md);
}
.section-header h2 { margin: 0; }

/* ── Form sections ───────────────────────────────── */
.form-section {
  padding: var(--mu-xl);
  border-bottom: 1px solid var(--mu-border);
}
.form-section:last-of-type { border-bottom: none; }
.form-section-title {
  font-size: 15px;
  font-weight: var(--mu-weight-semibold);
  color: var(--mu-charcoal);
  margin-bottom: var(--mu-lg);
  padding-bottom: var(--mu-sm);
  border-bottom: 2px solid var(--mu-primary);
  display: inline-block;
}

/* ── Timesheet adjustments ───────────────────────── */
.timesheet-form-container { max-width: 100%; }

/* ── Profile page ────────────────────────────────── */
.profile-page { max-width: 860px; }

/* ── Responsive tables ───────────────────────────── */
@media (max-width: 640px) {
  /* Stack table rows as cards on mobile */
  .table-responsive thead { display: none; }
  .table-responsive tbody tr {
    display: block;
    padding: var(--mu-md);
    margin-bottom: var(--mu-sm);
    background: var(--mu-white);
    border-radius: var(--mu-radius-sm);
    border: 1px solid var(--mu-border);
    box-shadow: var(--mu-shadow-xs);
  }
  .table-responsive td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border: none;
    font-size: 13px;
  }
  .table-responsive td::before {
    content: attr(data-label);
    font-weight: var(--mu-weight-semibold);
    color: var(--mu-mid);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    flex-shrink: 0;
    margin-right: var(--mu-sm);
  }
}
