/**
 * Frontend Portal CSS
 *
 * Minimal structural CSS only — no heavy styling.
 * Uses BEM naming convention for maintainability.
 * Bricks Builder will handle most styling and theming.
 *
 * @package BastionFxPortal
 */

/* =====================================================================
   BASE PORTAL WRAPPER
   ===================================================================== */

.bfp-portal {
  font-family: inherit;
  line-height: 1.6;
  color: inherit;
}

/* =====================================================================
   DASHBOARD
   ===================================================================== */

.bfp-dashboard__welcome {
  margin-bottom: 2rem;
}

.bfp-dashboard__title {
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
}

.bfp-dashboard__stats {
  margin-bottom: 3rem;
}

.bfp-dashboard__stats-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.bfp-dashboard__stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.bfp-dashboard__stat-card {
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  text-align: center;
}

.bfp-dashboard__stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.bfp-dashboard__stat-label {
  font-size: 0.875rem;
  color: #6b7280;
}

.bfp-dashboard__recent-projects,
.bfp-dashboard__recent-requests {
  margin-bottom: 2rem;
}

.bfp-dashboard__section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.bfp-dashboard__empty-message {
  color: #6b7280;
  margin: 0;
}

.bfp-dashboard__project-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bfp-dashboard__project-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.bfp-dashboard__project-item:last-child {
  border-bottom: none;
}

.bfp-dashboard__project-link {
  color: var(--bfp-gold);
  text-decoration: none;
  font-weight: 500;
}

  text-decoration: underline;
}

.bfp-dashboard__requests-table {
  overflow-x: auto;
}

/* =====================================================================
   PROJECT LIST
   ===================================================================== */

.bfp-project-list__items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bfp-project-list__item {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

.bfp-project-list__link {
  display: block;
  color: var(--bfp-gold);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.bfp-project-list__link:hover {
  text-decoration: underline;
}

.bfp-project-list__description {
  margin: 0.5rem 0 0 0;
  color: #6b7280;
  font-size: 0.875rem;
}

ul.bfp-project-picker__list {
    padding-inline-start: 0px;
}

li.bfp-project-picker__item {
    list-style: none;
}

a.bfp-project-picker__link {
    font-size: 16px;
	font-weight: 400;
	color: var(--bfp-gold);
    text-transform: none;
    background: none;
    border: none;
    padding: 0px;
    margin-bottom: 1em;
}

a.bfp-project-picker__link:hover {
    color: var(--bfp-gold);
    background: none;
    border: none;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

/* =====================================================================
   MONITORING TABLE
   ===================================================================== */

.bfp-monitoring-table__title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
}

.bfp-monitoring-table__wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.bfp-monitoring-table__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.bfp-monitoring-table__button-hint {
  color: #6b7280;
  font-size: 0.875rem;
}

/* =====================================================================
   TABLES (GENERIC)
   ===================================================================== */

.bfp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.bfp-table__head {
  background-color: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
}

.bfp-table__header {
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
}

.bfp-table__header--number {
  text-align: right;
}

.bfp-table__header--sortable {
  cursor: pointer;
  user-select: none;
}

.bfp-table__header--checkbox {
  text-align: center;
}

.bfp-table__row {
  border-bottom: 1px solid #e5e7eb;
}

.bfp-table__row:hover {
  background-color: #f9fafb;
}

.bfp-table__cell {
  padding: 0.75rem;
}

.bfp-table__cell--number {
  text-align: right;
}

.bfp-table__cell--checkbox {
  text-align: center;
}

.bfp-table__cell--actions {
  text-align: center;
}

.bfp-table__link {
  color: var(--bfp-gold);
  text-decoration: none;
}

.bfp-table__link:hover {
  text-decoration: underline;
}

.bfp-table__checkbox,
.bfp-table__checkbox-all {
  cursor: pointer;
}

/* =====================================================================
   REQUEST HISTORY
   ===================================================================== */

.bfp-request-history__title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
}

.bfp-request-history__wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.bfp-request-history__empty-message {
  color: #6b7280;
}

.bfp-request-history__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.bfp-pagination__link {
  padding: 0.5rem 1rem;
  color: var(--bfp-gold);
  text-decoration: none;
  border: 1px solid var(--bfp-gold);
  border-radius: 0;
  font-size: 0.875rem;
}

.bfp-pagination__link:hover {
  background-color: var(--bfp-gold);
  color: white;
}

.bfp-pagination__current-page {
  font-weight: 600;
  color: #374151;
}


/* =====================================================================
   REQUEST DETAIL
   ===================================================================== */

.bfp-roll-form__section .bfp-form-group {
	max-width: 400px;
	margin-bottom: 1em;
}

.bfp-roll-form__section label {
    color: var(--bfp-ink);
    display: block;
    font-weight: 400;
    margin-bottom: 5px;
}


/* =====================================================================
   REQUEST DETAIL
   ===================================================================== */

.bfp-request-detail__header {
  margin-bottom: 2rem;
}

.bfp-request-detail__title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
}

