/*
 * Gomsisten – custom overrides
 *
 * 1. Bump base font size for readability (parents' request).
 *    All Tailwind rem-based sizes scale automatically.
 * 2. Profit-margin toggle widget styles.
 */

/* ── 1. Legibility boost ─────────────────────────────────────────────────── */

html {
  font-size: 17px; /* default browser = 16px; 17px ≈ +6% – readable but not too large */
}

/* ── 2. Profit-margin toggle widget ─────────────────────────────────────── */

.margin-toggle {
  display: flex;
  gap: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #d1d5db; /* gray-300 */
  width: fit-content;
}

.margin-toggle__btn {
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  background: #f9fafb;
  color: #374151;
  border: none;
  transition: background-color 0.12s, color 0.12s;
  line-height: 1.4;
}

.margin-toggle__btn:first-child {
  border-right: 1px solid #d1d5db;
}

.margin-toggle__btn.active {
  background: #F37A1F;
  color: #fff;
}

.margin-toggle__btn:not(.active):hover {
  background: #f3f4f6;
}

.margin-hint {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: #6b7280;
}

/* ── 3. Navigation ───────────────────────────────────────────────────────── */

/* ── Outer header ── */
.nav-header {
  position: relative;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(15,23,42,.06);
  z-index: 100;
}

/* ── Inner wrapper ── */
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 100%;
  padding: 0 1rem;
  height: 3.5rem;
}

/* ── Logo row (logo + hamburger) ── */
.nav-logo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

@media (min-width: 768px) {
  .nav-logo-row {
    width: auto;
  }
}

.nav-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #333333;
  text-decoration: none;
}

.nav-logo-img {
  width: 2.125rem;
  height: 2.125rem;
  object-fit: contain;
  flex-shrink: 0;
}

/* ── Hamburger button (mobile only) ── */
.nav-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem;
  background: none;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  color: #374151;
  transition: background 0.12s;
}

.nav-hamburger:hover {
  background: #f3f4f6;
}

@media (min-width: 768px) {
  .nav-hamburger {
    display: none;
  }
}

/* ── Desktop nav links ── */
.nav-desktop-links {
  display: none;
  align-items: center;
  gap: 0.125rem;
  flex: 1;
  padding: 0 0.5rem;
}

@media (min-width: 768px) {
  .nav-desktop-links {
    display: flex;
  }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}

.nav-link:hover {
  background: #f3f4f6;
  color: #333333;
}

/* ── Dropdown wrapper (desktop) ── */
.nav-dropdown-wrap {
  position: relative;
}

/* Chevron icon inside dropdown buttons */
.nav-chevron {
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

/* Dropdown panel (desktop) */
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.375rem);
  left: 0;
  min-width: 11rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.625rem;
  box-shadow: 0 8px 24px rgba(15,23,42,.10);
  padding: 0.375rem;
  z-index: 200;
}

.nav-dropdown-item {
  display: block;
  padding: 0.5rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #374151;
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}

.nav-dropdown-item:hover {
  background: #fff7f0;
  color: #F37A1F;
}

/* ── User info (desktop) ── */
.nav-user-info {
  display: none;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: #6b7280;
}

@media (min-width: 768px) {
  .nav-user-info {
    display: flex;
  }
}

.nav-role-badge {
  flex-shrink: 0;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-weight: 600;
  font-size: 0.75rem;
  color: #2D2D2D;
  white-space: nowrap;
}

.nav-email {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
}

.nav-signout-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #2D2D2D;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}

.nav-signout-btn:hover {
  background: #f3f4f6;
  color: #F37A1F;
}

/* ── Mobile menu panel ── */
.nav-mobile-menu {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 1rem;
}

@media (min-width: 768px) {
  .nav-mobile-menu {
    display: none !important; /* always hidden on desktop */
  }
}

.nav-mobile-user {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 0.75rem;
}

.nav-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.nav-mobile-link {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: background 0.1s;
}

.nav-mobile-link:hover {
  background: #f9fafb;
  color: #F37A1F;
}

/* Mobile group (collapsible section) */
.nav-mobile-group {
  border-radius: 0.5rem;
}

.nav-mobile-group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #374151;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: background 0.1s;
}

.nav-mobile-group-btn:hover {
  background: #f9fafb;
}

.nav-mobile-submenu {
  display: flex;
  flex-direction: column;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 2px solid #F37A1F;
  margin-left: 0.75rem;
  margin-bottom: 0.25rem;
}

.nav-mobile-sublink {
  display: block;
  padding: 0.5rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #6b7280;
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}

.nav-mobile-sublink:hover {
  background: #fff7f0;
  color: #F37A1F;
}

.nav-mobile-footer {
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid #f3f4f6;
}

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
