/* ============================================
   Charismo Partner App — Design System
   Based on charismo.ru brand guidelines
   ============================================ */

/* --- CSS Variables --- */
:root {
  --brand-blue: #0170b9;
  --btn-blue: #006eb6;
  --btn-hover: #277cb5;
  --accent-blue: #187bf1;
  --link-blue: #0028dd;

  --text-dark: #161717;
  --text-primary: #333333;
  --text-secondary: #3a3a3a;
  --text-muted: #888888;
  --text-white: #ffffff;

  --border: #e5e5e5;
  --bg-light: #f4f4f4;
  --bg-section: #f5f5f5;
  --bg-input: #fafafa;
  --bg-container: #f9f9f9;
  --bg-white: #ffffff;

  --success: #27ae60;
  --warning: #f39c12;
  --danger: #e74c3c;

  --radius-btn: 84px;
  --radius-card: 16px;
  --radius-input: 10px;
  --radius-sm: 8px;

  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-btn: 0 4px 12px rgba(1, 112, 185, 0.3);
  --shadow-modal: 0 -4px 20px rgba(0, 0, 0, 0.1);

  --font-main: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-btn: 'PT Sans', var(--font-main);

  --header-height: 56px;
  --nav-height: 64px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--bg-light);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
}

a:hover {
  color: var(--btn-hover);
}

img {
  max-width: 100%;
  height: auto;
}

/* --- App Shell --- */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-white);
  position: relative;
  overflow-x: hidden;
}

/* --- Header --- */
.header {
  height: var(--header-height);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-blue);
  font-size: 20px;
  cursor: pointer;
  border: none;
  background: none;
  border-radius: 50%;
  transition: background 0.2s;
  flex-shrink: 0;
}

.header__back:hover {
  background: var(--bg-light);
}

.header__title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header__logo {
  height: 28px;
}

.header__action {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* --- Screen Container --- */
.screen {
  display: none;
  min-height: calc(100vh - var(--header-height));
  padding-bottom: 80px;
}

.screen:target,
.screen.active {
  display: block;
}

/* Show welcome screen by default */
.screen--welcome {
  display: block;
}

.screen:target ~ .screen--welcome {
  display: none;
}

/* --- Welcome / Auth Screen --- */
.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  min-height: calc(100vh - var(--header-height));
  text-align: center;
}

.welcome__logo {
  width: 180px;
  margin-bottom: 12px;
}

.welcome__brand {
  font-size: 32px;
  font-weight: 700;
  color: var(--brand-blue);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.welcome__subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.welcome__text {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
  max-width: 340px;
}

/* --- Buttons --- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-btn);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.3;
}

.btn--primary {
  background: var(--btn-blue);
  color: var(--text-white);
  box-shadow: var(--shadow-btn);
}

.btn--primary:hover {
  background: var(--btn-hover);
  color: var(--text-white);
  transform: translateY(-1px);
}

.btn--secondary {
  background: var(--bg-white);
  color: var(--btn-blue);
  border: 2px solid var(--btn-blue);
}

.btn--secondary:hover {
  background: var(--bg-light);
  color: var(--btn-blue);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 14px;
}

.btn--ghost:hover {
  color: var(--text-primary);
}

.btn--success {
  background: var(--success);
  color: var(--text-white);
}

.btn--danger {
  background: transparent;
  color: var(--danger);
  border: 2px solid var(--danger);
}

.btn--sm {
  padding: 10px 20px;
  font-size: 14px;
  white-space: nowrap;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 340px;
}

.btn-group--row {
  flex-direction: row;
}

.btn__icon {
  font-size: 20px;
  flex-shrink: 0;
}

/* --- Form Elements --- */
.form-group {
  margin-bottom: 20px;
  width: 100%;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-input);
  font-family: var(--font-main);
  font-size: 16px;
  color: var(--text-primary);
  background: var(--bg-input);
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--brand-blue);
  background: var(--bg-white);
}

.form-input::placeholder {
  color: #bbb;
}

.form-input--phone {
  font-size: 20px;
  letter-spacing: 1px;
  text-align: center;
  font-weight: 600;
}

.form-input--code {
  font-size: 28px;
  letter-spacing: 12px;
  text-align: center;
  font-weight: 700;
  max-width: 200px;
  margin: 0 auto;
  display: block;
}

.form-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

.form-error {
  font-size: 13px;
  color: var(--danger);
  margin-top: 8px;
}

