/* ==========================================================================
   1. SETTINGS & TOOLS (Variables, DNA, Global Configuration)
   ========================================================================== */
:root {
  --l3-navy: #001A33;
  --l3-gold: #C5A059;
  --l3-ivory: #F9F9F7;
  --l3-white: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: var(--l3-white);
  color: var(--l3-navy);
  line-height: 1.6;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   2. GLOBAL LAYOUT WRAPPERS (Persistent Scaffolding Elements)
   ========================================================================== */
.main-content, .application, .portal {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 30px;
}

header { 
  background: var(--l3-navy); 
  padding: 5px 20px 10px 0;
  border-bottom: 5px solid var(--l3-gold); 
}

.header-wrap, .footer-wrap { 
  display: flex; 
  justify-content: space-between; 
  align-items: center;
}

.logo-box img { height: 150px; width: auto; display: block; }

footer { 
  background: var(--l3-navy); 
  padding: 20px; 
  border-top: 2px solid var(--l3-gold); 
  color: var(--l3-gold);
  font-size: 0.75rem;
  text-transform: uppercase;
}

/* ==========================================================================
   3. STRUCTURAL NAVIGATION LINKS
   ========================================================================== */
.nav-links a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: -0.2px;
  margin-left: 30px;
  transition: 0.3s;
}
.nav-links a:hover { color: var(--l3-gold); }

