* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Arial, "Microsoft YaHei", sans-serif; color: #111827; }
body { background: #f3f6fa; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
input, select { height: 38px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0 10px; background: #fff; min-width: 0; }
button { cursor: pointer; border: 0; }

.landing { position: relative; min-height: 100vh; overflow: hidden; background: #f8f5ed; display: grid; place-items: center; padding: 32px 20px; }
.wall { pointer-events: none; position: absolute; inset: 0; overflow: hidden; opacity: .7; }
.wall-mask { position: absolute; inset: 0; background: rgba(255,255,255,.58); z-index: 1; }
.wall-tracks { min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 24px 0; }
.wall-row { width: max-content; display: flex; gap: 16px; animation: wall-forward 52s linear infinite; will-change: transform; }
.wall-row.reverse { animation-name: wall-reverse; transform: translateX(-50%); }
.wall-row img { width: 186px; height: 116px; flex: 0 0 auto; object-fit: cover; border: 1px solid rgba(214,179,90,.55); background: #fff; box-shadow: 0 8px 24px rgba(120,91,28,.18); }
@keyframes wall-forward { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes wall-reverse { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.landing-panel { position: relative; z-index: 2; width: 100%; max-width: 420px; text-align: center; }
.brand-logo { width: 168px; height: 120px; margin: 0 auto; display: grid; place-items: center; overflow: hidden; border: 1px solid #c9a24d; border-radius: 12px; background: rgba(255,255,255,.92); box-shadow: 0 16px 36px rgba(120,91,28,.18); padding: 10px; }
.brand-logo img { max-width: 120%; max-height: 120%; width: auto; height: auto; object-fit: contain; display: block; transform: translateY(-25px);}
.landing-panel h1 { margin: 24px 0 0; font-size: 30px; line-height: 1.2; }
.landing-panel p { margin: 12px 0 0; color: #2f2f2f; line-height: 1.7; }
.platform-list { display: grid; gap: 14px; margin-top: 36px; }
.platform-button { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border: 1px solid rgba(202,168,90,.8); color: #fff; box-shadow: 0 10px 26px rgba(120,91,28,.22); transition: .18s ease; }
.platform-button.whatsapp { background: #128c7e; }
.platform-button.telegram { background: #2aabee; }
.platform-button.disabled { background: #eee8dc; border-color: #d8cfba; color: #7a7468; pointer-events: none; box-shadow: none; }
.platform-left { display: flex; align-items: center; gap: 14px; text-align: left; }
 .platform-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.65);
    background: rgba(255,255,255,.95);
    color: #111827;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
    padding: 2px;
  }
  .platform-button.whatsapp .platform-icon img {
    width: 165%;
    height: auto;
    transform: translateY(-2px) scale(1.2);
  }
  .platform-button.telegram .platform-icon img {
    width: 155%;
    height: auto;
    transform: translateX(-0.3px) translateY(0px) scale(1.15);
  }

.platform-left strong, .platform-left small { display: block; }
.platform-left small { margin-top: 3px; opacity: .85; }
.arrow { font-size: 24px; line-height: 1; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; }
.login-box { width: 100%; max-width: 420px; background: #fff; border: 1px solid #d9e1ec; padding: 24px; }
.login-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #e7edf4; padding-bottom: 20px; }
.login-head p { margin: 0 0 6px; color: #526173; font-size: 14px; }
.login-head h1 { margin: 0; font-size: 24px; }
.login-head a { border: 1px solid #c7d2de; padding: 8px 12px; font-size: 14px; }
.form-grid { display: grid; gap: 14px; margin-top: 20px; }
.form-grid input, .form-grid button { height: 44px; }
.form-grid button { background: #2563eb; color: #fff; font-weight: 700; border-radius: 6px; }

.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar { background: #101828; color: #fff; padding: 22px 16px; }
.sidebar-brand { display: grid; gap: 6px; margin-bottom: 24px; }
.sidebar-brand span { color: #aab5c5; font-size: 13px; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a { padding: 11px 12px; border-radius: 6px; color: #cbd5e1; }
.sidebar nav a.active, .sidebar nav a:hover { background: #1d2939; color: #fff; }
.admin-main { padding: 24px; min-width: 0; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.admin-top h1 { margin: 0; font-size: 26px; }
.admin-top p { margin: 6px 0 0; color: #667085; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn { height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0 13px; border-radius: 6px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.btn.ghost { border: 1px solid #c7d2de; background: #fff; color: #344054; }
.btn.dark { background: #101828; color: #fff; }
.btn.primary { background: #0f766e; color: #fff; }
.btn.danger { background: #be123c; color: #fff; }
.notice { margin: 0 0 16px; padding: 10px 12px; border-radius: 6px; font-size: 14px; }
.notice.success { border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; }
.notice.error { border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.metric, .panel { background: #fff; border: 1px solid #dbe3ee; border-radius: 8px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.metric { padding: 20px; display: grid; gap: 10px; }
.metric span { color: #667085; }
.metric strong { font-size: 32px; }
.panel { padding: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.inline-action { margin: -8px 0 16px; }
.panel-head h2, .side-form h2 { margin: 0; font-size: 18px; }
.panel-head span { color: #475467; font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stat-card { border: 1px solid #e7edf4; background: #fbfcfe; border-radius: 8px; padding: 16px; }
.stat-title { display: flex; justify-content: space-between; gap: 12px; }
.stat-title small { display: block; margin-top: 4px; color: #667085; text-transform: uppercase; }
.stat-title span { color: #0f766e; font-weight: 700; }
.progress { height: 8px; border-radius: 999px; background: #e7edf4; margin: 16px 0; overflow: hidden; }
.progress i { display: block; height: 100%; background: #0f766e; }
.stat-parts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 14px; color: #475467; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.side-form { display: grid; gap: 13px; }
.side-form.wide { max-width: 680px; }
.side-form label { display: grid; gap: 7px; color: #344054; font-size: 14px; font-weight: 700; }
.side-form p { margin: 0; color: #667085; line-height: 1.7; }
.check { display: inline-flex !important; grid-template-columns: none !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.check input { width: 16px; height: 16px; padding: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 920px; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: #667085; background: #f8fafc; font-weight: 700; }
th, td { border-top: 1px solid #e7edf4; padding: 10px; vertical-align: middle; }
td input { width: 100%; }
.inline-input { display: flex; align-items: center; gap: 6px; }
.inline-input input { width: 76px; }
.wall-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.wall-card { display: grid; gap: 10px; border: 1px solid #e7edf4; border-radius: 8px; padding: 12px; background: #fbfcfe; }
.wall-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; background: #eef2f7; }
.wall-card label { display: grid; gap: 6px; font-size: 13px; color: #475467; }
.admin-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.admin-list li { display: flex; justify-content: space-between; gap: 12px; border: 1px solid #e7edf4; border-radius: 8px; padding: 14px; background: #fbfcfe; }
.admin-list span { color: #667085; }

@media (max-width: 980px) {
    .admin-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .sidebar nav { grid-template-columns: repeat(3, 1fr); }
    .admin-top, .split { grid-template-columns: 1fr; display: grid; }
    .metric-grid, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .landing-panel h1 { font-size: 26px; }
    .wall-row img { width: 154px; height: 100px; }
    .platform-button { min-height: 58px; padding: 10px 14px; }
    .platform-icon { width: 42px; height: 42px; }
    .admin-main { padding: 16px; }
    .sidebar nav { grid-template-columns: repeat(2, 1fr); }
    .metric-grid, .stat-grid { grid-template-columns: 1fr; }
    .top-actions { align-items: stretch; }
}