/* --- Phone Input Screen --- */
.phone-screen {
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-screen__icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.phone-screen__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.phone-screen__desc {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
  max-width: 300px;
}

/* --- Code Verification Screen --- */
.code-screen {
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.code-screen__icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.code-screen__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.code-screen__desc {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
  max-width: 300px;
}

.code-screen__resend {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.code-screen__resend a {
  color: var(--brand-blue);
  font-weight: 600;
}

/* --- Demo Banner --- */
.demo-banner {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border: 1px solid #f0d060;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #856404;
}

.demo-banner__icon {
  font-size: 18px;
  flex-shrink: 0;
}

/* --- Main Menu --- */
.menu {
  padding: 16px;
}

.menu__greeting {
  padding: 20px;
  text-align: center;
}

.menu__greeting-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.menu__greeting-sub {
  font-size: 14px;
  color: var(--text-muted);
}

.menu__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 4px;
}

.menu__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
  cursor: pointer;
  text-align: center;
}

.menu__item:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
  color: var(--text-primary);
}

.menu__item--wide {
  grid-column: 1 / -1;
}

.menu__item-icon {
  font-size: 28px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f4fd, #d1ecf9);
  border-radius: 14px;
}

.menu__item-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

/* --- Balance Card --- */
.balance {
  padding: 16px;
}

.balance__card {
  background: linear-gradient(135deg, var(--btn-blue), var(--accent-blue));
  border-radius: var(--radius-card);
  padding: 24px;
  color: var(--text-white);
  margin-bottom: 16px;
}

.balance__label {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.balance__amount {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 4px;
}

.balance__currency {
  font-size: 18px;
  font-weight: 400;
  opacity: 0.8;
}

.balance__row {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.balance__col {
  text-align: center;
}

.balance__col-value {
  font-size: 18px;
  font-weight: 700;
}

.balance__col-label {
  font-size: 11px;
  opacity: 0.7;
}

/* --- Stats Section --- */
.stats {
  padding: 0 16px;
}

.stats__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.stats__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.stats__item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.stats__item-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
}

.stats__item-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.stats__item--accent .stats__item-value {
  color: var(--brand-blue);
}

/* --- Withdrawal Active Request --- */
.withdrawal-active {
  background: #e8f8f0;
  border: 1px solid #b8e6cc;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 0 16px 16px;
}

.withdrawal-active__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
  margin-bottom: 6px;
}

.withdrawal-active__row {
  font-size: 14px;
  color: var(--text-primary);
}

/* --- Promo Code List --- */
.promo-list {
  padding: 16px;
}

.promo-list__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.promo-list__subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.promo-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text-primary);
}

.promo-card:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-card);
  color: var(--text-primary);
}

.promo-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f4fd, #d1ecf9);
  border-radius: 12px;
  font-size: 22px;
  flex-shrink: 0;
}

.promo-card__info {
  flex: 1;
  min-width: 0;
}

.promo-card__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.promo-card__meta {
  font-size: 13px;
  color: var(--text-muted);
}

.promo-card__arrow {
  color: var(--text-muted);
  font-size: 18px;
  flex-shrink: 0;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
}

.pagination__btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-white);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination__btn:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.pagination__btn--active {
  background: var(--btn-blue);
  border-color: var(--btn-blue);
  color: var(--text-white);
}

/* --- Coupon Detail --- */
.coupon-detail {
  padding: 16px;
}

.coupon-detail__header {
  text-align: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, var(--btn-blue), var(--accent-blue));
  border-radius: var(--radius-card);
  color: var(--text-white);
  margin-bottom: 20px;
}

.coupon-detail__code {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.coupon-detail__type {
  font-size: 13px;
  opacity: 0.8;
}

.coupon-detail__stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.coupon-detail__stat {
  text-align: center;
  padding: 14px 8px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.coupon-detail__stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-blue);
}

.coupon-detail__stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.coupon-detail__section {
  margin-bottom: 20px;
}

.coupon-detail__section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* --- QR Code --- */
.qr-block {
  text-align: center;
  padding: 20px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  margin-bottom: 16px;
}

.qr-block__image {
  width: 180px;
  height: 180px;
  background: var(--bg-light);
  border-radius: 12px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  border: 2px dashed var(--border);
}

.qr-block__label {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Link Share --- */
.link-share {
  background: var(--bg-container);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.link-share__url {
  flex: 1;
  font-size: 13px;
  color: var(--brand-blue);
  word-break: break-all;
  line-height: 1.4;
}

.link-share__copy {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-blue);
  color: var(--text-white);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
  transition: background 0.2s;
}

.link-share__copy:hover {
  background: var(--btn-hover);
}

/* --- Withdrawal Flow --- */
.withdrawal {
  padding: 16px;
}

.withdrawal__card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 16px;
}

