/* === HPG Corporate Branded Stylesheet (v2) === */
/* Modeled after hpgresources.com */

/* --- 1. Import Brand Fonts from Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Open+Sans:wght@400;600&display=swap');

/* --- 2. Brand Color & Font Variables (The HPG Control Panel) --- */
:root {
  --hpg-blue: #002D62;
  --hpg-red: #ED1C24;
  --hpg-light-gray-bg: #f8f9fa; /* A very light, clean gray for the page background */
  --hpg-off-white-bg: #ffffff;
  --hpg-border-color: #dee2e6;
  --hpg-text-dark: #212529; /* A softer black for text */
  --hpg-text-light: #495057;

  /* HPG Font Families from Google Fonts */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
}

/* --- 3. General Body & Layout Styling --- */
body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--hpg-text-dark);
  background-color: var(--hpg-light-gray-bg);
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.container {
  width: 100%;
  max-width: 800px;
  background: var(--hpg-off-white-bg);
  padding: 2rem 2.5rem;
  border-radius: 4px; /* HPG uses sharper corners */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  /* The branded top border */
  border-top: 5px solid var(--hpg-red);
}

/* --- 4. Branded Header with Logo --- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--hpg-border-color);
  margin-bottom: 2rem;
  gap: 1.5rem;
}

.logo-container img {
  max-height: 45px; /* Adjusted to match site scale */
  width: auto;
}

header h1 {
  font-family: var(--font-heading);
  color: var(--hpg-blue);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  text-align: right;
}

/* --- 5. Authentication & User Info --- */
.auth-container {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px solid var(--hpg-border-color);
  border-radius: 4px;
  margin: 2rem 0;
  background-color: #fdfdfd;
}

.user-info {
  text-align: right;
  margin-bottom: 1rem;
  font-size: 0.9em;
  color: var(--hpg-text-light);
}
.user-info a {
  color: var(--hpg-red);
  text-decoration: none;
  font-weight: 600;
}
.user-info a:hover {
  text-decoration: underline;
}

/* --- 6. Form Elements Styled to Match HPG --- */
#app-content { display: none; }

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--hpg-blue);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

select, input[type="file"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="file"]::file-selector-button {
  /* Style the "Choose File" button */
  background-color: var(--hpg-blue);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 15px;
  transition: background-color 0.2s;
}
input[type="file"]::file-selector-button:hover {
  background-color: #001f45; /* Darker blue */
}

select:focus, input[type="file"]:focus {
  outline: none;
  border-color: var(--hpg-blue);
  box-shadow: 0 0 0 3px rgba(0, 45, 98, 0.2);
}

.checkbox-group {
  display: flex;
  align-items: center;
  padding: 10px;
}
.checkbox-group input {
  margin-right: 12px;
  width: 1.2em;
  height: 1.2em;
  accent-color: var(--hpg-red); /* Brand the checkbox color */
}
.checkbox-group label {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--hpg-text-dark);
  margin-bottom: 0;
}

/* --- 7. Buttons & Interactive Elements to Match HPG --- */
.button {
  background-color: var(--hpg-red); /* Primary call-to-action is red */
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background-color 0.2s, transform 0.1s;
}
.button:hover:not(:disabled) {
  background-color: #c41219; /* A slightly darker red */
}
.button:active:not(:disabled) {
  transform: translateY(1px);
}
.button:disabled {
  background-color: #f3a0a3;
  cursor: not-allowed;
}

.loader {
  display: none;
  margin: 20px auto;
  border: 5px solid #e9ecef;
  border-top-color: var(--hpg-blue);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- 8. Results Display --- */
.results-container {
  display: none;
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: #f7faff;
  border: 1px solid #d8e2ff;
  border-radius: 4px;
}
.results-container h3 {
  font-family: var(--font-heading);
  color: var(--hpg-blue);
  margin-top: 0;
}
.results-container a {
  color: var(--hpg-red);
  font-weight: 600;
  text-decoration: none;
}
.results-container a:hover {
  text-decoration: underline;
}

/* --- 9. Responsive Design for Mobile --- */
@media (max-width: 768px) {
  body {
    padding: 1rem 0;
  }
  .container {
    width: 100%;
    margin: 0;
    padding: 1.5rem;
    border-radius: 0;
    box-shadow: none;
  }
  header {
    flex-direction: column;
    gap: 1rem;
  }
  header h1 {
    text-align: center;
  }
}

/* --- New Styles for Instructions --- */

.instructions {
  font-size: 0.85rem;      /* Make the text slightly smaller */
  font-style: italic;      /* Italicize to set it apart */
  color: var(--hpg-text-light); /* Use the lighter text color */
  background-color: #f8f9fa; /* A very subtle background */
  padding: 10px 15px;      /* Add some nice spacing */
  border-radius: 4px;      /* Match the other element corners */
  border: 1px solid var(--hpg-border-color);
  margin-top: 0;           /* Remove default top margin */
  margin-bottom: 1rem;     /* Add space before the file input */
}

.instructions strong {
  font-style: normal; /* Make the bold part not italic */
  color: var(--hpg-text-dark);
}