.footer-links a { text-decoration: none; color: #fff; margin-left: 15px; font-weight: 500; transition: 0.3s; }
.footer-links a:hover { color: var(--l3-gold); }

/* ==========================================================================
   4. BRAND ASSETS & SOCIAL MEDIA VECTORS
   ========================================================================== */
.footer-copyright { font-weight: 300; }
.footer-socials { display: flex; align-items: center; gap: 12px; }
.footer-socials a { color: #FFFFFF !important; text-decoration: none; display: flex; align-items: center; transition: 0.3s ease; }
.footer-socials a i, .footer-socials a svg { fill: #FFFFFF; color: #FFFFFF; font-size: 1.1rem; transition: fill 0.3s ease, color 0.3s ease; }
.footer-socials a:hover { color: var(--l3-gold) !important; transform: translateY(-2px); }
.footer-socials a:hover svg,
.footer-socials a:hover svg path { fill: var(--l3-gold) !important; }

/* ==========================================================================
   5. MARKETING COMPONENTS (Hero Blocks, Lists)
   ========================================================================== */
.hero { padding: 40px 0; text-align: center; background: #fff; margin-top: 0; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 500; line-height: 1.1; margin-bottom: 30px; }
.hero h1 span { color: var(--l3-gold); font-style: italic; }
.hero p { font-size: 1.25rem; color: #555; max-width: 600px; margin: 0 auto 50px; }
.motto-tag { font-size: 0.8rem; font-weight: 400; text-transform: uppercase; letter-spacing: 5px; color: var(--l3-gold); margin-bottom: 25px; display: block; }

.action { background: var(--l3-ivory); padding: 20px 20px; border-top: 1px solid #ddd; }
.action-grid { display: grid; max-width: 1000px; grid-template-columns: repeat(3, 1fr); gap: 30px; margin: 0 auto; }

/* ==========================================================================
   6. INTERACTIVE COMPONENTS (Cards, Grids, Buttons)
   ========================================================================== */
.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-bottom: 30px; }
.app-card, .action-item {
  background: var(--l3-white); padding: 30px; border-left: 5px solid var(--l3-navy);
  transition: all 0.3s ease; box-shadow: 0 2px 15px rgba(0,0,0,0.05);
  position: relative; display: flex; flex-direction: column; height: 100%;
  text-decoration: none !important; color: inherit;
}
.app-card:hover:not(.disabled-card), .action-item:hover { border-left-color: var(--l3-gold); transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.app-card h3, .action-item h3 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; margin-bottom: 20px; border-bottom: 2px solid var(--l3-gold); display: inline-block; padding-bottom: 8px; align-self: flex-start; color: var(--l3-navy) !important; text-decoration: none !important; }
.app-card p, .action-item p { font-size: 0.95rem; color: #444 !important; line-height: 1.7; margin-bottom: 0; text-decoration: none !important; }
.card-link { text-decoration: none !important; color: inherit !important; }
.card-link::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; }
.disabled-card { opacity: 0.5; filter: grayscale(100%); cursor: not-allowed; }

.public-url {
  display: block; margin-top: auto; padding: 8px; font-family: monospace; font-size: 0.8rem; color: var(--l3-gold) !important;
  background: rgba(0, 26, 51, 0.05); border: 1px dashed var(--l3-gold); position: relative; z-index: 5; cursor: pointer; text-align: center; text-decoration: none !important;
}
.tag-status { margin-top: 15px; font-size: 0.65rem; font-weight: 800; text-transform: uppercase; color: var(--l3-gold); border: 1px solid var(--l3-gold); padding: 2px 6px; align-self: flex-start; position: relative; z-index: 5; }

.btn-group { display: flex; gap: 15px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.btn, .btn-submit { width: 100%; max-width: 220px; text-align: center; padding: 14px 0; text-decoration: none; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.5px; border-radius: 3px; transition: 0.3s ease; display: inline-block; cursor: pointer; border: none; }
.btn-navy, .btn-submit { background: var(--l3-navy); color: var(--l3-white); border: 2px solid var(--l3-navy); }
.btn-gold { background: var(--l3-gold); color: var(--l3-navy); border: 2px solid var(--l3-gold); }
.btn:hover, .btn-submit:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

/* ==========================================================================
   7. FORM HANDLING & INPUT FIELDS (Application Screen)
   ========================================================================== */
.section-title { text-transform: uppercase; color: var(--l3-navy); background: var(--l3-gold); padding: 8px 15px; margin: 25px 0 15px; border-left: 5px solid var(--l3-navy); font-weight: 700; font-size: 0.85rem; letter-spacing: 1px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 0.7rem; font-weight: 700; margin-bottom: 6px; text-transform: uppercase; color: #666; }
.field input, .field select, .notes-area { width: 100%; padding: 12px; border: 1px solid var(--l3-gold); background: #fff; color: var(--l3-navy); font-size: 0.95rem; border-radius: 3px; outline: none; }
input:focus, select:focus { border-color: var(--l3-navy); box-shadow: 0 0 0 2px rgba(0, 26, 51, 0.1); }

.sig-container { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; padding: 20px; background: var(--l3-ivory); border: 1px solid var(--l3-navy); border-radius: 3px; margin-top: 15px; }
.cursive-sig { flex: 1 1 250px; font-family: 'Brush Script MT', cursive; font-size: 1.8rem; border: none; border-bottom: 1px solid var(--l3-navy); background: transparent; color: var(--l3-navy); min-width: 0; }
.verified-text { font-size: 0.65rem; color: var(--l3-gold); font-weight: 400; font-style: italic; margin-left: auto; }
.unit-banner { color: var(--l3-navy); font-weight: 500; letter-spacing: 1px; margin-bottom: 20px; }
.btn-submit-spacing { margin-top: 30px; }

/* ==========================================================================
   8. ADMINISTRATIVE TOOLING (Pipeline Tables, Controls)
   ========================================================================== */
.admin-table { width: 100%; border-collapse: collapse; margin: 30px 0; font-family: -apple-system, system-ui, sans-serif; }
.admin-table th { background: var(--l3-navy); color: #fff; text-align: left; padding: 12px 15px; font-size: 0.75rem; text-transform: uppercase; border-bottom: 3px solid var(--l3-gold); }
.admin-table td { padding: 15px; border-bottom: 1px solid #eee; font-size: 0.9rem; color: var(--l3-navy); vertical-align: middle; }
.admin-table tbody tr:hover { background: rgba(197, 160, 89, 0.05); cursor: pointer; }

.status-pill { padding: 4px 10px; border-radius: 3px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; display: inline-block; min-width: 85px; text-align: center; }
.status-Pending { background: #fff3cd; color: #856404; }
.status-Viewing { background: #d1ecf1; color: #0c5460; }
.status-Selected { background: #e2e3e5; color: #383d41; }
.status-Approved { background: #d4edda; color: #155724; }
.status-Rejected { background: #f8d7da; color: #721c24; }
.report-actions { display: flex; gap: 15px; margin-top: 30px; justify-content: center; }

/* ==========================================================================
   9. VIEW SPECIFIC WRAPPERS (MVC Standard Layout Rules)
   ========================================================================== */
.view-title { font-family: 'Segoe UI', Roboto, sans-serif; font-size: 1.75rem; color: var(--l3-navy); font-weight: 500; margin-bottom: 25px; padding-bottom: 12px; border-bottom: 1px solid #eee; letter-spacing: -0.5px; }
.form-container-sm { max-width: 600px; margin: 40px auto; }

.success-wrap, .error-wrap { text-align: center; padding: 40px 20px; }
.success-icon { font-size: 4rem; color: var(--l3-gold); margin-bottom: 20px; }
.error-icon { font-size: 4rem; color: #cc0000; margin-bottom: 20px; }
.success-headline, .error-headline { color: var(--l3-navy); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; }
.success-main-text, .error-main-text { font-size: 1.1rem; color: #444; line-height: 1.6; margin-bottom: 20px; }
.success-sub-text, .error-sub-text { color: #666; margin-bottom: 40px; }

/* ==========================================================================
   10. MEDIA QUERIES (Responsive Breakpoints)
   ========================================================================== */
@media (max-width: 768px) {
  .header-wrap, .footer-wrap { flex-direction: column; text-align: center; }
  .action-grid, .form-grid { grid-template-columns: 1fr; }
  .nav-links { padding: 0; }
  .nav-links a { margin: 0 10px; }
  .btn-group, .report-actions { flex-direction: column; align-items: center; }
}

/* ==========================================================================
   11. PRINT RULES (Output Modification)
   ========================================================================== */
@media print {
  header, footer, .no-print, .btn-submit, .invite-back { display: none !important; }
  .application, .portal { box-shadow: none !important; border: none !important; margin: 0 !important; padding: 0 !important; width: 100%; }
  input, select, textarea { border: none !important; padding: 0 !important; font-weight: bold; color: #000 !important; background: transparent !important; }
  .section-title { background: #eee !important; color: #000 !important; border-left: 5px solid #000 !important; }
}
