:root {
  --bg: #060b17;
  --bg-2: #0a1220;
  --panel: #0e1a2f;
  --panel-2: #132442;
  --line: #1d3050;
  --primary: #3b82f6;
  --primary-2: #0ea5e9;
  --cyan: #22d3ee;
  --text: #e7eefb;
  --muted: #8ea3c8;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.35; }
p { color: var(--text); }

.muted { color: var(--muted); }
.center { text-align: center; }
.grad {
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.container { width: min(1150px, 92%); margin-inline: auto; }

/* ---------------------------------------------------------------- Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6, 11, 23, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { width: 100%; max-width: none; margin-inline: 0; padding-inline: clamp(1rem, 3vw, 2rem); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .45rem; }
.brand { display: flex; align-items: center; gap: .55rem; }
.brand img { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: .92rem; }
.brand-text span { font-size: .66rem; color: var(--muted); letter-spacing: .5px; }

.main-nav { display: flex; align-items: center; gap: .2rem; }
.main-nav a { padding: .4rem .65rem; border-radius: 9px; color: var(--text); font-weight: 500; transition: .2s; font-size: .86rem; }
.main-nav a:hover { color: var(--cyan); background: rgba(59, 130, 246, .12); }
.main-nav .nav-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; font-weight: 700; margin-inline-start: .5rem;
}
.main-nav .nav-cta:hover { filter: brightness(1.1); color: #fff; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); font-size: 1.2rem; border-radius: 8px; width: 36px; height: 36px; cursor: pointer; }

.flash-wrap { position: fixed; top: 66px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: .5rem; width: min(600px, 92%); }
.flash { padding: .8rem 1.2rem; border-radius: 12px; font-weight: 700; text-align: center; box-shadow: var(--shadow); }
.flash-success { background: rgba(34, 197, 94, .15); border: 1px solid var(--success); color: var(--success); }
.flash-error { background: rgba(239, 68, 68, .15); border: 1px solid var(--danger); color: var(--danger); }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-block; padding: .7rem 1.5rem; border-radius: 12px;
  font-weight: 700; font-size: .97rem; cursor: pointer; border: none;
  transition: .2s; font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 6px 20px rgba(59, 130, 246, .35); }
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--primary); color: var(--cyan); }
.btn-light { background: #fff; color: #0b1120; }
.btn-light:hover { transform: translateY(-1px); }
.btn-sm { padding: .35rem .8rem; font-size: .82rem; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--text); }
.btn-edit { background: rgba(59, 130, 246, .15); border-color: var(--primary); color: #9cc3ff; }
.btn-del { background: rgba(239, 68, 68, .12); border-color: var(--danger); color: #ff9b9b; }

.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Hero */
.hero { position: relative; overflow: hidden; padding: 5rem 0 4rem; background: radial-gradient(1200px 600px at 20% -10%, rgba(59, 130, 246, .18), transparent 60%), radial-gradient(900px 500px at 90% 10%, rgba(34, 211, 238, .1), transparent 60%); }
.hero-grid {
  position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image:
    linear-gradient(rgba(59, 130, 246, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, .08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(700px 400px at 50% 30%, #000, transparent);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
.hero-badge {
  display: inline-block; padding: .35rem 1rem; border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, .4); background: rgba(34, 211, 238, .08);
  color: var(--cyan); font-size: .85rem; font-weight: 700; margin-bottom: 1rem;
}
.hero-text h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 1rem; }
.hero-text p { color: var(--muted); font-size: 1.1rem; max-width: 560px; margin-bottom: 1.5rem; }

.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; min-height: 320px; }
.hero-banner {
  width: min(560px, 100%);
  filter: none;
  animation: float 5s ease-in-out infinite;
}
.hero-drone { width: 240px; filter: drop-shadow(0 20px 60px rgba(59, 130, 246, .5)); animation: float 5s ease-in-out infinite; }
.orbit { position: absolute; border: 1px dashed rgba(59, 130, 246, .35); border-radius: 50%; }
.orbit-1 { width: 320px; height: 320px; animation: spin 22s linear infinite; }
.orbit-2 { width: 240px; height: 240px; border-color: rgba(34, 211, 238, .3); animation: spin 16s linear infinite reverse; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* ---------------------------------------------------------------- Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: .4rem; }
.section-head p { color: var(--muted); }

.page-hero { padding: 3.5rem 0 2.5rem; text-align: center; background: radial-gradient(900px 400px at 50% -20%, rgba(59, 130, 246, .22), transparent 60%); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
.page-hero p { color: var(--muted); margin-top: .5rem; }

/* ---------------------------------------------------------------- Cards */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.4rem; }
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow);
  transition: .25s;
}
.card:hover { border-color: rgba(59, 130, 246, .6); transform: translateY(-4px); }
.card-icon { font-size: 2.2rem; margin-bottom: .8rem; }
.card-icon svg {
  width: 62px; height: 62px;
  background: radial-gradient(circle at 30% 25%, rgba(34, 211, 238, .16), rgba(59, 130, 246, .05) 60%, transparent 75%);
  border: 1px solid rgba(59, 130, 246, .25);
  border-radius: 16px;
  padding: 5px;
  box-shadow: 0 8px 24px rgba(34, 211, 238, .15), inset 0 0 18px rgba(59, 130, 246, .12);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover .card-icon svg { transform: translateY(-3px) scale(1.06); border-color: rgba(34, 211, 238, .6); box-shadow: 0 12px 30px rgba(34, 211, 238, .3), inset 0 0 20px rgba(59, 130, 246, .18); }
.card h3 { margin-bottom: .5rem; font-size: 1.15rem; }
.card p { color: var(--muted); font-size: .92rem; }

.product-card, .article-card { padding: 0 0 1.4rem; display: flex; flex-direction: column; }
.product-img, .article-img { height: 180px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; margin-bottom: 1rem; display: flex; align-items: center; justify-content: center; background: var(--bg-2); }
.product-img img, .article-img img { width: 100%; height: 100%; object-fit: cover; }
.img-placeholder { font-size: 3rem; opacity: .5; }
.img-placeholder.big { font-size: 5rem; }
.product-card h3, .article-card h3 { padding-inline: 1.4rem; }
.product-card p, .article-card p { padding-inline: 1.4rem; margin-bottom: 1rem; }
.tag {
  align-self: flex-start; margin-inline: 1.4rem; margin-bottom: .5rem;
  font-size: .75rem; font-weight: 700; color: var(--cyan);
  background: rgba(34, 211, 238, .1); padding: .2rem .7rem; border-radius: 999px;
}
.product-card > .tag { margin-top: .6rem; }
.price { color: var(--cyan); font-weight: 800; font-size: 1.1rem; padding-inline: 1.4rem; }
.price.big { padding-inline: 0; font-size: 1.5rem; }

.filter-bar { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 2rem; justify-content: center; }
.chip { padding: .45rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); font-size: .88rem; font-weight: 600; transition: .2s; }
.chip:hover { border-color: var(--primary); color: var(--cyan); }
.chip.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-color: transparent; }

