/* LORD_CLIENT_BASE_V2 */

html.lord-clients-active main.main > header.topbar,
html.lord-clients-active main.main > #lordTodayStats,
html.lord-clients-active main.main > .status-strip,
html.lord-clients-active main.main > .toolbar,
html.lord-clients-active main.main > .workspace{
  display:none!important;
}

.lord-clients-view{
  position:relative;
  min-height:calc(100vh - 24px);
  padding:24px 28px 30px;
  overflow:hidden;
  background:
    linear-gradient(rgba(248,241,233,.94), rgba(247,239,230,.96)),
    radial-gradient(circle at 12% 8%, rgba(143,48,41,.16), transparent 24%),
    radial-gradient(circle at 88% 5%, rgba(181,130,69,.18), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(108,42,35,.08), transparent 38%),
    #f6eee4;
}

.lord-clients-view[hidden]{
  display:none!important;
}

.lord-clients-view::before,
.lord-clients-view::after{
  content:"";
  position:absolute;
  pointer-events:none;
  opacity:.28;
}

.lord-clients-view::before{
  inset:0 auto auto 0;
  width:320px;
  height:320px;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(120,58,44,.15) 0 8px,
      transparent 8px 24px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(177,128,62,.12) 0 8px,
      transparent 8px 24px
    );
  clip-path:polygon(0 0,100% 0,0 100%);
}

.lord-clients-view::after{
  right:-30px;
  bottom:-30px;
  width:300px;
  height:300px;
  border-radius:50%;
  background:
    radial-gradient(circle, rgba(143,48,41,.16) 0 18%, transparent 18% 28%, rgba(181,130,69,.14) 28% 38%, transparent 38% 100%);
  filter:blur(1px);
}

.lord-clients-shell{
  position:relative;
  z-index:1;
}

.lord-clients-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}

.lord-clients-eyebrow{
  margin-bottom:6px;
  color:#9b5a26;
  font-size:11px;
  font-weight:900;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.lord-clients-head h1{
  margin:0 0 4px;
  color:#5a2d2a;
  font-size:34px;
  line-height:1.05;
  font-weight:900;
}

.lord-clients-head p{
  margin:0;
  color:#7d6c5f;
  font-size:13px;
  font-weight:600;
}

.lord-clients-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.lord-clients-refresh{
  min-height:44px;
  padding:0 16px;
  border:1px solid #d8c0ac;
  border-radius:12px;
  background:linear-gradient(180deg,#fff,#f7efe7);
  color:#6d3b2d;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 6px 20px rgba(78,37,27,.08);
}

.lord-clients-refresh:hover{
  transform:translateY(-1px);
}

.lord-clients-refresh:disabled{
  opacity:.6;
  cursor:default;
  transform:none;
}

.lord-clients-stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}

.lord-clients-stats > div{
  padding:15px 16px;
  border:1px solid #ead7c6;
  border-radius:16px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.94),rgba(250,244,238,.97));
  box-shadow:0 10px 25px rgba(83,43,28,.06);
}

.lord-clients-stats span{
  display:block;
  margin-bottom:6px;
  color:#8d7a6a;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.lord-clients-stats strong{
  color:#472a21;
  font-size:24px;
  font-weight:900;
}

.lord-clients-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.lord-clients-search{
  width:min(460px,100%);
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 14px;
  background:#fffdfa;
  border:1px solid #e2d0c0;
  border-radius:14px;
  box-shadow:0 6px 20px rgba(83,43,28,.04);
}

.lord-clients-search span{
  color:#9a7b67;
  font-size:18px;
  font-weight:900;
}

.lord-clients-search input{
  width:100%;
  height:46px;
  border:0;
  outline:0;
  background:transparent;
  font:inherit;
}

.lord-clients-count{
  color:#7b685b;
  font-size:12px;
  font-weight:800;
}

.lord-clients-workspace{
  display:grid;
  grid-template-columns:minmax(320px,37%) minmax(460px,1fr);
  gap:14px;
  align-items:start;
}

.lord-clients-list,
.lord-client-detail{
  border:1px solid #e5d2c2;
  border-radius:18px;
  background:rgba(255,252,249,.94);
  box-shadow:0 12px 28px rgba(83,43,28,.06);
  backdrop-filter:blur(4px);
}

.lord-clients-list{
  padding:8px;
  max-height:calc(100vh - 280px);
  overflow:auto;
}

