/* =============================================================
   LiMiTuToR — Custom design system
   Bootstrap 5.3.2 is loaded before this file.
   ============================================================= */

/* 1. Google Font import
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* 2. Design tokens
   ------------------------------------------------------------ */
:root {
  --c-accent:       #6366f1;
  --c-accent-hover: #4f52d4;
  --c-accent-light: #eef2ff;
  --c-navy:         #0f172a;
  --c-body-bg:      #f8fafc;
  --c-card-bg:      #ffffff;
  --c-border:       #e2e8f0;
  --c-text-muted:   #64748b;
  --r-card:  12px;
  --r-btn:   8px;
  --r-input: 7px;
  --shadow-card: 0 1px 3px 0 rgb(0 0 0 / .07), 0 1px 2px -1px rgb(0 0 0 / .07);
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Bootstrap variable overrides */
  --bs-body-font-family: var(--font-main);
  --bs-body-bg:          var(--c-body-bg);
  --bs-body-color:       #1e293b;
  --bs-primary:          var(--c-accent);
  --bs-primary-rgb:      99, 102, 241;
  --bs-link-color:       var(--c-accent);
  --bs-link-hover-color: var(--c-accent-hover);
  --bs-border-color:     var(--c-border);
  --bs-border-radius:    var(--r-btn);
  --bs-border-radius-lg: var(--r-card);
}

/* 3. Base / layout
   ------------------------------------------------------------ */
html {
  position: relative;
  min-height: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--c-body-bg);
  padding-top: 70px;   /* fixed navbar offset */
  margin-bottom: 48px; /* desktop footer height */
  overflow-x: hidden;
}

body > .container {
  padding-top: 0;
}

/* Bootstrap 4 .form-group compat */
.form-group {
  margin-bottom: 1rem;
}

/* 4. Navbar
   ------------------------------------------------------------ */
.navbar {
  background-color: var(--c-navy) !important;
  border-bottom: 1px solid rgb(255 255 255 / .06);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  color: #fff !important;
}

.navbar .nav-link {
  color: rgb(255 255 255 / .75) !important;
  font-weight: 500;
  font-size: .875rem;
  border-radius: 6px;
  transition: color .15s, background-color .15s;
}

.navbar .nav-link:hover {
  color: #fff !important;
  background-color: rgb(255 255 255 / .08);
}

.navbar .nav-link.active {
  color: #fff !important;
  background-color: rgb(255 255 255 / .12);
}

.navbar .ms-auto .nav-link {
  font-size: .8rem;
  color: rgb(255 255 255 / .55) !important;
}

.navbar .ms-auto .nav-link.fw-bold {
  color: #fff !important;
}

/* 5. Cards
   ------------------------------------------------------------ */
.card {
  border-radius: var(--r-card);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-card);
}

.card-header {
  background: var(--c-body-bg);
  border-bottom: 1px solid var(--c-border);
  border-radius: var(--r-card) var(--r-card) 0 0 !important;
  font-weight: 600;
  font-size: .9rem;
  padding: .75rem 1.1rem;
  color: #334155;
}

.card-footer {
  background: var(--c-body-bg);
  border-top: 1px solid var(--c-border);
  border-radius: 0 0 var(--r-card) var(--r-card) !important;
}

/* 6. Buttons
   ------------------------------------------------------------ */
.btn {
  font-weight: 500;
  font-size: .875rem;
  border-radius: var(--r-btn);
  transition: transform .12s, box-shadow .12s, background-color .15s, border-color .15s;
}

.btn-primary {
  background-color: var(--c-accent);
  border-color: var(--c-accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--c-accent-hover);
  border-color: var(--c-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgb(99 102 241 / .35);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-outline-primary {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.btn-outline-primary:hover {
  background-color: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
}

.btn-check:checked + .btn-outline-secondary {
  background-color: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
}

/* 7. Form controls
   ------------------------------------------------------------ */
.form-control,
.form-select {
  border-radius: var(--r-input);
  border: 1px solid #cbd5e1;
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgb(99 102 241 / .18);
  outline: none;
}

/* 8. Tables
   ------------------------------------------------------------ */
.table {
  font-size: .875rem;
}

.table thead.table-light th {
  background: var(--c-body-bg);
  border-bottom: 1px solid var(--c-border);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--c-text-muted);
}

.table-hover > tbody > tr:hover > * {
  background-color: #f1f5f9;
}

/* 9. Badges
   ------------------------------------------------------------ */
.badge {
  font-weight: 600;
  font-size: .72rem;
  border-radius: 6px;
}

.badge.bg-secondary {
  background-color: #e2e8f0 !important;
  color: #475569 !important;
}

/* 10. Alerts — left-accent style
    ------------------------------------------------------------ */
.alert {
  border-radius: var(--r-card);
  border-width: 0;
  border-left: 4px solid;
  font-size: .9rem;
}

.alert-success { background: #f0fdf4; border-left-color: #22c55e; color: #166534; }
.alert-danger  { background: #fef2f2; border-left-color: #ef4444; color: #991b1b; }
.alert-warning { background: #fffbeb; border-left-color: #f59e0b; color: #92400e; }
.alert-info    { background: #eff6ff; border-left-color: #3b82f6; color: #1e40af; }

/* 11. Footer — desktop sticky
    ------------------------------------------------------------ */
.footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 48px;
  line-height: 48px;
  background: #fff;
  border-top: 1px solid var(--c-border);
  z-index: 900;
}

.footer > .container {
  padding: 0 12px;
}

.footer .text-muted {
  font-size: .8rem;
}

/* 12. Mobile bottom navigation
    ------------------------------------------------------------ */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 767.98px) {
  body {
    padding-top: 56px;
    margin-bottom: 60px;
  }

  .footer {
    display: none;
  }

  /* Hide main nav links from hamburger on mobile — bottom nav handles them */
  #navbarCollapse .navbar-nav:first-child {
    display: none !important;
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--c-navy);
    border-top: 1px solid rgb(255 255 255 / .08);
    z-index: 1030;
    align-items: stretch;
  }

  .mobile-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: rgb(255 255 255 / .55);
    text-decoration: none;
    font-size: .65rem;
    font-weight: 500;
    letter-spacing: .02em;
    transition: color .15s, background-color .15s;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-nav__item i {
    font-size: 1.15rem;
    line-height: 1;
  }

  .mobile-bottom-nav__item:hover {
    color: rgb(255 255 255 / .85);
    background: rgb(255 255 255 / .05);
  }

  .mobile-bottom-nav__item.active {
    color: #818cf8;
    background: rgb(99 102 241 / .12);
  }

  .mobile-bottom-nav__item.active i {
    filter: drop-shadow(0 0 4px rgb(99 102 241 / .6));
  }
}

/* 13. Utilities (preserved)
    ------------------------------------------------------------ */
.usmall      { font-size: 10px; }
.u-nopad     { padding: 0; }
.u-wb        { word-break: break-all; }
.u-bg-orange { background-color: orange; }
.f-l         { float: left; }
.f-r         { float: right; }
code         { font-size: 80%; }

/* Schedule table: compact time pickers to fit mobile */
#schedTable input[type="time"] {
    font-size: .75rem;
    padding: .15rem .2rem;
    min-width: 0;
}