.bfp-request-detail__metadata {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
  background-color: #f9fafb;
  border-radius: 0.375rem;
}

.bfp-request-detail__meta-item {
  display: flex;
  flex-direction: column;
}

.bfp-request-detail__meta-label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.25rem;
}

.bfp-request-detail__meta-value {
  color: #6b7280;
}

.bfp-request-detail__items {
  margin-bottom: 2rem;
}

.bfp-request-detail__section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.bfp-request-detail__table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.bfp-request-detail__empty-message {
  color: #6b7280;
}

.bfp-request-detail__footer {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

/* =====================================================================
   STATUS BADGES
   ===================================================================== */

.bfp-cap-badge {
	border-radius: 0px!important;
}

.bfp-status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bfp-status-badge--pending {
  background-color: #fef3c7;
  color: #92400e;
}

.bfp-status-badge--submitted {
  background-color: #dbeafe;
  color: #1e40af;
}

.bfp-status-badge--executed {
  background-color: #dcfce7;
  color: #166534;
}

.bfp-status-badge--failed {
  background-color: #fee2e2;
  color: #991b1b;
}

/* =====================================================================
   ROLL FORM
   ===================================================================== */

.bfp-roll-form__actions {
    display: flex;
    column-gap: 1em;
    margin: 1em 0 0 0;
}



/* =====================================================================
   BUTTONS
   ===================================================================== */

.bfp-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #e5e7eb;
  color: var(--bfp-gold);
  text-decoration: none;
  border: none;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.bfp-btn:hover {
  background-color: #d1d5db;
}

.bfp-btn--primary {
  background-color: var(--bfp-gold);
  color: white;
}

.bfp-btn--primary:hover {
  background-color: var(--bfp-gold-dark);
}

.bfp-btn--primary:disabled {
  background-color: #ccc;
  border-color: #ccc;
  color: #fff;
  cursor: not-allowed;
}

.bfp-btn--secondary {
  background-color: var(--bfp-white);
  color: var(--bfp-gold);
  border: 1px solid var(--bfp-gold);
}

.bfp-btn--secondary:hover {
  background-color: var(--bfp-gold-soft);
}

.bfp-btn--small {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* =====================================================================
   LOGIN & ACCESS DENIED
   ===================================================================== */

.bfp-login-prompt,
.bfp-access-denied {
  padding: 2rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background-color: #f9fafb;
  text-align: center;
}

.bfp-login-prompt p,
.bfp-access-denied p {
  margin: 0.5rem 0;
}

/* =====================================================================
   POPIA GATE
   ===================================================================== */

.bfp-popia-gate {
  padding: 2rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background-color: #f9fafb;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

@media (max-width: 768px) {
  .bfp-dashboard__stats-grid {
    grid-template-columns: 1fr;
  }

  .bfp-request-detail__metadata {
    grid-template-columns: 1fr;
  }

  .bfp-table {
    font-size: 0.75rem;
  }

  .bfp-table__cell {
    padding: 0.5rem;
  }

  .bfp-table__header {
    padding: 0.5rem;
  }

  .bfp-table__cell--number {
    font-size: 0.75rem;
  }

  .bfp-pagination__link {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .bfp-dashboard__title {
    font-size: 1.5rem;
  }

  .bfp-request-detail__metadata {
    padding: 1rem;
  }

  .bfp-table {
    font-size: 0.7rem;
  }

  .bfp-table__cell {
    padding: 0.375rem;
  }

  .bfp-table__header {
    padding: 0.375rem;
  }
}

/* ================================================================
   Bastion FX Portal — Corporate theme (Bastion gold)
   Added in dashboard refinement pass.
   ================================================================ */

:root {
	--bfp-gold: #b29657;
	--bfp-gold-dark: #a1874f;
	--bfp-gold-soft: #f8f5ef;
	--bfp-ink: #282828;
	--bfp-muted: #5b6b7f;
	--bfp-border: #dbe3ed;
	--bfp-bg: #f5f5f5;
	--bfp-white: #ffffff;
	--bfp-radius: 10px;
	--bfp-shadow: 0 2px 8px rgba(16, 42, 77, .06);
	--bfp-shadow-hover: 0 6px 18px rgba(16, 42, 77, .12);
}




.bfp-portal h1, .bfp-portal h2, .bfp-portal h3, .bfp-portal h4, .bfp-portal h5, .bfp-portal h6 {
    font-family: "Outfit";
    text-transform: uppercase;
	margin: 1em 0;
}


.bfp-portal h1 { font-size: 1.7em; }

.bfp-portal h2 { font-size: 1.5em; }

.bfp-portal h3 {
    font-size: 1.3em;
    font-weight: 400;
}
.bfp-portal h4 { font-size: 1.2em; }

.bfp-portal h5 { font-size: 1.1em; }

.bfp-portal h6 { font-size: 1em; }



.bfp-portal {
	font-family: 'Outfit', Roboto, Helvetica, Arial, sans-serif;
	color: var(--bfp-ink);
}

.bfp-btn {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 0;
	font-weight: 500;
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid var(--bfp-gold);
	background: var(--bfp-white);
	color: var(--bfp-gold);
	cursor: pointer;
	transition: all .15s ease;
	line-height: 1;
}
.bfp-btn:hover { border-color: var(--bfp-gold); color: var(--bfp-gold);background: var(--bfp-gold-soft) }
.bfp-btn--primary { background: var(--bfp-gold); border-color: var(--bfp-gold); color: #fff; }
.bfp-btn--primary:hover { background: var(--bfp-gold-dark); border-color: var(--bfp-gold-dark); color: #fff; }
.bfp-btn--danger { background: #fff; border-color: #d93025; color: #d93025; }
.bfp-btn--danger:hover { background: #d93025; color: #fff; border-color: #d93025; }

/* -------- Login card -------- */
.bfp-login {
	min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    flex-direction: column;
}
.bfp-login__card {
    background: var(--bfp-white);
    border-radius: 14px;
    box-shadow: var(--bfp-shadow);
    border: 1px solid var(--bfp-border);
    padding: 40px 36px;
    max-width: 420px;
    width: 100%;
}

.bfp-login p {
    font-size: 16px;
}

.bfp-login__brand { text-align: center; margin-bottom: 24px; }
.bfp-login__title { color: var(--bfp-gold); margin: 0 0 6px; font-size: 26px; font-weight: 700; }
.bfp-login__subtitle { color: var(--bfp-muted); margin: 0; font-size: 14px; }
.bfp-login .login-username,
.bfp-login .login-password { margin-bottom: 14px; }
.bfp-login label { display: block; font-weight: 500; font-size: 14px; color: var(--bfp-ink); margin-bottom: 6px; }
.bfp-login input[type="text"],
.bfp-login input[type="password"],
.bfp-login input[type="email"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--bfp-border);
	border-radius: 0px;
	font-size: 14px;
	box-sizing: border-box;
}
.bfp-login input[type="text"]:focus,
.bfp-login input[type="password"]:focus,
.bfp-login input[type="email"]:focus {
	border-color: var(--bfp-gold);
	outline: 2px solid var(--bfp-gold-soft);
}
.bfp-login .button-primary,
.bfp-login .login-submit input {
	background: var(--bfp-gold) !important;
    border: 1px solid var(--bfp-gold) !important;
    color: #fff !important;
    padding: 10px 18px !important;
    border-radius: 0px !important;
    font-weight: 500 !important;
    width: 100%;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 14px;
    text-align: center;
}

.bfp-login input[type="text"], .bfp-login input[type="password"], .bfp-login input[type="email"] {
    line-height: 100%;
}

.bfp-login .button-primary:hover { background: var(--bfp-gold-dark) !important; }
.bfp-login__lost { text-align: center; margin-top: 16px; font-size: 14px; }
.bfp-login__lost a { color: var(--bfp-gold); text-decoration: none; font-size: 15px; }
.bfp-login__lost a:hover { text-decoration: underline; }
p.login-remember label {
    display: flex;
    align-items: center;
    column-gap: 9px;
}

/* -------- Dashboard hub -------- */
.bfp-dashboard--hub { max-width: 1650px; margin: 0 auto; padding: 20px 0px; }
.bfp-dashboard__hero {
	background: linear-gradient(135deg, var(--bfp-gold) 0%, var(--bfp-gold-dark) 100%);
	color: #fff;
	border-radius: 14px;
	padding: 32px 36px;
	margin-bottom: 20px;
	box-shadow: var(--bfp-shadow);
}
.bfp-dashboard__eyebrow { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; opacity: .85; }
.bfp-dashboard--hub .bfp-dashboard__title { margin: 0 0 4px; font-size: 28px; color: #fff; }
.bfp-dashboard__company { margin: 0; opacity: .9; font-size: 15px; }

.bfp-dashboard__stats-strip {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin-bottom: 20px;
}
.bfp-dashboard__stat-pill {
	background: var(--bfp-white);
	border: 1px solid var(--bfp-border);
	border-radius: var(--bfp-radius);
	padding: 18px 20px;
	box-shadow: var(--bfp-shadow);
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.bfp-dashboard__stat-pill-value { font-size: 28px; font-weight: 700; color: var(--bfp-gold); }
.bfp-dashboard__stat-pill-label { font-size: 14px; color: var(--bfp-muted); }

.bfp-dashboard__cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	margin-bottom: 28px;
}
.bfp-dashboard__card {
	display: block;
	background: var(--bfp-white);
	border: 1px solid var(--bfp-border);
	border-radius: var(--bfp-radius);
	padding: 22px 22px 20px;
	text-decoration: none;
	color: var(--bfp-ink);
	box-shadow: var(--bfp-shadow);
	transition: all .15s ease;
	border-top: 3px solid var(--bfp-gold);
}
.bfp-dashboard__card:hover {
	transform: translateY(-2px);
	box-shadow: var(--bfp-shadow-hover);
	border-top-color: var(--bfp-gold-dark);
}
.bfp-dashboard__card-title { margin: 0 0 8px; font-size: 17px; color: var(--bfp-ink); }
.bfp-dashboard__card-desc { margin: 0 0 14px; font-size: 14px; color: var(--bfp-muted); line-height: 1.5; }
.bfp-dashboard__card-cta { font-size: 14px; font-weight: 600; color: var(--bfp-gold); }

.bfp-dashboard__activity {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 20px;
}
.bfp-dashboard__activity-col > section {
	background: var(--bfp-white);
	border: 1px solid var(--bfp-border);
	border-radius: var(--bfp-radius);
	padding: 20px;
	box-shadow: var(--bfp-shadow);
	height: 100%;
}

/* -------- User management (frontend) -------- */

.bfp-portal.bfp-users {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: 3fr 1fr;
    column-gap: 2em;
}

.bfp-users__invite {
    order: 2;
}

.bfp-users__list {
    order: 1;
}

.bfp-users { max-width: 1650px; margin: 0 auto; padding: 0px; }
.bfp-users__header { margin-bottom: 20px; }
.bfp-users__title { margin: 0 0 4px; color: var(--bfp-gold); }
.bfp-users__subtitle {
    margin: 0;
    color: var(--bfp-ink);
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 1.5em;
}
.bfp-users__notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.bfp-users__notice--success { background: #e6f4ea; color: #1e7e34; border: 1px solid #b7e1c3; }
.bfp-users__notice--error { background: #fde7e9; color: #a31621; border: 1px solid #f5b5bb; }
.bfp-users__invite, .bfp-users__list {
	background: #fff; border: 1px solid var(--bfp-border);
	border-radius: var(--bfp-radius); padding: 22px; box-shadow: var(--bfp-shadow);
	margin-bottom: 20px;
}
.bfp-users__invite h2, .bfp-users__list h2 { margin: 0 0 14px; color: var(--bfp-ink); font-size: 17px; font-weight: 400;}
.bfp-users__form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: end;
    grid-auto-flow: row;
}
.bfp-users__form label {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    font-weight: 500;
    color: var(--bfp-ink);
    gap: 0px 4px;
}

.bfp-users__form button {
    margin-bottom: 5px;
    min-height: 41px;
    text-align: center;
}

.bfp-users__form input, .bfp-users__form select {
	padding: 8px 10px; border: 1px solid var(--bfp-border); border-radius: 0px; font-size: 14px; font-weight: 400; line-height: 1.7;
}
.bfp-users .bfp-table { width: 100%; border-collapse: collapse; }
.bfp-users .bfp-table th,
.bfp-users .bfp-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--bfp-border); font-size: 14px; }
.bfp-users .bfp-table th { background: var(--bfp-gold-soft); color: var(--bfp-gold); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.bfp-users .bfp-table button {
    padding: 5px 12px;
    font-size: 12px;
}

.bfp-users__caps {
    border-radius: 0px!important;
}

.bfp-users__cap-label:has(input[type="checkbox"]) {
    display: flex;
    flex-direction: row;
    gap: 0px 12px;
    justify-content: flex-start;
    align-items: center;
}

.bfp-popia-gate__checkbox-label:has(input[type="checkbox"]) {
    display: flex;
    flex-direction: row;
    gap: 0px 12px;
    justify-content: flex-start;
    align-items: center;
    margin: 20px 0;
	color: var(--bfp-ink);
}

/* -------- Responsive -------- */
@media (max-width: 768px) {
	.bfp-dashboard__stats-strip { grid-template-columns: 1fr; }
	.bfp-dashboard__activity { grid-template-columns: 1fr; }
	.bfp-users__form { grid-template-columns: 1fr; }
}