.lord-client-card{
  width:100%;
  display:block;
  text-align:left;
  margin:0 0 8px;
  padding:14px;
  border:1px solid transparent;
  border-radius:14px;
  background:
    linear-gradient(180deg,#fff,#fbf7f2);
  cursor:pointer;
  transition:.15s ease;
}

.lord-client-card:hover{
  transform:translateY(-1px);
  border-color:#ead6c3;
  background:linear-gradient(180deg,#fff,#f7f0e7);
}

.lord-client-card.active{
  border-color:#cfa77d;
  box-shadow:inset 4px 0 0 #8c3b2f;
  background:
    linear-gradient(180deg,#fff7f1,#f4e8db);
}

.lord-client-card-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.lord-client-card-top strong{
  color:#432821;
  font-size:15px;
  font-weight:900;
}

.lord-client-card-top > span{
  min-width:28px;
  height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 8px;
  border-radius:9px;
  background:#f0dfd0;
  color:#7a3f2d;
  font-size:12px;
  font-weight:900;
}

.lord-client-phone{
  margin-top:5px;
  color:#6d6055;
  font-size:13px;
  font-weight:700;
}

.lord-client-card-meta{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:8px;
  color:#8b7e73;
  font-size:11px;
}

.lord-client-card-meta span:first-child{
  color:#4b372c;
  font-weight:900;
}

.lord-client-sources{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:9px;
}

.lord-client-source{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:3px 8px;
  border-radius:999px;
  background:#f3ebe3;
  color:#765e4e;
  font-size:10px;
  font-weight:900;
}

.lord-client-detail{
  padding:20px;
  min-height:420px;
  max-height:calc(100vh - 280px);
  overflow:auto;
}

.lord-client-profile{
  display:flex;
  align-items:center;
  gap:14px;
  padding-bottom:16px;
  border-bottom:1px solid #eee1d5;
}

.lord-client-avatar{
  width:58px;
  height:58px;
  flex:0 0 58px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  background:
    linear-gradient(145deg,#7f302c,#ba8252);
  color:#fff;
  font-size:24px;
  font-weight:900;
  box-shadow:0 10px 24px rgba(108,42,35,.2);
}

.lord-client-profile h2{
  margin:0 0 4px;
  color:#4d2a25;
  font-size:24px;
  font-weight:900;
}

.lord-client-profile-phone{
  color:#6c5e53;
  font-size:14px;
  font-weight:700;
}

.lord-client-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:16px 0 20px;
}

.lord-client-kpis > div{
  padding:12px;
  border:1px solid #eadacc;
  border-radius:13px;
  background:#fcf8f4;
}

.lord-client-kpis span{
  display:block;
  margin-bottom:5px;
  color:#8b7f73;
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.lord-client-kpis strong{
  color:#40281f;
  font-size:15px;
  font-weight:900;
}

.lord-client-history-title{
  margin-bottom:10px;
  color:#4c372f;
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.lord-client-history{
  display:grid;
  gap:8px;
}

.lord-client-order{
  padding:12px 13px;
  border:1px solid #eadacc;
  border-radius:13px;
  background:#fffdfa;
}

.lord-client-order-main,
.lord-client-order-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}

.lord-client-order-main{
  margin-bottom:7px;
}

.lord-client-order-main strong{
  color:#4b2e24;
}

.lord-client-order-main span{
  color:#908175;
  font-size:11px;
}

.lord-client-order-row{
  margin-top:5px;
  color:#6d5f54;
  font-size:12px;
}

.lord-client-order-row strong{
  color:#5a3428;
}

.lord-client-order-row small{
  max-width:58%;
  text-align:right;
  color:#938478;
}

.lord-client-empty,
.lord-clients-empty-list,
.lord-clients-error{
  padding:46px 18px;
  text-align:center;
  color:#8d7d72;
}

.lord-client-empty > div{
  font-size:34px;
  margin-bottom:6px;
}

.lord-client-empty h2{
  margin:6px 0 5px;
  color:#5a4037;
}

@media(max-width:980px){
  .lord-clients-stats{
    grid-template-columns:repeat(2,1fr);
  }
  .lord-clients-workspace{
    grid-template-columns:1fr;
  }
  .lord-clients-list{
    max-height:360px;
  }
  .lord-client-detail{
    max-height:none;
  }
}

@media(max-width:640px){
  .lord-clients-view{
    padding:16px 14px 24px;
  }
  .lord-clients-head{
    flex-direction:column;
  }
  .lord-clients-head h1{
    font-size:28px;
  }
  .lord-clients-stats{
    grid-template-columns:1fr 1fr;
  }
  .lord-client-kpis{
    grid-template-columns:1fr 1fr;
  }
  .lord-clients-toolbar{
    display:block;
  }
  .lord-clients-count{
    margin-top:8px;
  }
}
