:root{ --navy:#1E215A; --blue:#303394; --red:#EC2022; --bg:#f4f6fb; --line:#e3e7f2; --muted:#6b7280; }
*{ box-sizing:border-box; }
body{ margin:0; font-family:Arial,Helvetica,sans-serif; background:var(--bg); color:#222; }
a{ color:var(--blue); text-decoration:none; }

/* Login */
.login-wrap{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px;
	background:linear-gradient(135deg,#1E215A,#303394); }
.login-card{ background:#fff; width:100%; max-width:400px; border-radius:16px; padding:36px 32px; box-shadow:0 24px 60px rgba(11,26,71,.35); }
.login-card .brand{ text-align:center; margin-bottom:8px; font-weight:bold; font-size:20px; color:var(--navy); }
.login-card .brand span{ color:var(--red); }
.login-card .sub{ text-align:center; color:var(--muted); font-size:14px; margin-bottom:24px; }

/* Admin shell */
.topbar{ background:var(--navy); color:#fff; padding:0 24px; height:60px; display:flex; align-items:center; justify-content:space-between; }
.topbar .logo{ font-weight:bold; letter-spacing:.5px; }
.topbar .logo span{ color:var(--red); }
.topbar .right{ display:flex; align-items:center; gap:18px; font-size:14px; }
.topbar .right a{ color:#cdd3ee; }
.layout{ display:flex; min-height:calc(100vh - 60px); }
.side{ width:220px; background:#fff; border-right:1px solid var(--line); padding:18px 0; }
.side a{ display:block; padding:12px 24px; color:#333; font-size:14px; font-weight:600; border-left:3px solid transparent; }
.side a:hover, .side a.active{ background:#eef1fb; color:var(--blue); border-left-color:var(--blue); }
.main{ flex:1; padding:28px 32px; }
.page-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:22px; }
.page-head h1{ font-size:22px; color:var(--navy); margin:0; }

/* Buttons + forms */
.btn{ display:inline-block; border:none; cursor:pointer; padding:11px 20px; border-radius:9px; font-size:14px; font-weight:700; background:var(--blue); color:#fff; }
.btn:hover{ background:var(--red); }
.btn.sm{ padding:7px 13px; font-size:13px; }
.btn.gray{ background:#e7ebf5; color:#333; }
.btn.gray:hover{ background:#d7ddee; }
.btn.danger{ background:#fdecec; color:var(--red); }
.btn.danger:hover{ background:var(--red); color:#fff; }
.field{ margin-bottom:16px; }
.field label{ display:block; font-size:13px; font-weight:700; color:var(--navy); margin-bottom:6px; }
.field input, .field textarea, .field select{ width:100%; padding:11px 13px; border:1.5px solid var(--line); border-radius:9px; font-size:14px; font-family:inherit; background:#fff; }
.field input:focus, .field textarea:focus, .field select:focus{ outline:none; border-color:var(--blue); }
.field textarea{ min-height:110px; resize:vertical; }
.row2{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }

/* Cards + table */
.card{ background:#fff; border:1px solid var(--line); border-radius:14px; padding:22px; }
table{ width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--line); border-radius:14px; overflow:hidden; }
th,td{ text-align:left; padding:13px 16px; font-size:14px; border-bottom:1px solid var(--line); }
th{ background:#f1f3fb; color:var(--navy); font-size:12px; text-transform:uppercase; letter-spacing:.5px; }
tr:last-child td{ border-bottom:none; }
.badge{ display:inline-block; padding:3px 10px; border-radius:20px; font-size:12px; font-weight:700; }
.badge.published{ background:#e6f4ea; color:#1a7f37; }
.badge.draft{ background:#fdecec; color:var(--red); }
.alert{ padding:12px 16px; border-radius:9px; font-size:14px; margin-bottom:18px; }
.alert.err{ background:#fdecec; color:var(--red); }
.alert.ok{ background:#e6f4ea; color:#1a7f37; }
.muted{ color:var(--muted); font-size:13px; }
.actions{ display:flex; gap:8px; }
@media(max-width:720px){ .side{ display:none; } .row2{ grid-template-columns:1fr; } }

/* Messages */
.side-badge{ display:inline-block; min-width:18px; padding:1px 6px; margin-left:4px; font-size:11px; font-weight:800; text-align:center; border-radius:20px; background:var(--red); color:#fff; }
.badge.contact{ background:#e6efff; color:#2451b8; }
.badge.quote{ background:#eae9f8; color:#303394; }
.badge.newsletter{ background:#eef1f5; color:#555; }
.msg-row{ cursor:pointer; }
.msg-row.unread td{ font-weight:700; }
.msg-row .dot{ display:inline-block; width:8px; height:8px; border-radius:50%; background:transparent; margin-right:7px; }
.msg-row.unread .dot{ background:var(--red); }
.detail-table{ border:none; }
.detail-table td{ padding:10px 0; vertical-align:top; border-bottom:1px solid var(--line); font-size:14px; }
.detail-table td.k{ color:var(--muted); width:140px; font-weight:700; }
.detail-msg{ white-space:pre-wrap; line-height:1.6; }

/* Site Content page */
.content-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:18px; }
.content-grid .card{ margin:0; }
.content-grid .card h2{ font-size:16px; margin:0 0 12px; }
.content-preview{ background:#F1F3F9; border:1px solid var(--line); border-radius:10px; overflow:hidden; aspect-ratio:16/10; display:flex; align-items:center; justify-content:center; }
.content-preview img{ width:100%; height:100%; object-fit:cover; }
.content-preview.noimg{ font-size:12px; color:var(--muted); }
.content-preview.noimg img{ display:none; }
.pill{ display:inline-block; font-size:11px; font-weight:700; padding:1px 8px; border-radius:20px; background:#E7ECFb; color:#303394; vertical-align:middle; }