/* ---------------------------------------------------------------- Details */
.breadcrumb { color: var(--muted); font-size: .88rem; margin-bottom: 1.5rem; }
.breadcrumb a:hover { color: var(--cyan); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.detail-img { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--panel); min-height: 300px; display: flex; align-items: center; justify-content: center; }
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-body h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-block: .7rem; }
.detail-body .lead { color: var(--text); font-size: 1.05rem; margin-bottom: 1rem; }
.detail-text { color: var(--muted); line-height: 2; }
.narrow { max-width: 780px; }
.narrow .tag { margin-inline: 0; }
.article-title { font-size: clamp(1.5rem, 3vw, 2.3rem); margin-bottom: 1.2rem; }
.featured-img { margin-bottom: 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); }

.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 1.6rem; align-items: start; }
.contact-card p { margin-bottom: .8rem; color: var(--muted); }
.contact-card a { color: var(--cyan); }
.form-card { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-weight: 700; font-size: .9rem; }
.field input, .field textarea, .field select {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 11px; padding: .7rem .9rem; font-family: inherit; font-size: .95rem;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--primary); }

.about-card { text-align: center; padding: 2.5rem; }
.about-logo { display: flex; justify-content: center; margin-bottom: 1rem; }
.about-logo img { width: 120px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.stat strong { display: block; color: var(--cyan); font-size: 1.4rem; }
.stat span { color: var(--muted); font-size: .85rem; }

.cta-section { padding: 3.5rem 0; text-align: center; background: radial-gradient(800px 400px at 50% 0%, rgba(59, 130, 246, .25), transparent 70%); border-top: 1px solid var(--line); }
.cta-section h2 { font-size: 1.8rem; margin-bottom: .4rem; }
.cta-section p { color: var(--muted); margin-bottom: 1.3rem; }

/* ---------------------------------------------------------------- Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 3rem 0 1.5rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-grid .footer-right { margin-left: auto; text-align: right; }
.site-footer h4 { margin-bottom: .8rem; font-size: 1rem; }
.site-footer a { display: block; color: var(--muted); margin-bottom: .4rem; }
.site-footer a:hover { color: var(--cyan); }
.site-footer p { color: var(--muted); font-size: .9rem; }
.footer-brand { margin-bottom: .8rem; }
.footer-brand img { width: 40px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

/* ================================================================ Admin Panel */
.admin-body { min-height: 100vh; }
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: var(--bg-2); border-right: 1px solid var(--line);
  padding: 1.2rem; display: flex; flex-direction: column; gap: 1rem;
  position: sticky; top: 0; height: 100vh;
}
.admin-brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; padding: .4rem; }
.admin-brand img { width: 40px; }
.admin-nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.admin-nav a { display: flex; align-items: center; justify-content: space-between; padding: .7rem .9rem; border-radius: 11px; color: var(--text); font-weight: 600; transition: .2s; }
.admin-nav a:hover { background: rgba(59, 130, 246, .12); color: var(--cyan); }
.badge { background: var(--danger); color: #fff; font-size: .72rem; padding: .1rem .5rem; border-radius: 999px; }
.admin-sidebar-footer { display: flex; flex-direction: column; gap: .2rem; }
.admin-sidebar-footer a { padding: .55rem .9rem; border-radius: 11px; color: var(--muted); font-size: .9rem; }
.admin-sidebar-footer a:hover { color: var(--cyan); background: rgba(59, 130, 246, .1); }

.admin-main { padding: 2rem; max-width: 1100px; }
.admin-title { font-size: 1.5rem; margin-bottom: 1.4rem; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.admin-head .admin-title { margin-bottom: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.stat-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; text-align: center;
}
.stat-card span { font-size: 1.8rem; display: block; margin-bottom: .4rem; }
.stat-card strong { font-size: 1.6rem; color: var(--cyan); display: block; }
.stat-card small { color: var(--muted); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .8rem; border-bottom: 1px solid var(--line); text-align: left; font-size: .92rem; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 700; }
.table tr:last-child td { border-bottom: none; }
.thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--bg-2); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.big-thumb { width: 140px; height: 90px; }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }

