/* === Professional Public-Facing Theme === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --bg-dark: #0a0e17;
  --bg-panel: #161d2d;
  --border-color: #2a3449;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-heading: #ffffff;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #60a5fa;
  --input-bg: #0f1320;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(at 15% 15%, hsla(217, 80%, 25%, 0.3) 0px, transparent 50%),
    radial-gradient(at 80% 95%, hsla(267, 70%, 25%, 0.2) 0px, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

/* === Header & Footer === */
.header {
  padding: 24px;
  text-align: center;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  text-decoration: none;
}
.logo svg {
  width: 32px;
  height: 32px;
}
.logo span {
  font-weight: 400;
  color: var(--accent-blue);
}

.footer {
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: auto;
}
.footer a {
  color: var(--text-primary);
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}

/* === Main Layout & Panel === */
.main-content {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.panel {
  width: 100%;
  max-width: 460px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 40px var(--shadow-color);
}
.panel-header {
  text-align: center;
  margin-bottom: 24px;
}
.panel-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text-heading);
}
.panel-header .note {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* === Forms === */
label {
  display: block;
  margin: 16px 0 8px;
  font-weight: 500;
  color: var(--text-primary);
}
input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s;
}
input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* === Buttons & Actions === */
.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
  background: var(--accent-blue);
  border: 1px solid var(--accent-blue);
  color: #fff;
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s;
}
.btn:hover {
  background: var(--accent-blue-hover);
  border-color: var(--accent-blue-hover);
}
.btn.ghost {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}
.btn.ghost:hover {
  background: var(--border-color);
  color: #fff;
}

.sub-actions {
  text-align: center;
  margin-top: 24px;
  color: var(--text-secondary);
}
.sub-actions a {
  color: var(--accent-blue);
  font-weight: 500;
  text-decoration: none;
}
.sub-actions a:hover {
  text-decoration: underline;
}

/* === Message Boxes === */
.msg {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-align: center;
}
.msg.success { background-color: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.2); color: #22c55e; }
.msg.error { background-color: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2); color: #ef4444; }

/* === Member Portal Specifics === */
.member-info {
    margin: 24px 0;
}
.member-info h2 {
    font-size: 1.5rem;
    margin: 0;
    text-align: center;
}
.member-info p {
    text-align: center;
    color: var(--text-secondary);
    margin: 4px 0 24px;
}
.info-grid {
    display: grid;
    gap: 12px;
    background: var(--input-bg);
    padding: 16px;
    border-radius: 8px;
}
.info-grid > div {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}
.info-grid > div:last-child {
    border-bottom: none;
}
.info-grid .label {
    color: var(--text-secondary);
}
.info-grid .value {
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

/* FILE: public/web/assets/auth.css */
/* (Add these new styles to the end of your existing auth.css file) */

/* === Portal-Specific Enhancements === */
.portal-panel {
  max-width: 768px; /* Make the panel wider */
}

.portal-header {
  text-align: left;
  margin-bottom: 24px;
}
.portal-header h2 {
  font-size: 1.75rem;
  margin: 0;
  color: var(--text-heading);
}
.portal-header p {
  margin: 4px 0 0;
  color: var(--text-secondary);
}

.products-container {
  margin-top: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.product-card {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.product-card-header {
  padding: 16px;
  background-color: rgba(42, 52, 73, 0.3); /* Slightly different bg for header */
}

.product-card-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.downloads-list {
  padding: 16px;
}

.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}
.download-item:last-child {
  border-bottom: none;
}
.download-item-name {
  display: flex;
  align-items: center;
  gap: 12px;
}
.download-item-name svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--border-color);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s;
}
.download-btn:hover {
  background-color: var(--accent-blue);
  color: white;
}
.no-downloads {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* === Custom Select Dropdown Styling === */
select {
  /* Remove default browser styling to apply our own */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* Add custom dropdown arrow using an SVG background image */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25em;

  /* Add extra padding on the right to not overlap the arrow */
  padding-right: 2.5rem;
}

/* Apply the same base styles from input to the select element */
input,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s;
  font-family: var(--font-sans); /* Ensure font is consistent */
}

/* Apply consistent focus styles */
input:focus,
select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* CSS for Honeypot bot protection */
.form-site {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Add these new styles to the end of your auth.css file */

.portal-header.with-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

.header-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0; /* Prevents buttons from shrinking on flex layouts */
}

/* New style for small, secondary action buttons */
.btn.small-ghost {
  width: auto; /* Override the default full-width */
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary); /* Subtler text color */
}

.btn.small-ghost:hover {
  background: var(--border-color);
  border-color: var(--border-color);
  color: var(--text-primary); /* Brighter text on hover */
}