/* TF70 Course Management System — Styled to match tf70.org
   Fonts: Nunito Sans (body) + Rubik (headings)
   Colors from tf70.org:
     Black: #000
     Dark Accent: #2a2829
     Accent (Navy): #253351
     Light Accent (Beige): #dfddce
     White: #fff
     Gold (app accent): #C5A130
*/

/* Reset and Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  color: #2a2829;
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 16px;
}

main { flex: 1; }

h1, h2, h3, h4, h5, h6 {
  font-family: "Rubik", "Nunito Sans", sans-serif;
  font-weight: 700;
  line-height: 1.3;
}

a { color: #253351; text-decoration: none; }
a:hover { color: #000; text-decoration: underline; }

/* =======================================
   TF70.ORG HEADER
   ======================================= */
.tf70-header {
  background: #000;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 12px 12px rgba(0,0,0,0.15);
}

.tf70-header-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 4vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 77px;
}

.tf70-logo-link {
  display: flex;
  align-items: center;
}

.tf70-logo {
  height: 50px;
  width: auto;
}

.tf70-nav-desktop {
  display: flex;
  align-items: center;
  gap: 0;
}

.tf70-nav-link {
  font-family: "Nunito Sans", sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #fff;
  padding: 8px 16px;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
  text-decoration: none;
}

.tf70-nav-link:hover {
  opacity: 0.7;
  text-decoration: none;
  color: #fff;
}

.tf70-nav-link--active {
  font-weight: 700;
}

.tf70-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tf70-social-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tf70-social-link {
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.tf70-social-link:hover {
  opacity: 0.7;
  text-decoration: none;
  color: #fff;
}

/* Burger menu (mobile) */
.tf70-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1002;
}

.tf70-burger-inner {
  width: 24px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tf70-burger-line {
  height: 1px;
  background: #fff;
  transition: transform 0.3s, opacity 0.3s;
}

.tf70-burger.open .tf70-burger-line:first-child {
  transform: translateY(4px) rotate(45deg);
}

.tf70-burger.open .tf70-burger-line:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Mobile menu overlay */
.tf70-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 999;
  padding-top: 100px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tf70-mobile-menu.open {
  display: block;
  opacity: 1;
}

.tf70-mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.tf70-mobile-link {
  font-family: "Rubik", sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #2a2829;
  padding: 12px 20px;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.tf70-mobile-link:hover { color: #253351; text-decoration: none; }
.tf70-mobile-link--active { font-weight: 700; }

@media (max-width: 900px) {
  .tf70-nav-desktop, .tf70-social-icons { display: none; }
  .tf70-burger { display: block; }
  .tf70-header-inner { height: 60px; }
  .tf70-logo { height: 36px; }
}

/* =======================================
   APP SUB-NAVIGATION (Course app nav)
   ======================================= */
.app-subnav {
  background: #253351;
  border-bottom: 3px solid #C5A130;
}

.app-subnav-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 4vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}

.app-subnav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.subnav-link, .nav-link {
  color: rgba(255,255,255,0.85);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  font-family: "Nunito Sans", sans-serif;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}

.subnav-link:hover, .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

.nav-link.active {
  color: #C5A130;
  background: rgba(255,255,255,0.1);
}

.app-subnav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-family: "Nunito Sans", sans-serif;
}

.app-subnav-user .user-name {
  color: #C5A130;
  font-weight: 700;
}

.app-subnav-user .user-role {
  color: rgba(255,255,255,0.6);
}

.subnav-logout {
  color: rgba(255,255,255,0.7);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 10px;
  font: inherit;
  font-size: 13px;
  border-radius: 4px;
  transition: all 0.2s;
}

.subnav-logout:hover {
  color: #fff;
  background: rgba(220,53,69,0.3);
}

.subnav-toggle {
  display: none;
  background: none;
  border: none;
  color: #C5A130;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
}

.notification-badge {
  background: #C5A130;
  color: #000;
  border-radius: 50%;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
}

@media (max-width: 768px) {
  .subnav-toggle { display: block; }
  .app-subnav-inner { flex-wrap: wrap; height: auto; padding: 8px 15px; }
  .app-subnav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 8px 0;
    gap: 2px;
    align-items: flex-start;
  }
  .app-subnav-links.open { display: flex; }
  .subnav-link, .nav-link { padding: 8px 10px; display: block; width: 100%; }
  .app-subnav-user {
    display: none;
    width: 100%;
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.15);
  }
  .app-subnav-user.open { display: flex; flex-wrap: wrap; }
}

