/* CourseOS · Base Styles
   Browser reset and foundational layout rules.
   These apply to the entire app. */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-base);
  color: var(--text-primary);
  background: var(--bg-tertiary);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* App container · centered and max-width limited */
#app {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--bg-tertiary);
  overflow: hidden;
}

/* Screen containers · all hidden by default */
.screen {
  display: none;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding-bottom: var(--nav-height);
  overflow: hidden;
}

/* Active screen shows */
.screen.active {
  display: flex;
}

/* Scrollable content area inside each screen */
.scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
  padding-bottom: calc(var(--nav-height) + var(--space-lg));
  -webkit-overflow-scrolling: touch;
}

/* Section divider with centered label */
.sec-divider {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-sm) 0;
}

.sec-divider .sec-line {
  flex: 1;
  height: 2px;
  border-radius: 1px;
}

.sec-divider .sec-label {
  font-size: var(--font-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* Standard card */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: var(--border-width) solid var(--border-color);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

/* Pill badge */
.pill {
  display: inline-block;
  font-size: var(--font-xs);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

/* Course tag */
.course-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: var(--space-xs);
  letter-spacing: 0.2px;
}

/* Due date badges */
.due-red    { background: #FEF0F0; color: #C0392B; }
.due-amber  { background: #FFF0D4; color: #7A4800; }
.due-gray   { background: var(--gray-100); color: var(--gray-600); }
.due-late   { background: #C0392B; color: #fff; font-weight: 700; }

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
