/* ============================================================
   SC SPECIALTY CUT FLOWERS — Intranet Stylesheet
   Internal use only · Not for public distribution
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Inter:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --dark:      #194842;
  --green:     #248b20;
  --tint:      #a4cda2;
  --light:     #e8f5e8;
  --cream:     #f7f4ef;
  --white:     #ffffff;
  --text:      #1a1a1a;
  --muted:     #5a5a5a;
  --border:    #e2e2e2;
  --sidebar-w: 240px;
  --header-h:  60px;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--text); background: #f4f6f8; min-height: 100vh; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── LOGIN PAGE ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  padding: 24px;
}
.login-card {
  background: var(--white);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo img { height: 80px; width: auto; }
.login-logo .portal-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
  font-weight: 600;
}
.login-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--dark);
  margin-bottom: 6px;
}
.login-card p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(36,139,32,0.1);
}
.login-btn {
  width: 100%;
  background: var(--dark);
  color: #d4ecd3;
  padding: 12px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}
.login-btn:hover { background: #0f2e2a; }
.login-error {
  background: #fce4d6;
  color: #9c0006;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

/* ── LAYOUT ── */
.intranet-layout {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--dark);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(164,205,162,0.15);
}
.sidebar-logo img { height: 60px; width: auto; }
.sidebar-logo .portal-tag {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tint);
  margin-top: 8px;
  font-weight: 600;
}
.sidebar-user {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(164,205,162,0.15);
  font-size: 12px;
}
.sidebar-user .name {
  color: #f0f8ef;
  font-weight: 500;
  display: block;
}
.sidebar-user .role {
  color: var(--tint);
  font-size: 11px;
}
.sidebar-nav {
  padding: 16px 0;
  flex: 1;
}
.nav-section-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(164,205,162,0.5);
  font-weight: 600;
  padding: 8px 20px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 13px;
  color: rgba(212,236,211,0.7);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #f0f8ef; }
.nav-item.active { background: rgba(255,255,255,0.08); color: #f0f8ef; border-left-color: var(--green); font-weight: 500; }
.nav-item .icon { font-size: 16px; flex-shrink: 0; }
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(164,205,162,0.15);
}
.logout-btn {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(164,205,162,0.3);
  color: var(--tint);
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.logout-btn:hover { background: rgba(255,255,255,0.06); }

/* ── MAIN CONTENT ── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
}
.topbar-date {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}
.page-content { padding: 28px; flex: 1; }

/* ── PAGE HEADER ── */
.page-header { margin-bottom: 24px; }
.page-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 6px;
}
.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--dark);
}

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}
.card h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.card-sm {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
}

/* ── GRID ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ── STAT CARDS ── */
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.stat-card .stat-icon {
  font-size: 24px;
  margin-bottom: 10px;
}
.stat-card .stat-val {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--dark);
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* ── TOOL CARDS (dashboard) ── */
.tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tool-card:hover {
  box-shadow: 0 4px 20px rgba(25,72,66,0.1);
  transform: translateY(-2px);
  border-color: var(--tint);
}
.tool-card .tool-icon { font-size: 32px; }
.tool-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
}
.tool-card p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.tool-card .tool-arrow {
  font-size: 13px;
  color: var(--green);
  font-weight: 500;
  margin-top: auto;
}

/* ── ANNOUNCEMENTS ── */
.announcement {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.announcement.pinned { border-left-color: var(--dark); }
.announcement.urgent { border-left-color: #c0392b; }
.announcement-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.announcement-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--light);
  color: var(--dark);
}
.announcement-tag.pinned { background: #e8e8e8; color: #333; }
.announcement-tag.urgent { background: #fce4d6; color: #9c0006; }
.announcement-date { font-size: 11px; color: var(--muted); margin-left: auto; }
.announcement h3 { font-size: 14px; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.announcement p { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ── DIRECTORY ── */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.person-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.person-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--tint);
  margin: 0 auto 12px;
}
.person-card .name {
  font-weight: 600;
  font-size: 14px;
  color: var(--dark);
  margin-bottom: 3px;
}
.person-card .role {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.person-contact a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--green);
  margin-bottom: 4px;
}

/* ── DELIVERY SCHEDULE ── */
.schedule-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.schedule-table th {
  background: var(--dark);
  color: #f0f8ef;
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.schedule-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.schedule-table tr:last-child td { border-bottom: none; }
.schedule-table tr:hover td { background: #fafafa; }
.route-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.route-sc { background: var(--light); color: var(--dark); }
.route-nc { background: #e8f0fe; color: #1a56a0; }
.route-ga { background: #fce4d6; color: #7a2000; }

/* ── DOCUMENTS ── */
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow 0.15s;
}
.doc-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.doc-icon { font-size: 24px; flex-shrink: 0; }
.doc-info { flex: 1; }
.doc-info .doc-name { font-size: 14px; font-weight: 500; color: var(--dark); }
.doc-info .doc-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.doc-category {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--light);
  color: var(--dark);
}

/* ── HR / TIME OFF ── */
.timeoff-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.timeoff-form .full { grid-column: 1 / -1; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 12px;
}
.cal-header {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.cal-day:hover { background: var(--light); }
.cal-day.today { background: var(--dark); color: #f0f8ef; font-weight: 600; }
.cal-day.has-off { background: #fce4d6; }
.cal-day.empty { cursor: default; }
.off-entry {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.off-entry .off-name { font-weight: 500; font-size: 14px; color: var(--dark); }
.off-entry .off-dates { font-size: 12px; color: var(--muted); }
.off-entry .off-type { margin-left: auto; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--light); color: var(--dark); }

/* ── BUTTONS ── */
.btn {
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  font-family: 'Inter', sans-serif;
}
.btn-primary { background: var(--dark); color: #d4ecd3; }
.btn-primary:hover { background: #0f2e2a; }
.btn-green { background: var(--green); color: white; }
.btn-green:hover { background: #1d7119; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--dark); }
.btn-outline:hover { background: var(--cream); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── FORM ELEMENTS ── */
select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  background: var(--white);
  transition: border-color 0.2s;
}
select:focus, textarea:focus { border-color: var(--green); }
textarea { resize: vertical; min-height: 80px; }

/* ── BADGE ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.badge-green { background: var(--light); color: var(--dark); }
.badge-blue { background: #e8f0fe; color: #1a56a0; }
.badge-red { background: #fce4d6; color: #9c0006; }
.badge-gray { background: #f0f0f0; color: #555; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .directory-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .directory-grid { grid-template-columns: 1fr; }
  .timeoff-form { grid-template-columns: 1fr; }
}