/* =======================================
   CONTAINERS & LAYOUT
   ======================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 4vw;
}

.container-narrow {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px 4vw;
}

/* =======================================
   PAGE HEADERS
   ======================================= */
.page-header {
  margin-bottom: 30px;
  padding-bottom: 18px;
  border-bottom: 3px solid #C5A130;
}

.page-header h1 {
  font-family: "Rubik", sans-serif;
  color: #000;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-header p {
  color: #666;
  margin-top: 6px;
  font-size: 16px;
}

/* =======================================
   CARDS
   ======================================= */
.card {
  background: #fff;
  border-radius: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid #e8e6df;
}

.card-header {
  background: #253351;
  color: #fff;
  padding: 14px 24px;
  font-weight: 700;
  font-size: 16px;
  font-family: "Rubik", sans-serif;
}

.card-body { padding: 24px; }

.card-footer {
  padding: 14px 24px;
  background: #f8f7f4;
  border-top: 1px solid #e8e6df;
}

/* =======================================
   COURSE CARDS (Catalog)
   ======================================= */
.course-card {
  background: #fff;
  border: 1px solid #e8e6df;
  border-left: 4px solid #C5A130;
  border-radius: 0;
  padding: 24px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.course-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.course-card h3 {
  font-family: "Rubik", sans-serif;
  color: #000;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
}

.course-card .category-tag {
  display: inline-block;
  background: #253351;
  color: #fff;
  padding: 3px 12px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.course-card .description {
  color: #555;
  font-size: 15px;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.7;
}

.instance-list {
  border-top: 1px solid #e8e6df;
  margin-top: 14px;
  padding-top: 12px;
}

.instance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  margin: 4px 0;
  background: #f8f7f4;
  border-radius: 0;
  font-size: 14px;
}

.instance-row:hover { background: #f0ead6; }

.instance-row a { color: #253351; font-weight: 600; }
.instance-row a:hover { color: #C5A130; text-decoration: none; }

.instance-meta { color: #666; font-size: 13px; }

/* =======================================
   BUTTONS
   ======================================= */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border: none;
  border-radius: 0;
  font-size: 14px;
  font-weight: 700;
  font-family: "Nunito Sans", sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  line-height: 1.5;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: #C5A130;
  color: #000;
}
.btn-primary:hover { background: #b08e28; color: #000; }

.btn-dark {
  background: #253351;
  color: #fff;
}
.btn-dark:hover { background: #1a2640; color: #fff; }

.btn-danger {
  background: #dc3545;
  color: #fff;
}
.btn-danger:hover { background: #c82333; }

.btn-success {
  background: #28a745;
  color: #fff;
}
.btn-success:hover { background: #218838; }

.btn-outline {
  background: transparent;
  border: 2px solid #253351;
  color: #253351;
}
.btn-outline:hover { background: #253351; color: #fff; }

.btn-sm { padding: 5px 14px; font-size: 12px; }
.btn-lg { padding: 14px 30px; font-size: 16px; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* =======================================
   FORMS
   ======================================= */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  color: #2a2829;
  font-size: 14px;
  font-family: "Nunito Sans", sans-serif;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 0;
  font-size: 15px;
  font-family: "Nunito Sans", sans-serif;
  transition: border-color 0.2s;
  background: #fff;
}

.form-control:focus {
  outline: none;
  border-color: #253351;
  box-shadow: 0 0 0 2px rgba(37, 51, 81, 0.15);
}

select.form-control { height: 46px; }

textarea.form-control { min-height: 120px; resize: vertical; }

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #253351;
}

.form-inline {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.form-inline .form-group { margin-bottom: 0; }

/* =======================================
   TABLES
   ======================================= */
.table-wrapper { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 14px;
}

th {
  background: #253351;
  color: #fff;
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  font-family: "Nunito Sans", sans-serif;
  white-space: nowrap;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid #e8e6df;
  vertical-align: middle;
}

tr:hover td { background: #f8f7f4; }

/* =======================================
   BADGES
   ======================================= */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-default { background: #e8e6df; color: #495057; }

/* =======================================
   FLASH MESSAGES
   ======================================= */
.flash {
  padding: 14px 24px;
  border-radius: 0;
  margin-bottom: 24px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.flash-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.flash-error { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }
.flash-info { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }

/* =======================================
   LOGIN PAGE
   ======================================= */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.login-card {
  background: #fff;
  padding: 48px;
  border-radius: 0;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.login-card h1 {
  font-family: "Rubik", sans-serif;
  color: #000;
  text-align: center;
  margin-bottom: 6px;
  font-size: 28px;
}

.login-card .subtitle {
  text-align: center;
  color: #253351;
  margin-bottom: 36px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* =======================================
   ADMIN TABS
   ======================================= */
.admin-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 30px;
  border-bottom: 3px solid #253351;
  flex-wrap: wrap;
}

.admin-tab {
  padding: 10px 22px;
  background: #e8e6df;
  color: #2a2829;
  font-weight: 700;
  font-size: 13px;
  border-radius: 0;
  text-decoration: none;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: "Nunito Sans", sans-serif;
}

.admin-tab:hover { background: #dfddce; color: #000; text-decoration: none; }
.admin-tab.active { background: #253351; color: #fff; }

/* =======================================
   STATS GRID
   ======================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 30px;
}

.stat-card {
  background: #fff;
  padding: 14px 10px;
  border-radius: 0;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border: 1px solid #e8e6df;
  border-top: 3px solid #C5A130;
}

.stat-card .stat-number {
  font-size: 28px;
  font-weight: 700;
  color: #253351;
  font-family: "Rubik", sans-serif;
}

.stat-card .stat-label {
  color: #666;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
  font-weight: 700;
}

.stat-card-link {
  display: block;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.stat-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  text-decoration: none;
}

/* =======================================
   DETAIL VIEW
   ======================================= */
.detail-section {
  margin-bottom: 30px;
}

.detail-section h2 {
  font-family: "Rubik", sans-serif;
  font-size: 22px;
  color: #253351;
  padding-bottom: 10px;
  border-bottom: 2px solid #C5A130;
  margin-bottom: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px 18px;
  font-size: 15px;
}

.detail-label {
  font-weight: 700;
  color: #555;
}

.detail-value { color: #2a2829; }

/* =======================================
   MATERIAL LIST
   ======================================= */
.material-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #f8f7f4;
  border-radius: 0;
  margin-bottom: 8px;
  border: 1px solid #e8e6df;
}

.material-icon {
  background: #253351;
  color: #fff;
  padding: 6px 10px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  min-width: 50px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.material-info { flex: 1; }
.material-info .title { font-weight: 700; }
.material-info .meta { font-size: 12px; color: #888; }

/* =======================================
   NOTIFICATIONS
   ======================================= */
.notification-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid #e8e6df;
  transition: background 0.2s;
}

.notification-item.unread {
  background: #fdf8e9;
  border-left: 3px solid #C5A130;
}

.notification-item .time {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}

/* =======================================
   FOOTER
   ======================================= */
.tf70-footer {
  background: #dfddce;
  color: #2a2829;
  padding: 40px 0 30px;
  margin-top: 40px;
}

.tf70-footer-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 4vw;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.tf70-footer-col h4 {
  font-family: "Rubik", sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #000;
}

.tf70-footer-col p {
  font-size: 14px;
  line-height: 1.8;
  color: #2a2829;
}

.tf70-footer-col--right {
  text-align: right;
}

.tf70-footer-social {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.tf70-footer .tf70-social-link {
  color: #2a2829;
}

.tf70-footer .tf70-social-link:hover {
  color: #253351;
}

.tf70-footer-copy {
  font-size: 12px;
  color: #666;
}

@media (max-width: 600px) {
  .tf70-footer-inner { flex-direction: column; gap: 24px; }
  .tf70-footer-col--right { text-align: left; }
  .tf70-footer-social { justify-content: flex-start; }
}

/* =======================================
   UTILITY CLASSES
   ======================================= */
.text-muted { color: #999; }
.text-gold { color: #C5A130; }
.text-danger { color: #dc3545; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-2 { padding: 16px; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state h3 {
  font-family: "Rubik", sans-serif;
  color: #666;
  margin-bottom: 12px;
}

/* =======================================
   RESPONSIVE
   ======================================= */
@media (max-width: 768px) {
  .container { padding: 20px 15px; }
  .page-header h1 { font-size: 24px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .instance-row { flex-direction: column; align-items: flex-start; gap: 5px; }
  .form-inline { flex-direction: column; align-items: stretch; }
  .btn-group { flex-direction: column; }
  .admin-tabs { overflow-x: auto; flex-wrap: nowrap; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { margin: 15px; padding: 30px; }
}
/*
 * 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.
 *


 */
