/* ==========================================================================
   Portunus Demo Site 1 Stylesheet (4 Buttons Per Row & Expanded Spacing)
   ========================================================================== */

:root {
  --primary-navy: #0b172a;
  --secondary-navy: #0f172a;
  --accent-blue: #38bdf8;
  --accent-blue-hover: #0284c7;
  --danger-red: #ef4444;
  --danger-red-hover: #dc2626;
  --text-main: #334155;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Centered Page Heading (Increased top and bottom margins) */
h1.page-title-centered {
  font-family: var(--font-sans);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-navy);
  letter-spacing: -0.02em;
  text-align: center;
  margin: 4rem auto 0.0rem auto; /* Increased space above & below h1 */
  width: 100%;
}

h2 {
  text-align: center;
  margin-bottom: 60px;
  font-weight: 300px;
  color: var(--secondary-navy);
}

#center-column {
    display: flex;
    flex-direction: column;
    background-color: var(--accent-blue-hover);
    text-align: left;
    text-decoration: none;
    font-family: sans-serif;
    font-size: 16px;
    line-height: 1.5;
    padding-left: 40px;
    padding-right: 40px;
    max-width: 1000px;
    padding-bottom: 60px;
    margin: 0 auto;
}

p {
   margin-bottom: 30px;
   font-size: 24px;
}

/* flash message stying */
.flash-messages {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 9999 !important;
    max-width: 400px;
    width: calc(100% - 40px);
    pointer-events: none; /* Prevents container from blocking clicks underneath */
}

.flash-messages .alert {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    background-color: #f8d7da;
    color: blue;
    pointer-events: auto; /* Restores clickability on individual alerts */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Adds depth for floating appearance */
}

.flash-messages .alert-danger {
    color: red;
    background-color: #f8d7da;
}

.flash-messages .alert-success {
    color: green;
    /* Recommended fix: standard light-green alert background */
    background-color: #d4edda;
}

.flash-container-close {
    pointer-events: auto; /* Restores clickability since .flash-messages has pointer-events: none */
    display: block;
    margin-left: auto;
    margin-bottom: 6px;
    background-color: #ffffff;
    border: 1px solid #ccc;
    color: #333;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.flash-container-close:hover {
    background-color: #f1f1f1;
}

/* --------------------------------------------------------------------------
   Gatekeeper Action Anchor Buttons Row
   -------------------------------------------------------------------------- */
#gatekeeper-anchors-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  margin: 0 auto 4.5rem auto;
  width: 100%;
}

#gatekeeper-anchors-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  height: 50px;
  padding: 0 2rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 6px rgba(11, 23, 42, 0.08);
}

/* Primary Login Button */
#gatekeeper-login-button {
  background-color: var(--primary-navy);
  color: #ffffff;
  border: 1px solid var(--primary-navy);
}

#gatekeeper-login-button:hover {
  background-color: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(11, 23, 42, 0.15);
}

/* Reset Button (Outlined) */
#gatekeeper-reset-button {
  background-color: #ffffff;
  color: var(--primary-navy);
  border: 1px solid var(--border-color);
}

#gatekeeper-reset-button:hover {
  background-color: #f8fafc;
  border-color: var(--accent-blue);
  color: var(--accent-blue-hover);
  transform: translateY(-1px);
}

/* Register Button (Sky Blue Accent) */
#gatekeeper-register-button {
  background-color: var(--accent-blue);
  color: var(--primary-navy);
  border: 1px solid var(--accent-blue);
}

#gatekeeper-register-button:hover {
  background-color: #7dd3fc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

/* --------------------------------------------------------------------------
   User Management Grid (Exactly 4 Buttons per Row, Extra Spacing)
   -------------------------------------------------------------------------- */
.user-management-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.75rem; /* Increased space between forms */
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Form Item (Sized for exactly 4 per row with 1.75rem gaps) */
.delete-user-form {
  flex: 0 0 calc(25% - 1.32rem);
  min-width: 220px;
  display: flex;
  justify-content: center;
}

.delete-user-form input[type="submit"] {
  width: 100%;
  height: 42px;
  padding: 0 0.85rem;
  background-color: #fef2f2;
  color: var(--danger-red);
  font-family: var(--font-sans);
  font-size: 0.775rem; /* Smaller, crisp delete button typography */
  font-weight: 700;
  border: 1px solid #fecaca;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease-in-out;
}

.delete-user-form input[type="submit"]:hover {
  background-color: var(--danger-red);
  color: #ffffff;
  border-color: var(--danger-red);
}

footer {
  text-align: center;
}

footer p {
  font-size: 1.0rem; /* 2x increase */
  color: var(--text-light);
  font-weight: 600;
}
