@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,400;1,600&display=swap');

/* --- BRAND VARIABLES & CORE STYLES --- */
:root {
  --harvard-crimson: #A51C30;
  --brand-primary: #171E28;      
  --brand-secondary: #000000;    
  --brand-accent: #198754;       
  --brand-bg: #f4f6f8;
  --brand-card-bg: #ffffff;
  --brand-border: #e9ecef;
}

body { 
  background-color: var(--brand-bg); 
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
  color: #212529;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Offline Notification Banner */
#offlineBanner {
  background-color: #ffc107;
  color: #212529;
  text-align: center;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.875rem;
  position: sticky;
  top: 0;
  z-index: 9999;
}

/* --- LOGIN PAGE BACKGROUND & AUTH WRAPPER --- */
.login-page-wrapper {
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, rgba(23, 30, 40, 0.65) 0%, rgba(15, 23, 42, 0.55) 100%), url('./login_bg.jpg') no-repeat center center / cover;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.auth-container { 
  max-width: 440px; 
  width: 100%;
  margin: 0 auto; 
  background: rgba(255, 255, 255, 0.96); 
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px 28px; 
  border-radius: 20px; 
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.4); 
  text-align: center;
  animation: fadeIn 0.4s ease-out; 
}

/* --- APP LAYOUT (LEFT SIDEBAR PANEL + CENTERED WORKSPACE) --- */
.app-layout-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  max-width: 1240px;
  margin: 24px auto;
  padding: 0 20px;
  gap: 28px;
}

.left-sidebar-panel {
  width: 310px;
  flex-shrink: 0;
  position: sticky;
  top: 85px;
  z-index: 100;
}

.center-content-area {
  flex: 1;
  max-width: 860px;
  min-width: 0;
}

.workspace-container {
  max-width: 860px;
  margin: 0 auto 40px auto !important;
  padding: 32px;
  text-align: left;
}

