/* Портал рекомендателей - поверх brand.css агентского портала */
.rek-header{background:#fff;border-bottom:1px solid #eee9de}
.rek-header__in{display:flex;align-items:center;gap:18px;padding:14px 15px;flex-wrap:wrap}
.rek-logo img{width:220px;height:auto}
.rek-header__title{font-size:18px;color:#492d2d;font-weight:600;flex:1;white-space:nowrap}
.rek-nav{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.rek-nav a{color:#492d2d!important;text-decoration:none;font-size:15px}
.rek-nav a.btn{color:#fff!important}
.rek-linkbtn{background:none;border:0;color:#7a6054;font-size:15px;padding:0;cursor:pointer;text-decoration:underline}
.rek-content{padding:28px 0 48px;min-height:60vh}
.rek-wide{max-width:1400px}
.rek-footer{background:#f7f4ef;color:#7a6054;font-size:13px;padding:22px 0}
.rek-footer a{color:#492d2d}
.rek-footer .container{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}
.rek h1{font-size:28px;color:#492d2d;margin:0 0 18px}
.rek h2{font-size:20px;color:#492d2d;margin:24px 0 12px}
.rek-card{background:#fff;border:1px solid #eee9de;border-radius:10px;padding:22px 24px;margin-bottom:18px}
.rek-card--soft{background:#f7f4ef;border-color:#f7f4ef}
.rek-alert{border-radius:8px}
.rek-muted{color:#7a6054;font-size:14px}
.rek-form label{font-weight:600;color:#492d2d;font-size:14px;margin-bottom:4px}
.rek-form .form-control{border-radius:6px;border-color:#dad6c9;height:44px}
.rek-form textarea.form-control{height:auto}
.rek-form .form-group{margin-bottom:16px}
.rek-form .hint{font-size:13px;color:#7a6054;margin-top:4px}
.rek-check{display:flex;gap:10px;align-items:flex-start;font-size:14px;color:#492d2d;margin-bottom:10px}
.rek-check span{flex:1 1 auto;display:block}
.rek-form .form-control:focus{border-color:#9b8174!important;outline:2px solid rgba(155,129,116,.35)!important;box-shadow:none!important}
.rek-form .form-control:invalid:not(:focus):not(.is-invalid){border-color:#dad6c9!important;box-shadow:none!important;outline:none!important}
.rek-pw{position:relative}.rek-pw__eye{position:absolute;right:8px;top:8px;background:none;border:0;font-size:18px;cursor:pointer;color:#7a6054}
.rek-won{background:#492d2d;color:#fff;border-radius:8px;padding:10px 14px;margin-top:12px;font-weight:600}
.sr-only{position:absolute;left:-9999px}
.nowrap{white-space:nowrap}
.rek-check input{margin-top:4px;flex:0 0 auto}
.btn-primary{background:#e44e2b!important;border-color:#e44e2b!important;border-radius:6px;padding:10px 22px}
.btn-outline{background:#fff;border:1px solid #9b8174;color:#492d2d;border-radius:6px;padding:9px 18px}
.rek-errors{background:#fdf1ee;border:1px solid #f2c7bd;border-radius:8px;padding:12px 16px;margin-bottom:16px;color:#a33a1f}
.rek-errors ul{margin:0;padding-left:18px}
.rek-table{width:100%;border-collapse:collapse;font-size:14px}
.rek-table th{text-align:left;color:#7a6054;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.03em;padding:10px 10px;border-bottom:1px solid #eee9de}
.rek-table td{padding:12px 10px;border-bottom:1px solid #f2efe7;vertical-align:top}
.rek-table tr:hover td{background:#fbf9f5}
.rek-table a{color:#492d2d}
.rek-status{display:inline-block;border-radius:12px;padding:2px 10px;font-size:12px;font-weight:600;white-space:nowrap}
.rek-status--checking,.rek-status--needs_review{background:#fff3d6;color:#8a5a00}
.rek-status--confirmed{background:#e4f3ea;color:#1e783a}
.rek-status--won{background:#492d2d;color:#fff}
.rek-status--rejected,.rek-status--lost,.rek-status--expired{background:#eee9de;color:#7a6054}
.rek-kpi{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin-bottom:20px}
.rek-kpi div{background:#fff;border:1px solid #eee9de;border-radius:10px;padding:14px 16px}
.rek-kpi b{display:block;font-size:26px;color:#492d2d}
.rek-kpi span{font-size:13px;color:#7a6054}
.rek-steps-wrap{margin:14px 0}
.lst-steps li{position:relative;padding:8px 0 8px 32px;color:#7a6054;font-size:15px}
.lst-steps li:before{content:'';position:absolute;left:9px;top:0;bottom:0;width:2px;background:#eee9de}
.lst-steps li:first-child:before{top:50%}.lst-steps li:last-child:before{bottom:50%}
.lst-steps__mark{position:absolute;left:3px;top:50%;width:14px;height:14px;margin-top:-7px;border-radius:50%;background:#fff;border:2px solid #dad6c9;z-index:1}
.lst-steps li.is-done .lst-steps__mark{background:#9b8174;border-color:#9b8174}
.lst-steps li.is-current .lst-steps__mark{background:#e44e2b;border-color:#e44e2b}
.lst-steps li.is-current{color:#492d2d;font-weight:600}
.lst-steps li.is-done{color:#492d2d}
.rek-hero{padding:30px 0 10px}
.rek-hero h1{font-size:34px}
.rek-hero p{font-size:17px;color:#492d2d;max-width:720px}
.rek-how{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin:18px 0 26px}
.rek-how div{background:#f7f4ef;border-radius:10px;padding:18px}
.rek-how b{display:block;font-size:30px;color:#e44e2b;margin-bottom:6px}
.rek-dl{display:grid;grid-template-columns:200px 1fr;gap:6px 14px;font-size:15px}
.rek-dl dt{color:#7a6054;font-weight:normal}
.rek-dl dd{margin:0;color:#492d2d}
.rek-log{font-size:13px;color:#492d2d}
.rek-log td{padding:6px 8px;border-bottom:1px solid #f2efe7}
.rek-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.rek-inline{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.rek-inline .form-control{width:auto;min-width:200px}
.rek-code{font-size:32px;letter-spacing:.3em;text-align:center;height:60px!important}
@media (max-width:767px){
  .rek-header__title{display:none}
  .rek-logo img{width:150px}
  .rek-header__in{justify-content:space-between;padding:10px 15px;gap:10px}
  .rek-nav{gap:10px;font-size:14px;flex:0 0 auto}
  .rek-nav .btn{padding:6px 10px;font-size:13px}
  .rek-content{padding:16px 0 32px}
  .rek h1{font-size:22px}
  .rek-card{padding:16px}
  .rek-dl{grid-template-columns:1fr}
  .rek-dl dt{margin-top:6px}
  .rek-table thead{display:none}
  .rek-table tr{display:block;border:1px solid #eee9de;border-radius:10px;margin-bottom:12px;padding:6px 4px}
  .rek-table td{display:block;border:0;padding:6px 10px}
  .rek-table td[data-l]:before{content:attr(data-l);display:block;font-size:11px;color:#7a6054;text-transform:uppercase}
  .rek-table td.is-empty{display:none}
  .rek-hero h1{font-size:26px}
}

/* админка: на мобильном таблицы остаются таблицами со скроллом */
.rek-admin .rek-card{overflow-x:auto}
.rek-status--draft,.rek-status--condition_met,.rek-status--requisites_received{background:#fff3d6;color:#8a5a00}
.rek-status--contract_generated,.rek-status--contract_signed,.rek-status--approved{background:#e4f3ea;color:#1e783a}
.rek-status--to_accounting{background:#dfe9f7;color:#1f4e8c}
.rek-status--paid{background:#492d2d;color:#fff}
.rek-status--declined{background:#eee9de;color:#7a6054}
.btn-danger-outline{background:#fff;border:1px solid #d03a17;color:#d03a17;border-radius:6px;padding:9px 18px}
.rek-pager{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0;list-style:none;padding:0}
.rek-pager li a,.rek-pager li span{display:inline-block;padding:6px 10px;border:1px solid #eee9de;border-radius:6px;color:#492d2d;text-decoration:none}
.rek-pager li.active a{background:#492d2d;color:#fff;border-color:#492d2d}
@media (max-width:767px){
  .rek-admin .rek-table thead{display:table-header-group}
  .rek-admin .rek-table tr{display:table-row;border:0;margin:0;padding:0}
  .rek-admin .rek-table td{display:table-cell;border-bottom:1px solid #f2efe7;padding:8px 6px;white-space:nowrap}
  .rek-admin .rek-table td[data-l]:before{display:none}
  .rek-admin .rek-nav{gap:8px;font-size:13px}
}
