/* ============================================================
   GOOGLE FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors */
  --c-bg:           #fcfaf7;
  --c-surface:      #ffffff;
  --c-border:       #1a1a1a;
  --c-border-soft:  #e5e5e5;

  --c-primary:      #2563eb;
  --c-accent:       #000000;
  --c-danger:       #ef4444;
  --c-success:      #10b981;
  --c-warning:      #f59e0b;

  --c-text-1:       #1a1a1a;
  --c-text-2:       #555555;
  --c-text-3:       #999999;
  --c-text-on-acc:  #ffffff;

  /* Typography */
  --font-ui:   'Figtree', system-ui, sans-serif;
  --font-head: 'Figtree', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radius & Shadows */
  --r-sm:   2px;
  --r-md:   4px;
  --r-lg:   6px;
  --r-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 12px 40px -12px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px -15px rgba(0,0,0,0.12);

  /* Layout */
  --topbar-h: 70px;
  --navbar-h: 50px;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text-1);
  background: var(--c-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: var(--c-text-3); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--c-text-2); }

/* ============================================================
   NOISE TEXTURE OVERLAY
   ============================================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   ICON UTILITY
   ============================================================ */
.icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

/* ============================================================
   CARD
   ============================================================ */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
  transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover {
  border-color: var(--c-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  height: 40px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  background: var(--c-surface);
  color: var(--c-text-1);
}
.btn--punch {
  background: var(--c-accent);
  color: var(--c-text-on-acc);
  border-color: var(--c-accent);
}
.btn--punch:hover {
  background: var(--c-primary);
  border-color: var(--c-primary);
  transform: translateY(-1px);
}
.btn--outline {
  background: transparent;
  color: var(--c-accent);
  border: 1.5px solid var(--c-accent);
}
.btn--outline:hover {
  background: var(--c-accent);
  color: var(--c-text-on-acc);
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: var(--c-surface);
  border-bottom: 2px solid var(--c-border);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 32px;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
}
.topbar__brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--c-accent);
  color: var(--c-accent);
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 800;
}
.topbar__brand-text {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--c-text-1);
  letter-spacing: -0.5px;
}

.topbar__timers {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
}
.topbar__timer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 38px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--c-border-soft);
  background: var(--c-bg);
}
.topbar__timer-label {
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--c-text-2);
  text-transform: uppercase;
}
.topbar__timer--in    { border-color: var(--c-primary); color: var(--c-primary); }
.topbar__timer--out   { border-color: var(--c-warning); color: var(--c-warning); }
.topbar__timer--total { border-color: var(--c-accent);  color: var(--c-accent);  background: #f0f0f0; }

.topbar__user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  justify-content: flex-end;
}
.topbar__notif-badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--c-border-soft);
  color: var(--c-text-2);
  cursor: pointer;
  transition: all .2s;
}
.topbar__notif-badge:hover { border-color: var(--c-accent); color: var(--c-accent); }
.topbar__notif-dot {
  position: absolute;
  top: -2px; right: -2px;
  width: 16px; height: 16px;
  background: var(--c-danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--c-surface);
}
.topbar__avatar {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  background: var(--c-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.topbar__username {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-1);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 90;
  height: var(--navbar-h);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border-soft);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 12px;
}

.navbar__list {
  display: flex;
  align-items: stretch;
  height: 100%;
}
.navbar__item {
  position: relative;
  display: flex;
  align-items: center;
}
.navbar__item:hover > .navbar__dropdown { display: block; }

.navbar__link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 20px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  white-space: nowrap;
  transition: all .2s;
  position: relative;
  letter-spacing: 0.2px;
}
.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 3px;
  background: var(--c-accent);
  transform: scaleX(0);
  transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1);
}
.navbar__link:hover { color: var(--c-text-1); }
.navbar__link:hover::after { transform: scaleX(.6); }
.navbar__link--active { color: var(--c-text-1); }
.navbar__link--active::after { transform: scaleX(1); }

.navbar__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  padding: 8px 0;
  animation: dropDown .2s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes dropDown {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.navbar__dropdown-link {
  display: block;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-2);
  transition: all .15s;
}
.navbar__dropdown-link:hover {
  background: var(--c-bg);
  color: var(--c-accent);
  padding-left: 24px;
}

.navbar__search {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
}
.navbar__search-input {
  background: var(--c-bg);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-sm);
  color: var(--c-text-1);
  padding: 0 40px 0 16px;
  height: 36px;
  font-size: 12px;
  font-family: var(--font-ui);
  width: 240px;
  outline: none;
  transition: all .3s;
}
.navbar__search-input::placeholder { color: var(--c-text-3); }
.navbar__search-input:focus {
  background: var(--c-surface);
  border-color: var(--c-accent);
  width: 320px;
  box-shadow: var(--shadow-md);
}
.navbar__search-icon {
  position: absolute;
  right: 12px;
  color: var(--c-text-2);
  pointer-events: none;
}

/* ============================================================
   MAIN
   ============================================================ */
.main {
  padding: 40px 32px 80px;
  min-height: calc(100vh - var(--topbar-h) - var(--navbar-h));
  position: relative;
  z-index: 1;
}

.page { position: relative; z-index: 1; animation: fadeIn .4s ease; }
.page--hidden { display: none !important; }
.page__title {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 800;
  color: var(--c-text-1);
  letter-spacing: -1px;
  margin-bottom: 32px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   PROFILE LAYOUT
   ============================================================ */
.profile-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
}