@media (max-width: 991px) {
  .app-layout-wrapper {
    flex-direction: column;
    align-items: center;
  }
  .left-sidebar-panel {
    width: 100%;
    position: static;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand-logo { 
  max-width: 76px !important;
  max-height: 76px !important;
  width: auto !important;
  height: auto !important;
  display: block;
  margin: 0 auto 0.5rem auto;
}

/* --- INPUTS & BUTTONS --- */
.form-control-lg, .form-control {
  border-radius: 8px;
  border: 2px solid var(--brand-border);
  transition: all 0.2s;
}
.form-control-lg:focus, .form-control:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(23, 30, 40, 0.1);
  outline: none;
}

.form-control-lg.is-valid { border-color: var(--brand-accent); }
.form-control-lg.is-invalid { border-color: #dc3545; }
#accessCodeInput { text-transform: uppercase; letter-spacing: 1px; }

/* Buttons */
.btn-brand { 
  background-color: var(--brand-primary); 
  color: #ffffff; 
  border-radius: 8px; 
  padding: 12px 20px; 
  font-weight: 600; 
  border: none;
  transition: background-color 0.2s, transform 0.1s;
}
.btn-brand:hover { background-color: #2a3441; color: #ffffff; }

.btn-outline-brand {
  color: var(--brand-primary);
  border: 2px solid var(--brand-border);
  background: transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-outline-brand:hover { border-color: var(--brand-primary); background-color: #f8f9fa; }

.yoco-btn { 
  background-color: var(--brand-secondary); 
  color: #ffffff; 
  padding: 16px; 
  font-weight: 600; 
  border-radius: 8px; 
  text-decoration: none; 
  display: block; 
  width: 100%;
}
.yoco-btn:hover { background-color: #333333; color: #ffffff; }

/* --- 1-2-3 DASHBOARD UI ELEMENTS --- */
.step-card {
  background: var(--brand-card-bg);
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}
.step-number { 
  background-color: var(--brand-primary); 
  color: white; 
  width: 32px; 
  height: 32px; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  border-radius: 50%; 
  font-weight: bold; 
  font-size: 1rem;
  margin-right: 12px;
}
.step-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
}

.dropzone-box {
  border: 2px dashed #ccd1d9;
  padding: 30px 20px;
  border-radius: 8px;
  background-color: #f8f9fa;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s, border-color 0.2s;
}
.dropzone-box:hover, .dropzone-box.dragover { 
  background-color: #f1f3f5; 
  border-color: var(--brand-primary); 
}

/* Status badges */
.status-badge-pending { background-color: #6c757d; color: white; }
.status-badge-processing { background-color: #0d6efd; color: white; }
.status-badge-completed { background-color: #198754; color: white; }
.status-badge-failed { background-color: #dc3545; color: white; }

/* Attached Memo Badge: white background, black border, black text */
.badge-memo-attached, #rubricPdfBadge {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 1.5px solid #000000 !important;
  font-weight: 700 !important;
}

/* Results Table */
.results-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--brand-border);
}
.results-table {
  margin-bottom: 0;
  font-size: 0.9rem;
}
.results-table th {
  background-color: #f8f9fa;
  color: var(--brand-primary);
  font-weight: 600;
}

/* --- PWA BOTTOM NAVIGATION BAR --- */
body.has-bottom-nav {
  padding-bottom: 75px;
}

.pwa-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background-color: #ffffff;
  border-top: 1px solid var(--brand-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.nav-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  flex: 1;
  height: 100%;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
  background: none;
  border: none;
  padding: 0;
}

.nav-tab-item:hover {
  color: var(--brand-primary);
  background-color: #f8f9fa;
}

.nav-tab-item.active {
  color: #dc3545;
  border-top: 3px solid #dc3545;
}

.nav-tab-icon {
  font-size: 1.25rem;
  margin-bottom: 2px;
}

/* --- CONTEXT SELECTOR BAR (IMAGE MATCHING MEDIA_1790111054164) --- */
.context-selector-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.context-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  margin-bottom: 6px;
}

.context-select {
  font-weight: 600;
  border-radius: 10px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.92rem;
  color: #0f172a;
  padding: 10px 14px;
}
.context-select:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

/* --- FILING SECTION BRAND COLOR SCHEME (MEDIA_1790111222696) --- */
.btn-dusky-yellow {
  background-color: #FEFE00 !important;
  color: #000000 !important;
  font-weight: 700 !important;
  border: 1.5px solid #000000 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
}
.btn-dusky-yellow:hover {
  background-color: #e6e600 !important;
  color: #000000 !important;
  transform: translateY(-1px);
}

.btn-black-solid {
  background-color: #000000 !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  border: 1px solid #000000 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
}
.btn-black-solid:hover {
  background-color: #1a1a1a !important;
  color: #FFFFFF !important;
  transform: translateY(-1px);
}

.btn-encarnado-red {
  background-color: #F80000 !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(248,0,0,0.25);
  transition: all 0.2s ease;
}
.btn-encarnado-red:hover {
  background-color: #d60000 !important;
  color: #FFFFFF !important;
  transform: translateY(-1px);
}

.btn-bright-red {
  background-color: #FF0000 !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(255,0,0,0.25);
  transition: all 0.2s ease;
}
.btn-bright-red:hover {
  background-color: #e60000 !important;
  color: #FFFFFF !important;
  transform: translateY(-1px);
}

/* --- SUBJECT ARCHIVE ACCORDION --- */
.subject-archive-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
}

.subject-archive-header {
  padding: 16px 20px;
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.subject-archive-header:hover {
  background-color: #f8fafc;
}

.subject-archive-table thead th {
  background-color: #f8fafc !important;
  color: #475569 !important;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 20px;
  border-bottom: 2px solid #e2e8f0 !important;
  border-top: none;
}

.subject-archive-table tbody td {
  padding: 16px 20px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

.subject-archive-table tbody tr:last-child td {
  border-bottom: none;
}

/* --- PWA TOP BANNER HEADER (HARVARD ACADEMIC LUXURY BRANDING) --- */
.pwa-top-header {
  position: sticky;
  top: 0;
  z-index: 1050;
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.brand-header-box {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo-icon {
  height: 48px;
  width: 48px;
  object-fit: contain;
  padding-right: 14px;
  border-right: 1.5px solid #e2e8f0;
}

.brand-text-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-main-title {
  font-family: 'Cinzel', 'Georgia', serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 3px;
  color: #0f172a;
  line-height: 1.1;
  text-transform: uppercase;
}

.brand-tagline {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.50rem;
  font-weight: 600;
  letter-spacing: 1.8px;
  color: #94a3b8;
  text-transform: uppercase;
  margin-left: 8px;
}

.brand-subline {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 0.82rem;
  font-style: italic;
  font-weight: 500;
  color: #475569;
  letter-spacing: 0.3px;
  margin-top: 1px;
  line-height: 1.15;
}

.brand-subline-highlight {
  color: #A51C30; /* Harvard Crimson */
  font-weight: 700;
  font-style: italic;
}

.header-icon-btn {
  background: transparent;
  border: none;
  color: #171E28;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-icon-btn:hover {
  background-color: #f1f5f9;
}

/* --- IMAGE 2 FLOATING PILL TAB SWITCHER --- */
.pill-switcher-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.pill-switcher-container {
  background: #ffffff;
  border-radius: 50px;
  padding: 4px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  border: 1px solid #e2e8f0;
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
}

.pill-tab-btn {
  background: transparent;
  border: none;
  padding: 8px 22px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.pill-tab-btn.active {
  background: #171E28;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(23, 30, 40, 0.25);
}

.pill-tab-btn:hover:not(.active) {
  color: #0f172a;
  background: #f8fafc;
}

/* --- IMAGE 2 ACCORDION CARDS (DEFAULT CLOSED DROPDOWNS) --- */
.collapsible-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.collapsible-card-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  background: #ffffff;
  transition: background-color 0.2s;
}

.collapsible-card-header:hover {
  background-color: #f8fafc;
}

.collapsible-card-title {
  font-weight: 700;
  font-size: 0.98rem;
  color: #0f172a;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.collapsible-toggle-icon {
  font-size: 0.8rem;
  color: #0f172a;
  transition: transform 0.3s ease;
  margin-left: auto;
}

.collapsible-card.is-closed .collapsible-toggle-icon {
  transform: rotate(-90deg);
}

.collapsible-card-body {
  padding: 0 24px 24px 24px;
  border-top: 1px solid #f1f5f9;
  display: block;
}

.collapsible-card.is-closed .collapsible-card-body {
  display: none;
}

/* --- EMAIL PREVIEW MODAL STYLES --- */
.email-preview-frame {
  width: 100%;
  height: 520px;
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  background-color: #ffffff;
}

/* --- PROFESSIONAL TOAST / NOTIFICATION POPUP --- */
.gm-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  width: calc(100% - 40px);
  pointer-events: none;
}

.gm-toast {
  pointer-events: auto;
  background: #171E28;
  color: #ffffff;
  border-left: 5px solid #0056b3;
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: gmToastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  font-size: 0.9rem;
}

.gm-toast.gm-toast-success {
  border-left-color: #10b981;
}

.gm-toast.gm-toast-error {
  border-left-color: #ef4444;
}

.gm-toast.gm-toast-warning {
  border-left-color: #f59e0b;
}

.gm-toast.gm-toast-info {
  border-left-color: #3b82f6;
}

.gm-toast-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-top: 2px;
}

.gm-toast-content {
  flex: 1;
}

.gm-toast-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
  color: #f8fafc;
}

.gm-toast-message {
  color: #cbd5e1;
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.gm-toast-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  line-height: 1;
}

.gm-toast-close:hover {
  color: #ffffff;
}

@keyframes gmToastSlideIn {
  from {
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes gmToastFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}




