@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --admin-bg: #070b14;
  --admin-sidebar: #0b1120;
  --admin-card: #0f172a;
  --admin-border: rgba(255, 255, 255, 0.08);
  --admin-accent: #00f0ff;
  --admin-pink: #ff007f;
  --admin-text: #f8fafc;
  --admin-sub: #94a3b8;
  --admin-input: #131c31;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--admin-bg);
  color: var(--admin-text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: var(--admin-sidebar);
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-menu {
  list-style: none;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--admin-sub);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.menu-item a:hover, .menu-item.active a {
  color: #fff;
  background: rgba(0, 240, 255, 0.1);
  color: var(--admin-accent);
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  display: flex;
  flex-direction: column;
}
.user-name {
  font-size: 0.85rem;
  font-weight: 600;
}
.user-role {
  font-size: 0.75rem;
  color: var(--admin-sub);
}

/* Main Content Area */
.admin-main {
  flex: 1;
  padding: 32px 40px;
  overflow-y: auto;
  max-width: 1400px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.page-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-select-box {
  display: flex;
  align-items: center;
  background: var(--admin-input);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.85rem;
}

.lang-select-box select {
  background: transparent;
  color: #fff;
  border: none;
  padding: 4px;
  outline: none;
  font-weight: 600;
}

.btn-save-all {
  background: linear-gradient(135deg, #ff007f 0%, #b829e3 100%);
  color: #fff;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 0, 127, 0.4);
  transition: all 0.2s ease;
}

.btn-save-all:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 0, 127, 0.6);
}

.btn-view-site {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--admin-accent);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-view-site:hover {
  background: rgba(0, 240, 255, 0.1);
}

/* CMS Sections accordion/cards */
.cms-section-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.cms-section-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--admin-accent);
  border-bottom: 1px solid var(--admin-border);
  padding-bottom: 12px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--admin-sub);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-field input, .form-field textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--admin-input);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  transition: border-color 0.2s;
}

.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--admin-accent);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
}

/* Leads Table */
.leads-table-wrap {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  overflow: hidden;
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.leads-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 18px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-sub);
  border-bottom: 1px solid var(--admin-border);
}

.leads-table td {
  padding: 14px 18px;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.badge-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-status.new { background: rgba(0, 240, 255, 0.15); color: var(--admin-accent); border: 1px solid rgba(0, 240, 255, 0.3); }
.badge-status.contacted { background: rgba(255, 189, 46, 0.15); color: #ffbd2e; border: 1px solid rgba(255, 189, 46, 0.3); }
.badge-status.closed { background: rgba(39, 201, 63, 0.15); color: #27c93f; border: 1px solid rgba(39, 201, 63, 0.3); }

/* Login Page Layout */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  background: radial-gradient(circle at center, #0e172a 0%, #060913 100%);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 240, 255, 0.15);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  backdrop-filter: blur(12px);
}

.login-logo {
  margin-bottom: 24px;
}

.login-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.login-sub {
  color: var(--admin-sub);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 14px 24px;
  background: #10b981;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}
.toast.active {
  transform: translateY(0);
  opacity: 1;
}
.toast.error {
  background: #ef4444;
}

/* Image Upload Widget in Admin */
.image-upload-box {
  background: rgba(10, 16, 31, 0.85);
  border: 1px dashed var(--admin-border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 18px;
  transition: border-color 0.2s, background 0.2s;
}

.image-upload-box.drag-over {
  border-color: var(--admin-accent);
  background: rgba(0, 240, 255, 0.05);
}

.image-upload-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.image-upload-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--admin-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.image-upload-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn-upload-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--admin-accent);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-upload-file:hover {
  background: var(--admin-accent);
  color: #000;
}

.upload-feedback-msg {
  font-size: 0.8rem;
  color: var(--admin-sub);
}

.uploaded-preview-card {
  display: none;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 12px;
}

.uploaded-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.uploaded-meta {
  flex: 1;
}

.uploaded-filename {
  font-size: 0.82rem;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  word-break: break-all;
}

.uploaded-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.btn-insert-tag {
  background: rgba(255, 0, 127, 0.15);
  border: 1px solid rgba(255, 0, 127, 0.3);
  color: #ff007f;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-insert-tag:hover {
  background: #ff007f;
  color: #fff;
}

.btn-set-cover {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--admin-accent);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-set-cover:hover {
  background: var(--admin-accent);
  color: #000;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--admin-border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 6px 10px;
}

.toolbar-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--admin-sub);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

.post-thumb-left {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--admin-border);
  margin-right: 12px;
}