.chip-done, .chip-new, .chip-off { font-size: .75rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px; }
.chip-done { color: var(--success); background: rgba(34, 197, 94, .12); }
.chip-new { color: var(--cyan); background: rgba(34, 211, 238, .1); }
.chip-off { color: var(--muted); background: rgba(142, 163, 200, .12); }

.toggle-row { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.toggle { display: flex; align-items: center; gap: .5rem; font-weight: 600; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--primary); }

.messages-list { display: flex; flex-direction: column; gap: 1rem; }
.msg-card.read { opacity: .65; }
.msg-head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .5rem; }
.msg-card .tag { margin-inline: 0; margin-bottom: 0; margin-block: 0; }
.msg-contact { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.msg-contact a { color: var(--cyan); font-size: .88rem; }
.msg-body { background: var(--bg-2); border-radius: 10px; padding: .8rem 1rem; margin-block: .6rem 1rem; color: var(--text); }

.settings-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem; align-items: start; }
.settings-grid h3 { margin-bottom: .8rem; }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 900px) {
  .hero-inner, .detail-grid, .contact-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid, .settings-grid { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .admin-sidebar-footer, .admin-sidebar-footer a { display: none; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; background: var(--bg-2);
    border-bottom: 1px solid var(--line); padding: 1rem;
  }
  .main-nav.open { display: flex; }
  .form-row, .stats-row { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { flex: 1; text-align: center; }
}

@media (max-width: 420px) {
  .cards-grid { grid-template-columns: 1fr; }
}