.withdrawal__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-light);
}

.withdrawal__row:last-child {
  border-bottom: none;
}

.withdrawal__row-label {
  font-size: 14px;
  color: var(--text-muted);
}

.withdrawal__row-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.withdrawal__confirm-box {
  background: #e8f8f0;
  border: 1px solid #b8e6cc;
  border-radius: var(--radius-card);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}

.withdrawal__confirm-amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 4px;
}

.withdrawal__confirm-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Product Info --- */
.product-info {
  padding: 16px;
}

.product-info__image {
  width: 100%;
  height: auto;
  background: linear-gradient(135deg, #e8f4fd, #d1ecf9);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin-bottom: 16px;
}

.product-info__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.product-info__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.product-info__features {
  list-style: none;
  margin-bottom: 20px;
}

.product-info__feature {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.product-info__feature::before {
  content: "■";
  color: var(--brand-blue);
  flex-shrink: 0;
}

/* --- Courses --- */
.courses {
  padding: 16px;
}

.course-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 12px;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  display: block;
}

.course-card:hover {
  box-shadow: var(--shadow-card);
  border-color: var(--brand-blue);
  color: var(--text-primary);
}

.course-card__thumb {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: 40px;
  position: relative;
}

.course-card__play {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  backdrop-filter: blur(4px);
}

.course-card__body {
  padding: 14px 16px;
}

.course-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.course-card__meta {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Partner Type Selection --- */
.partner-type {
  padding: 16px;
}

.partner-type__title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
}

.partner-type__grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.partner-type__card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 16px;
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: all 0.2s;
}

.partner-type__card:hover,
.partner-type__card--selected {
  border-color: var(--brand-blue);
  background: #f0f7fd;
}

.partner-type__card-icon {
  font-size: 28px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border-radius: 12px;
  flex-shrink: 0;
}

.partner-type__card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

.partner-type__card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Message to Manager --- */
.message-form {
  padding: 16px;
}

.message-form__textarea {
  width: 100%;
  min-height: 150px;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-input);
  font-family: var(--font-main);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-input);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

.message-form__textarea:focus {
  border-color: var(--brand-blue);
  background: var(--bg-white);
}

.message-form__textarea::placeholder {
  color: #bbb;
}

.message-form__counter {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 20px;
}

/* --- Referral Section --- */
.referral {
  padding: 16px;
}

.referral__header {
  text-align: center;
  padding: 20px;
  margin-bottom: 16px;
}

.referral__id {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* --- Success Screen --- */
.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.success-screen__icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.success-screen__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.success-screen__desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 280px;
}

/* --- Bottom Action Bar --- */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-modal);
  z-index: 90;
}

.bottom-bar .btn {
  margin-bottom: 0;
}

/* --- Info Box --- */
.info-box {
  background: #e8f4fd;
  border: 1px solid #b3d9f2;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 16px;
  font-size: 14px;
  color: #1a6b9c;
  line-height: 1.5;
}

.info-box--warning {
  background: #fff8e1;
  border-color: #ffe082;
  color: #8d6e00;
}

/* --- Divider --- */
.divider {
  height: 8px;
  background: var(--bg-light);
  margin: 0;
  border: none;
}

/* --- Separator Text --- */
.separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Loading Indicator --- */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

.loader__spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--brand-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Agreement Link --- */
.agreement-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin: 0 16px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--brand-blue);
  text-decoration: none;
  transition: all 0.2s;
}

.agreement-link:hover {
  border-color: var(--brand-blue);
  background: #f0f7fd;
}

/* --- Status Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge--success {
  background: #e8f8f0;
  color: var(--success);
}

.badge--warning {
  background: #fff8e1;
  color: #e67e00;
}

.badge--info {
  background: #e8f4fd;
  color: var(--brand-blue);
}

/* --- Partner Status --- */
.partner-status {
  padding: 0 16px 16px;
}

.partner-status__card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
}

.partner-status__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.partner-status__progress {
  height: 8px;
  background: var(--bg-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.partner-status__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-blue), var(--accent-blue));
  border-radius: 4px;
  width: 65%;
}

.partner-status__progress-text {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* --- Responsive Desktop Preview --- */
@media (min-width: 520px) {
  body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
  }

  .app {
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border);
    min-height: 90vh;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0;
  }

  .header {
    border-radius: 24px 24px 0 0;
  }

  .bottom-bar {
    border-radius: 0 0 24px 24px;
    position: sticky;
  }
}
