/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.auth-page {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background: #f5f7fb;
  color: #172033;
  font-family: system-ui, sans-serif;
}

.auth-card {
  box-sizing: border-box;
  width: min(100%, 28rem);
  padding: 2rem;
  border: 1px solid #e1e6ef;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1rem 2.5rem rgb(23 32 51 / 8%);
}

.auth-card h1 { margin: 0; font-size: 1.75rem; }
.auth-intro { margin: .5rem 0 1.5rem; color: #596579; }
.auth-form { display: grid; gap: 1rem; }
.auth-field { display: grid; gap: .4rem; }
.auth-field label { font-weight: 600; }
.auth-field small { color: #596579; }
.auth-field input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.75rem;
  padding: .6rem .75rem;
  border: 1px solid #c8d0dd;
  border-radius: .5rem;
  font: inherit;
}
.auth-field input:focus { outline: 3px solid #c9d9ff; border-color: #4169d8; }
.auth-submit {
  min-height: 2.9rem;
  margin-top: .35rem;
  border: 0;
  border-radius: .5rem;
  background: #315bd6;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.auth-submit:hover { background: #244bbd; }
.auth-errors {
  margin-bottom: 1.25rem;
  padding: .75rem 1rem;
  border: 1px solid #efb7b7;
  border-radius: .5rem;
  background: #fff3f3;
  color: #8a2020;
}
.auth-errors p { margin: 0 0 .4rem; font-weight: 700; }
.auth-errors ul { margin: 0; padding-left: 1.25rem; }
.auth-footer { margin: 1.25rem 0 0; color: #596579; text-align: center; }
.auth-checkbox {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: #596579;
}
.auth-checkbox input { width: 1rem; height: 1rem; }

.dashboard-page { min-height: 100vh; box-sizing: border-box; padding: 2.5rem clamp(1rem, 5vw, 5rem); background: #f5f7fa; color: #243442; font-family: system-ui, sans-serif; }
.dashboard-header, .funnel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.dashboard-header { max-width: 1430px; margin: 0 auto 2rem; }
.dashboard-header h1 { margin: 0; font-size: 1.8rem; }
.eyebrow { margin: 0 0 .35rem; color: #485e6d; font-size: .72rem; font-weight: 800; letter-spacing: .13em; }
.logout-button { border: 0; background: transparent; color: #4e6575; cursor: pointer; font: inherit; }
.dashboard-filters { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)) auto; align-items: end; gap: .8rem; max-width: 1430px; margin: 0 auto 1.2rem; }
.filter-field { display: grid; gap: .35rem; min-width: 0; }
.filter-field label { color: #52616e; font-size: .8rem; font-weight: 650; }
#overview-panel .filter-field label, #formats-panel .filter-field label { color: #405766; font-weight: 750; }
.filter-field input, .filter-field select { box-sizing: border-box; width: 100%; height: 2.6rem; border: 1px solid #cad3da; border-radius: .5rem; background: #fff; color: #263846; padding: 0 .65rem; font: inherit; }
.filter-submit { height: 2.6rem; border: 0; border-radius: .5rem; background: #176486; color: #fff; padding: 0 1rem; font: inherit; font-weight: 650; cursor: pointer; }
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .7rem; max-width: 1430px; margin: 0 auto 2rem; }
.kpi-card, .ctr-card { display: grid; justify-items: center; gap: .2rem; border: 1px solid #d9e0e5; border-radius: .65rem; background: #fff; padding: .8rem .5rem; }
.kpi-card strong, .ctr-card strong { color: #263846; font-size: 1rem; font-weight: 700; }
.kpi-card span, .ctr-card span { color: #526473; font-size: .74rem; font-weight: 600; }
.funnel-panel { max-width: 1235px; margin: 0 auto; padding: 1.5rem 1.7rem 2rem; border: 1px solid #e0e6eb; border-radius: .9rem; background: #fff; box-shadow: 0 10px 35px rgb(30 52 68 / 5%); }
.funnel-heading { margin-bottom: 1.4rem; }
.funnel-heading h2 { margin: 0; color: #334653; font-size: 1.25rem; }
.ctr-card { min-width: 7rem; padding: .65rem 1rem; }
.funnel-chart { display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: stretch; gap: .8rem; }
.funnel-labels { display: grid; grid-template-rows: repeat(3, 1fr); align-items: center; justify-items: end; color: #3f5361; font-size: 1rem; font-weight: 600; }
.chart-wrap { height: 180px; min-width: 0; }
.dashboard-alert { max-width: 1430px; margin: 0 auto 1rem; padding: .8rem 1rem; border: 1px solid #e8c3bc; border-radius: .5rem; background: #fff2ef; color: #833a2f; }
@media (max-width: 800px) { .dashboard-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filter-submit { grid-column: 1 / -1; } .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi-card:last-child { grid-column: 1 / -1; } }
@media (max-width: 460px) { .dashboard-page { padding: 1.5rem .8rem; } .dashboard-filters { grid-template-columns: 1fr; } .filter-submit { grid-column: auto; } .funnel-panel { padding: 1rem .8rem; } .funnel-chart { grid-template-columns: 72px minmax(0, 1fr); } .funnel-labels { font-size: .85rem; } }


.dashboard-actions { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; max-width: 1430px; margin: 0 auto .75rem; }
.registration-link { color: #176486; font-size: .9rem; font-weight: 600; text-decoration: none; }
.registration-link:hover { text-decoration: underline; }


.marketplace-panel { max-width: 1235px; margin: 1rem auto 0; padding: 1.25rem 1.7rem 1rem; border: 1px solid #e0e6eb; border-radius: .9rem; background: #fff; box-shadow: 0 10px 35px rgb(30 52 68 / 5%); }
.marketplace-panel h2 { margin: 0 0 .5rem; color: #354c5b; font-size: 1.15rem; font-weight: 700; text-align: center; }
.marketplace-chart-wrap { height: 185px; position: relative; }
@media (max-width: 460px) { .marketplace-panel { padding: 1rem .8rem .8rem; } .marketplace-chart-wrap { height: 210px; } }


.dashboard-tabbar { display: flex; align-items: flex-end; gap: 1rem; max-width: 1430px; margin: 0 auto; }
.dashboard-tabs { display: flex; flex: 1 1 auto; align-items: flex-end; gap: .25rem; min-width: 0; padding: 0 .6rem; border-bottom: 1px solid #d5dde3; }
.dashboard-tab { position: relative; margin-bottom: -1px; padding: .7rem 1.1rem .65rem; border: 1px solid transparent; border-bottom-color: #d5dde3; border-radius: .55rem .55rem 0 0; background: transparent; color: #65737e; font: inherit; font-size: .9rem; cursor: default; }
.dashboard-tab.is-active { border-color: #d5dde3; border-bottom-color: #f5f7fa; background: #f5f7fa; color: #244453; font-weight: 700; }
.dashboard-tab-panel { max-width: 1430px; margin: 0 auto; }
.dashboard-client-form { flex: 0 0 auto; margin: 0 0 .25rem; }
.dashboard-client-field { min-width: 10rem; margin-bottom: .45rem; }
.dashboard-client-field select { max-width: 14rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 800px) { .dashboard-tabbar { flex-wrap: wrap; } .dashboard-tabs { order: 2; flex-basis: 100%; } .dashboard-client-form { order: 1; margin-left: auto; } }


.format-matrix-panel { position: relative; max-width: 1235px; margin: 1rem auto 0; padding: 1.2rem 1.5rem 1rem; border: 1px solid #d9d9d9; background: #fff; }
.format-matrix-panel h2 { margin: 0 0 .4rem; color: #354c5b; font-size: 1.25rem; font-weight: 700; text-align: center; }
.format-chart-wrap { position: relative; height: min(58vh, 430px); min-height: 330px; }
.format-matrix-note { margin: .35rem 0; color: #4b5e6b; text-align: center; font-size: .92rem; font-weight: 500; }
.matrix-filters { margin-top: 1rem; }
.dashboard-tab-panel[hidden] { display: none !important; }
@media (max-width: 700px) { .format-matrix-panel { padding: 1rem .6rem .7rem; } .format-chart-wrap { height: 340px; min-height: 300px; } }


.management-table-panel { margin: 1rem auto 0; max-width: 1430px; border: 1px solid #d5dde3; background: #fff; }
.management-table-scroll { overflow-x: auto; }
.management-table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; color: #273642; font-size: .88rem; }
.management-table th { padding: .8rem .55rem; border: 1px solid #fff; background: #176486; color: #fff; text-align: center; font-weight: 700; }
.management-table th:first-child { width: 8%; }
.management-table th:nth-child(2) { width: 23%; }
.management-table th:not(:first-child):not(:nth-child(2)) { width: 11.5%; }
.management-table td { overflow-wrap: anywhere; padding: .75rem .55rem; border: 1px solid #fff; background: #eef1f3; text-align: right; }
.management-table td:nth-child(n + 3) { white-space: nowrap; overflow-wrap: normal; }
.management-table tbody tr:nth-child(even) td { background: #e4e8eb; }
.management-table td:first-child, .management-table td:nth-child(2) { text-align: left; }
.management-empty { padding: 2rem !important; color: #66747f; text-align: center !important; }
@media (max-width: 700px) { .management-table-panel { margin-top: .75rem; } .management-table { font-size: .78rem; } }

