*{box-sizing:border-box}
body{margin:0;font-family:Inter,system-ui,sans-serif;background:#f5f7fb;color:#0f172a}
a{text-decoration:none;color:inherit}

/* HEADER */
.header{background:#fff;border-bottom:1px solid #e5e7eb;position:relative;z-index:10}
.header-inner{
  max-width:1200px;margin:0 auto;padding:16px;
  display:flex;align-items:center;justify-content:space-between
}
.brand{display:flex;gap:12px;align-items:center}
.brand-logo{
  width:40px;height:40px;border-radius:12px;
  background:linear-gradient(135deg,#7b61ff,#5b4fcf);color:#fff;font-weight:700;
  display:flex;align-items:center;justify-content:center;font-size:14px
}
.brand-title{font-weight:600;font-size:16px}
.brand-sub{font-size:12px;color:#64748b}

.nav{display:flex;gap:20px;align-items:center}
.nav a{margin-right:20px;color:#64748b;font-weight:500}
.nav a.active{color:#4f46e5;border-bottom:2px solid #4f46e5;padding-bottom:4px}

.right{display:flex;gap:12px;align-items:center}
.pill{padding:8px 12px;border-radius:999px;border:1px solid #e5e7eb;background:#fff;font-weight:500}
.avatar{background:#eef2ff;border:none}
.stat-pill{
  padding:8px 16px;border-radius:999px;
  background:#eef2ff;color:#4f46e5;font-weight:600;font-size:14px
}

/* BURGER */
.burger{display:none;flex-direction:column;gap:4px;cursor:pointer}
.burger span{width:22px;height:2px;background:#0f172a}

/* DRAWER */
.drawer{
  position:fixed;top:0;right:-100%;
  width:100%;height:100%;
  background:#fff;transition:.35s ease;z-index:20;
  display:flex;flex-direction:column
}
.drawer.open{right:0}

.drawer-header{display:flex;justify-content:space-between;align-items:center;padding:16px;border-bottom:1px solid #e5e7eb}

.drawer-content{padding:16px;display:flex;flex-direction:column;gap:20px}

.account{
  display:flex;align-items:center;gap:12px;
  padding:16px;border-radius:20px;
  border:1px solid #e5e7eb
}
.account-avatar{
  width:44px;height:44px;border-radius:50%;
  background:#eef2ff;font-weight:700;
  display:flex;align-items:center;justify-content:center
}
.account-name{font-weight:600}
.account-sub{font-size:13px;color:#64748b}

.lang{
  display:flex;justify-content:space-between;align-items:center;
  padding:16px;border-radius:20px;
  border:1px solid #e5e7eb;font-weight:600
}

.drawer-nav{
  display:flex;flex-direction:column;gap:12px
}
.drawer-nav a{
  padding:16px;border-radius:20px;
  border:1px solid #e5e7eb;
  font-weight:600
}
.drawer-nav a.active{
  background:linear-gradient(180deg,#0f172a,#020617);
  color:#fff;border:none
}

.close{width:44px;height:44px;border-radius:14px;border:1px solid #e5e7eb;background:#fff;font-size:26px;line-height:1;display:flex;align-items:center;justify-content:center;cursor:pointer}

/* CONTENT */
.container{max-width:1200px;margin:0 auto;padding:32px 16px}
h1{margin:0;font-size:28px;font-weight:700}
.desc{color:#64748b;margin:8px 0 24px;font-size:14px}

/* CARDS */
.cards{margin-top:32px;display:grid;grid-template-columns:repeat(2,1fr);gap:24px}
.card{
  background:#fff;border-radius:20px;padding:24px;
  box-shadow:0 10px 30px rgba(15,23,42,.06);
  display:flex;flex-direction:column;transition:transform .2s,box-shadow .2s
}
.card:hover{transform:translateY(-2px);box-shadow:0 12px 40px rgba(15,23,42,.08)}
.card.replied{opacity:.6;pointer-events:none;position:relative}
.card.replied::after{
  content:'✓ Отвечено';
  position:absolute;top:16px;right:16px;
  background:#10b981;color:#fff;padding:6px 12px;
  border-radius:8px;font-size:12px;font-weight:600;z-index:10
}

.card-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.badge{font-size:13px;color:#64748b;display:flex;align-items:center;gap:8px}
.market{
  width:32px;height:32px;border-radius:8px;
  display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:700;color:#fff
}
.market.wb{background:#7b61ff}
.market.ozon{background:#005bff}

.rating{display:flex;align-items:center;gap:4px;font-size:14px;font-weight:600}
.rating-stars{display:flex;gap:2px}
.star{font-size:16px;line-height:1}
.star.filled{color:#f59e0b}
.star.empty{color:#e5e7eb}
.rating.rating-low .star.filled{color:#ef4444}
.rating.rating-medium .star.filled{color:#f59e0b}
.rating.rating-high .star.filled{color:#10b981}

.card-user{font-size:14px;font-weight:600;color:#0f172a;margin-bottom:4px}
.card-date{font-size:12px;color:#94a3b8;margin-bottom:8px}
.card-product{
  margin-bottom:12px;padding:8px 12px;background:#f8fafc;
  border-radius:8px;border:1px solid #e2e8f0
}
.product-label{
  font-size:12px;font-weight:600;color:#64748b;
  text-transform:uppercase;letter-spacing:0.5px;margin-right:8px
}
.product-name{
  font-size:14px;font-weight:500;color:#0f172a
}

.card-text{
  margin:16px 0;color:#334155;line-height:1.6;
  white-space:pre-wrap;word-wrap:break-word;min-height:40px
}
.card-text:empty::before{
  content:'(Текст отзыва отсутствует)';
  color:#94a3b8;font-style:italic
}

.review-content{margin:16px 0;display:flex;flex-direction:column;gap:12px}
.review-pros,.review-cons,.review-comment{
  display:flex;flex-direction:column;gap:6px
}
.review-label{
  font-size:13px;font-weight:600;color:#64748b;
  text-transform:uppercase;letter-spacing:0.5px
}
.review-pros .review-label{color:#10b981}
.review-cons .review-label{color:#ef4444}
.review-comment .review-label{color:#64748b}
.review-content .review-text{
  color:#334155;line-height:1.6;
  white-space:pre-wrap;word-wrap:break-word
}

.reply-form{margin-top:16px;padding-top:16px;border-top:1px solid #e5e7eb}
.reply-form label{font-size:13px;color:#64748b;margin-bottom:6px;display:block}
.reply-textarea{
  width:100%;border-radius:14px;border:1px solid #e5e7eb;
  padding:14px;font-family:inherit;margin-bottom:16px;
  min-height:100px;resize:vertical;transition:border-color .2s
}
.reply-textarea:focus{
  outline:none;border-color:#4f46e5;
  box-shadow:0 0 0 3px rgba(79,70,229,.1)
}
.reply-textarea::placeholder{color:#94a3b8}

.send{
  align-self:flex-end;
  background:#4f46e5;color:#fff;
  border:none;border-radius:12px;padding:10px 20px;
  font-weight:600;cursor:pointer;transition:all .2s
}
.send:hover:not(:disabled){background:#4338ca;transform:translateY(-1px)}
.send:active:not(:disabled){transform:translateY(0)}
.send:disabled{
  background:#eef2ff;color:#94a3b8;cursor:not-allowed;opacity:.6
}
.send.loading{pointer-events:none;position:relative}
.send.loading::after{
  content:'';width:16px;height:16px;
  border:2px solid rgba(255,255,255,.3);
  border-top-color:#fff;border-radius:50%;
  animation:spin .6s linear infinite;margin-left:8px
}

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

/* EMPTY STATE */
.empty-state{
  text-align:center;padding:64px 16px;
  background:#fff;border-radius:20px;
  box-shadow:0 10px 30px rgba(15,23,42,.06);
  margin-top:32px
}
.empty-state-icon{
  width:64px;height:64px;margin:0 auto 20px;
  background:#10b981;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:32px;color:#fff;font-weight:700
}
.empty-state h2{font-size:20px;font-weight:600;margin-bottom:8px;color:#0f172a}
.empty-state p{color:#64748b;font-size:14px}

/* LOADING STATE */
.loading-state{
  grid-column:1/-1;text-align:center;padding:48px
}
.loading-spinner{
  display:inline-block;width:40px;height:40px;
  border:4px solid #e5e7eb;border-top-color:#4f46e5;
  border-radius:50%;animation:spin .6s linear infinite
}
.loading-text{margin-top:16px;color:#64748b;font-size:14px}

/* ERROR STATE */
.error-state{
  grid-column:1/-1;text-align:center;padding:48px;
  background:#fff;border-radius:20px;
  box-shadow:0 10px 30px rgba(15,23,42,.06)
}
.error-icon{font-size:48px;margin-bottom:16px}
.error-state h2{color:#0f172a;margin-bottom:8px;font-size:18px;font-weight:600}
.error-state p{color:#64748b;margin-bottom:24px;font-size:14px}
.error-button{
  padding:12px 24px;border-radius:12px;
  background:#4f46e5;color:#fff;border:none;
  font-weight:600;cursor:pointer;transition:background .2s
}
.error-button:hover{background:#4338ca}

/* ANIMATIONS */
@keyframes fadeOut{
  from{opacity:1;transform:translateY(0)}
  to{opacity:0;transform:translateY(-20px)}
}
.card.fading-out{animation:fadeOut .3s ease-out forwards}

/* SETTINGS */
.grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.settings-card h2{margin:0 0 12px;font-size:20px;font-weight:600}
.settings-card label{
  display:block;font-size:13px;color:#64748b;
  margin-top:12px;margin-bottom:6px;font-weight:500
}
.settings-card input{
  width:100%;padding:14px;border-radius:14px;
  border:1px solid #e5e7eb;font-family:inherit;
  font-size:14px;transition:border-color .2s
}
.settings-card input:focus{
  outline:none;border-color:#4f46e5;
  box-shadow:0 0 0 3px rgba(79,70,229,.1)
}
.muted{color:#64748b;font-size:14px;margin-bottom:16px}

.toggle-row{
  display:flex;justify-content:space-between;align-items:center;
  padding:16px;border:1px solid #e5e7eb;border-radius:16px;
  margin-bottom:12px
}
.toggle-row span{font-weight:500;color:#0f172a}

.switcher{position:relative;width:48px;height:26px;cursor:pointer}
.switcher input{opacity:0;width:0;height:0}
.slider{
  position:absolute;inset:0;background:#e5e7eb;
  border-radius:999px;transition:background .2s
}
.slider:before{
  content:"";position:absolute;height:20px;width:20px;
  left:3px;bottom:3px;background:#fff;border-radius:50%;
  transition:transform .2s;box-shadow:0 2px 4px rgba(0,0,0,.2)
}
.switcher input:checked + .slider{background:#4f46e5}
.switcher input:checked + .slider:before{transform:translateX(22px)}

.save{
  margin-top:16px;width:100%;padding:16px;border:none;
  border-radius:16px;background:#4f46e5;color:#fff;
  font-weight:600;font-size:16px;cursor:pointer;
  transition:background .2s
}
.save:hover{background:#4338ca}

.prompts-card{grid-column:1/-1}
.prompts-card .prompt-field{
  width:100%;padding:14px;border-radius:14px;
  border:1px solid #e5e7eb;font-family:inherit;
  font-size:14px;transition:border-color .2s;
  resize:vertical;min-height:80px;margin-bottom:4px
}
.prompts-card .prompt-field:focus{
  outline:none;border-color:#4f46e5;
  box-shadow:0 0 0 3px rgba(79,70,229,.1)
}
.prompts-card .prompt-field::placeholder{color:#94a3b8}
.prompts-instruction{
  margin-top:24px;padding:16px;border-radius:14px;
  background:#f8fafc;border:1px solid #e2e8f0;
  font-size:13px;color:#475569;line-height:1.5
}
.prompts-instruction strong{color:#0f172a}
.prompts-card .save{margin-top:20px}

/* LOGIN PAGE */
.login-container{
  min-height:100vh;display:flex;align-items:center;justify-content:center;
  padding:20px;background:#f5f7fb
}
.login-card{
  width:100%;max-width:400px;background:#fff;
  border-radius:20px;padding:40px;box-shadow:0 10px 30px rgba(15,23,42,.06)
}
.login-header{text-align:center;margin-bottom:32px}
.login-header .brand-logo{
  width:60px;height:60px;border-radius:16px;
  background:linear-gradient(135deg,#7b61ff,#5b4fcf);
  color:#fff;font-weight:700;font-size:24px;
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 20px
}
.login-header h1{margin:0 0 8px;font-size:24px;font-weight:700}
.login-desc{color:#64748b;font-size:14px;margin:0}

.login-form{display:flex;flex-direction:column;gap:20px}
.form-group{display:flex;flex-direction:column;gap:8px}
.form-group label{
  font-size:13px;font-weight:600;color:#0f172a
}
.form-group input{
  width:100%;padding:14px;border-radius:14px;
  border:1px solid #e5e7eb;font-family:inherit;
  font-size:14px;transition:border-color .2s
}
.form-group input:focus{
  outline:none;border-color:#4f46e5;
  box-shadow:0 0 0 3px rgba(79,70,229,.1)
}

.login-button{
  width:100%;padding:14px;border:none;
  border-radius:14px;background:#4f46e5;color:#fff;
  font-weight:600;font-size:16px;cursor:pointer;
  transition:background .2s;margin-top:8px
}
.login-button:hover:not(:disabled){background:#4338ca}
.login-button:disabled{
  opacity:.6;cursor:not-allowed
}

.error-message{
  padding:12px;border-radius:12px;background:#fee2e2;
  color:#dc2626;font-size:14px;text-align:center
}
.success-message{
  padding:12px;border-radius:12px;background:#d1fae5;
  color:#059669;font-size:14px;text-align:center
}

.register-link{
  background:none;border:none;color:#4f46e5;
  font-weight:500;font-size:14px;cursor:pointer;
  text-decoration:underline;padding:0
}
.register-link:hover{
  color:#4338ca
}

.form-divider{
  display:flex;align-items:center;text-align:center;
  margin:20px 0;color:#64748b;font-size:14px
}
.form-divider::before,.form-divider::after{
  content:'';flex:1;height:1px;background:#e5e7eb
}
.form-divider span{
  padding:0 16px
}

/* ADMIN PANEL */
.accounts-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr));
  gap:24px;margin-top:32px
}
.account-card{
  background:#fff;border-radius:20px;padding:24px;
  box-shadow:0 10px 30px rgba(15,23,42,.06);
  border:1px solid #e5e7eb;transition:all .2s
}
.account-card:hover{box-shadow:0 12px 40px rgba(15,23,42,.08)}
.account-card.inactive{opacity:.7;background:#f9fafb}
.account-card-header{
  display:flex;justify-content:space-between;
  align-items:center;margin-bottom:20px;padding-bottom:16px;
  border-bottom:1px solid #e5e7eb
}
.account-status{
  display:flex;align-items:center;gap:8px;
  font-size:13px;font-weight:600
}
.status-dot{
  width:8px;height:8px;border-radius:50%;
  background:#10b981
}
.account-status.inactive .status-dot{background:#94a3b8}
.account-actions{display:flex;gap:8px}
.btn-icon{
  width:36px;height:36px;border-radius:10px;
  border:1px solid #e5e7eb;background:#fff;
  cursor:pointer;display:flex;align-items:center;
  justify-content:center;font-size:16px;transition:all .2s
}
.btn-icon:hover{background:#f5f7fb;border-color:#4f46e5}
.account-card-body{display:flex;flex-direction:column;gap:16px}
.account-card-body .form-group{
  display:flex;flex-direction:column;gap:8px
}
.account-card-body label{
  font-size:13px;font-weight:600;color:#0f172a
}
.account-field{
  width:100%;padding:12px;border-radius:12px;
  border:1px solid #e5e7eb;font-family:inherit;
  font-size:14px;transition:all .2s;background:#f9fafb
}
.account-field:focus{
  outline:none;border-color:#4f46e5;
  box-shadow:0 0 0 3px rgba(79,70,229,.1);
  background:#fff
}
.account-field[readonly]{
  background:#f9fafb;cursor:not-allowed
}
.password-field-wrapper{
  position:relative;display:flex;align-items:center
}
.password-field-wrapper .account-field{
  padding-right:44px
}
.password-field-wrapper .toggle-password{
  position:absolute;right:8px;width:32px;height:32px;
  border:none;background:transparent;cursor:pointer;
  font-size:18px;display:flex;align-items:center;
  justify-content:center
}
.account-card-footer{
  display:flex;gap:12px;margin-top:20px;
  padding-top:20px;border-top:1px solid #e5e7eb;
  justify-content:flex-end
}
.btn-primary{
  padding:12px 24px;border-radius:12px;
  background:#4f46e5;color:#fff;border:none;
  font-weight:600;font-size:14px;cursor:pointer;
  transition:all .2s;display:inline-flex;align-items:center
}
.btn-primary:hover:not(:disabled){background:#4338ca}
.btn-primary:disabled{opacity:.6;cursor:not-allowed}
.btn-secondary{
  padding:12px 24px;border-radius:12px;
  background:#f3f4f6;color:#0f172a;border:none;
  font-weight:600;font-size:14px;cursor:pointer;
  transition:all .2s
}
.btn-secondary:hover{background:#e5e7eb}
.btn-danger{
  padding:12px 24px;border-radius:12px;
  background:#ef4444;color:#fff;border:none;
  font-weight:600;font-size:14px;cursor:pointer;
  transition:all .2s
}
.btn-danger:hover{background:#dc2626}
.modal{
  position:fixed;inset:0;background:rgba(0,0,0,.5);
  display:flex;align-items:center;justify-content:center;
  z-index:1000;padding:20px
}
.modal-content{
  background:#fff;border-radius:20px;padding:32px;
  max-width:500px;width:100%;box-shadow:0 20px 60px rgba(0,0,0,.3)
}
.modal-header{
  display:flex;justify-content:space-between;
  align-items:center;margin-bottom:24px
}
.modal-header h2{
  margin:0;font-size:24px;font-weight:600
}
.modal-close{
  width:32px;height:32px;border:none;
  background:#f1f5f9;border-radius:8px;
  font-size:24px;line-height:1;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  color:#64748b;transition:background .2s
}
.modal-close:hover{
  background:#e2e8f0
}
.modal-content h3{
  margin:0 0 16px;font-size:20px;font-weight:600
}
.modal-content p{
  margin:0 0 16px;color:#64748b;line-height:1.6
}
.modal-actions{
  display:flex;gap:12px;justify-content:flex-end;
  margin-top:24px
}
.register-form{
  display:flex;flex-direction:column;gap:16px
}

/* MOBILE */
@media(max-width:900px){
  .nav,.right{display:none}
  .burger{display:flex}
  .cards{grid-template-columns:1fr}
  .grid{grid-template-columns:1fr !important}
  .container{padding:24px 16px}
  .card{padding:20px}
  h1{font-size:24px}
  .save{width:100%}
  .accounts-grid{grid-template-columns:1fr}
  .account-card{padding:20px}
  .modal-content{padding:24px}
}

@media(max-width:480px){
  .header-inner{padding:12px}
  .brand-logo{width:36px;height:36px;font-size:12px}
  .brand-title{font-size:14px}
  .brand-sub{font-size:11px}
  .container{padding:16px 12px}
  .card{padding:16px}
  .card-top{flex-direction:column;align-items:flex-start;gap:12px}
}
