/* ============================================
   CSUG Helpdesk - Modern Public Pages Styles
   Bootstrap 4 Compatible | No CDN Dependencies
   Maintained by DST (DownStreamTech)
   ============================================ */

:root {
  --dst-primary:       #1e293b;
  --dst-primary-light: #334155;
  --dst-accent:        #4f46e5;
  --dst-accent-hover:  #4338ca;
  --dst-success:       #059669;
  --dst-warning:       #d97706;
  --dst-danger:        #dc2626;
  --dst-bg:            #f8fafc;
  --dst-card-bg:       #ffffff;
  --dst-text:          #1e293b;
  --dst-text-muted:    #64748b;
  --dst-border:        #e2e8f0;
  --dst-shadow:        0 1px 3px rgba(0,0,0,0.06);
  --dst-shadow-lg:     0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
  --dst-radius:        0.5rem;
  --dst-radius-sm:     0.375rem;
}

body.public-page {
  background: var(--dst-bg);
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dst-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.public-page .container {
  flex: 1 0 auto;
}

/* Topbar */
.public-page .topbar {
  padding: 0.6rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.public-page .sidebar-brand-text b {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: #a3e635;
}
.public-page .sidebar-brand-text sup {
  font-weight: 700;
  color: #a3e635;
  text-shadow: 0 0 6px rgba(163,230,53,0.4);
}
.public-page .sidebar-brand-icon i {
  color: #a3e635;
  text-shadow: 0 0 8px rgba(163,230,53,0.5);
}

/* Cards */
.public-page .card {
  border: 1px solid var(--dst-border);
  border-radius: var(--dst-radius);
  box-shadow: var(--dst-shadow);
  overflow: hidden;
}
.public-page .card-header {
  background: #fff;
  color: var(--dst-text);
  border-bottom: 1px solid var(--dst-border);
  padding: 1.5rem 1.5rem 1rem;
}
.public-page .card-header h3 {
  margin: 0;
  font-weight: 700;
  font-size: 1.75rem;
}
.public-page .card-header .card-subtitle {
  font-size: 0.85rem;
  color: var(--dst-text-muted);
  margin-bottom: 0.25rem;
}
.public-page .card-body {
  padding: 1.5rem;
}

/* Form Controls */
.public-page .form-control,
.public-page .form-control-lg {
  border-radius: var(--dst-radius-sm);
  border: 1px solid var(--dst-border);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.public-page .form-control:focus,
.public-page .form-control-lg:focus {
  border-color: var(--dst-accent);
  box-shadow: 0 0 0 2px rgba(52,152,219,0.2);
  outline: none;
}
.public-page label {
  font-weight: 600;
  color: var(--dst-text);
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

/* Buttons */
.public-page .btn-primary {
  background: var(--dst-accent);
  border-color: var(--dst-accent);
  border-radius: var(--dst-radius-sm);
  padding: 0.7rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
}
.public-page .btn-primary:hover {
  background: var(--dst-accent-hover);
  border-color: var(--dst-accent-hover);
}
.public-page .btn-success {
  border-radius: var(--dst-radius-sm);
  font-weight: 600;
}

/* Alerts */
.public-page .alert {
  border: none;
  border-radius: var(--dst-radius-sm);
}

/* Turnstile */
.public-page .cf-turnstile {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

/* Links */
.public-page a.small {
  color: var(--dst-accent);
  font-weight: 600;
}
.public-page a.small:hover {
  color: var(--dst-accent-hover);
}

/* Form focus */
.public-page .form-control:focus,
.public-page .form-control-lg:focus {
  border-color: var(--dst-accent);
  box-shadow: 0 0 0 2px rgba(79,70,229,0.15);
}

/* ============================================
   Index Page - Job Request Boxes
   ============================================ */
.job-boxes-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  padding: 0.5rem 0;
}
.job-box {
  border-radius: var(--dst-radius);
  padding: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  border-left: 5px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--dst-shadow);
  background: #fff;
}
.job-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--dst-shadow-lg);
}
.job-box p {
  margin-bottom: 0.5rem;
}
.job-box .label {
  font-weight: 700;
  color: var(--dst-text);
  display: inline-block;
  min-width: 130px;
}
.job-box .jobby-id {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--dst-primary);
}
.job-box.status-ongoing {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-left-color: var(--dst-success);
}
.job-box.status-queue {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-left-color: var(--dst-warning);
}
.job-box.status-overdue {
  background: linear-gradient(135deg, #fef2f2, #fecaca);
  border-left-color: var(--dst-danger);
}
.job-box .overdue-days {
  color: var(--dst-danger);
  font-weight: 700;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(239,68,68,0.3);
}

/* Clock widget */
#ct {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dst-primary);
  display: block;
  margin-bottom: 1rem;
}

/* Page heading */
.public-page-heading {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--dst-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--dst-accent);
  display: inline-block;
}

/* Index card header accent */
.job-boxes-container + .card-header,
.card:has(.job-boxes-container) .card-header {
  border-top: 4px solid var(--dst-accent);
}

/* ============================================
   About Section
   ============================================ */
.about-section {
  background: linear-gradient(135deg, var(--dst-primary), var(--dst-primary-light));
  color: #fff;
  border-radius: var(--dst-radius);
  padding: 2.5rem;
  margin-top: 2rem;
  box-shadow: var(--dst-shadow-lg);
}
.about-section h2 {
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.about-section .about-description {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.92;
  margin-bottom: 1rem;
}
.about-section .dst-branding {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.625rem 1.25rem;
  background: rgba(255,255,255,0.12);
  border-radius: var(--dst-radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}
.about-section .about-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.85rem;
  opacity: 0.85;
}

/* ============================================
   Footer
   ============================================ */
.public-footer {
  background: #343a40;
  color: rgba(255,255,255,0.7);
  padding: 1rem 0;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.8;
  flex-shrink: 0;
}
.public-footer strong {
  color: #fff;
  font-weight: 700;
}
.public-footer .footer-sep {
  margin: 0 0.5rem;
  opacity: 0.35;
}
.public-footer a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.public-footer a:hover {
  text-decoration: underline;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 576px) {
  .public-page .sidebar-brand-text b {
    font-size: 0.85rem;
    letter-spacing: 0;
  }
  .public-page .sidebar-brand-text sup {
    font-size: 0.65rem;
  }
  .public-page .sidebar-brand-icon {
    font-size: 0.9rem;
  }
  .job-boxes-container {
    grid-template-columns: 1fr;
  }
  .job-box .label {
    min-width: 110px;
  }
  .public-page .card-body {
    padding: 1.5rem 1rem;
  }
}
@media (min-width: 577px) and (max-width: 768px) {
  .job-boxes-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