.profile-card {
  display: flex;
  flex-direction: column;
  padding: 32px;
  border-width: 2px;
}

.profile-card__avatar {
  width: 100px; height: 100px;
  border-radius: var(--r-full);
  background: var(--c-accent);
  color: #fff;
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.profile-card__status-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--c-success);
  border: 3px solid var(--c-surface);
  position: absolute;
  top: 104px;
  left: 106px;
}
.profile-card__name {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--c-text-1);
  letter-spacing: -0.4px;
}
.profile-card__since {
  font-size: 13px;
  color: var(--c-text-3);
  margin-bottom: 12px;
}
.profile-card__dept,
.profile-card__reports {
  font-size: 13px;
  color: var(--c-text-2);
  margin-bottom: 4px;
  font-weight: 500;
}
.profile-card__time {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--c-accent);
  margin-top: 20px;
  padding: 12px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  text-align: center;
}
.profile-card__tz {
  font-size: 11px;
  color: var(--c-text-3);
  margin-top: 6px;
  text-align: center;
}

.profile-subnav {
  width: 100%;
  margin-top: 24px;
  border-top: 1px solid var(--c-border-soft);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-subnav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  transition: all .2s;
  border-left: 3px solid transparent;
}
.profile-subnav__link:hover {
  background: var(--c-bg);
  color: var(--c-accent);
  border-left-color: var(--c-border-soft);
}
.profile-subnav__link--active {
  background: var(--c-accent);
  color: #fff;
  border-left-color: var(--c-accent);
}

/* ============================================================
   PROFILE CONTENT
   ============================================================ */
.profile-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.date-range-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: flex-end;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-accent);
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all .2s;
}
.date-range-picker:hover {
  background: var(--c-bg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Stat card */
.stat-card {
  padding: 24px;
}

.stat-card__value {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1.2;
  margin-bottom: 2px;
  color: var(--c-accent);
}

.stat-card__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--c-text-3);
  text-transform: uppercase;
}
.stat-card__icon {
  position: absolute;
  right: 20px;
  top: 24px;
  width: 24px; height: 24px;
  color: var(--c-text-3);
  opacity: .2;
}

/* Adjustments */
.adjustments__title {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--c-accent);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.adjustments__title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--c-border-soft);
}

.adjustments-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.stat-card--holiday { grid-column: 1 / -1; }

/* ============================================================
   CALENDAR
   ============================================================ */
.calendar-section { padding: 0; overflow: hidden; border-width: 2px; }
.calendar-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--c-border-soft);
  background: var(--c-bg);
}
.calendar-section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--c-accent);
  text-transform: uppercase;
}
.calendar-section__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-text-1);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 6px 14px;
  cursor: pointer;
  transition: all .2s;
}
.calendar-section__nav:hover {
  background: var(--c-accent);
  color: #fff;
}
.calendar { padding: 24px; }
.calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 12px;
}
.calendar__weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--c-text-3);
  letter-spacing: 1px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-border-soft);
}
.calendar__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 8px;
}
.calendar__day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  color: var(--c-text-2);
  position: relative;
}
.calendar__day:hover {
  background: var(--c-bg);
  border-color: var(--c-border-soft);
  color: var(--c-accent);
}
.calendar__day--other-month { color: var(--c-text-3); opacity: .2; }
.calendar__day--today {
  background: var(--c-accent);
  color: #fff;
  font-weight: 800;
}
.calendar__day--today:hover { background: var(--c-accent); color: #fff; }
.calendar__day--has-punch::after {
  content: '';
  display: block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--c-primary);
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
}
.calendar__day--today.calendar__day--has-punch::after {
  background: var(--c-bg);
  box-shadow: none;
}

/* ============================================================
   COMING SOON
   ============================================================ */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 120px 24px;
  text-align: center;
}
.coming-soon__icon {
  width: 80px; height: 80px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-accent);
}
.coming-soon__icon svg { width: 32px; height: 32px; stroke: currentColor; }
.coming-soon__title {
  font-family: var(--font-head);
  font-size: 40px;
  font-weight: 800;
  color: var(--c-text-1);
  letter-spacing: -1.5px;
}
.coming-soon__sub {
  font-size: 15px;
  color: var(--c-text-3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ============================================================
   ACCOUNT FAB
   ============================================================ */
.account-fab {
  position: fixed;
  bottom: 32px; right: 32px;
  z-index: 300;
  width: 50px; height: 50px;
  border-radius: var(--r-full);
  background: var(--c-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all .2s;
}
.account-fab:hover {
  transform: translateY(-4px) rotate(10deg);
  background: var(--c-primary);
}
.account-fab .icon { width: 20px; height: 20px; }
.account-fab__menu {
  display: none;
  position: absolute;
  bottom: 60px; right: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px 0;
  animation: dropDown .2s cubic-bezier(0.4, 0, 0.2, 1);
}
.account-fab:hover .account-fab__menu { display: block; }
.account-fab__menu li a {
  display: block;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  transition: all .15s;
}
.account-fab__menu li a:hover {
  background: var(--c-bg);
  color: var(--c-accent);
  padding-left: 24px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .profile-layout { grid-template-columns: 240px 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .profile-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .topbar__timers { gap: 4px; }
  .topbar__timer { padding: 0 10px; font-size: 10px; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .adjustments-grid { grid-template-columns: 1fr; }
  .topbar__username { display: none; }
  .main { padding: 20px 16px 60px; }
}
