@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Archivo:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0b0d10;
  --bg-2: #11151b;
  --panel: #161a20;
  --panel-2: #1e232b;
  --accent: #f7c843;
  --accent-2: #ffde75;
  --accent-rgb: 247, 200, 67;
  --text: #f4f6f8;
  --muted: #9ba3ad;
  --button-text: #111111;
  --danger: #ff5b5b;
  --success: #43d19e;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Archivo', Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% 10%, rgba(var(--accent-rgb), 0.15), transparent 60%),
    radial-gradient(800px 500px at 90% 20%, rgba(255, 255, 255, 0.05), transparent 55%),
    linear-gradient(160deg, var(--bg), var(--bg-2) 45%, var(--bg));
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.hero {
  padding: 48px 0 32px;
  position: relative;
}

.hero-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.hero-title {
  font-family: 'Bebas Neue', Arial, sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.hero-header {
  text-align: center;
  margin-bottom: 28px;
}

.hero-title-highlight {
  display: block;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  margin-top: 10px;
}

.hero-header .badge {
  margin: 0 auto 16px;
}

.hero-header .hero-subtitle {
  margin-left: auto;
  margin-right: auto;
  max-width: 720px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(247, 200, 67, 0.12);
  color: var(--accent-2);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-photo {
  background: transparent;
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  border-radius: 16px;
  position: relative;
  z-index: 1;
}

.price-card {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  transform: none;
  background: rgba(15, 17, 20, 0.92);
  border: 1px solid rgba(247, 200, 67, 0.35);
  border-radius: 16px;
  padding: 18px 24px;
  text-align: center;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45);
  z-index: 2;
  animation: price-pulse 2.2s ease-in-out infinite;
}

.price-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 6px;
}

.price-main {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}

.price-main span {
  color: var(--accent-2);
}

.price-sub {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 4px;
}

@keyframes price-pulse {
  0% { box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45); }
  50% { box-shadow: 0 0 24px rgba(247, 200, 67, 0.45), 0 18px 30px rgba(0, 0, 0, 0.45); }
  100% { box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45); }
}

.form-card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid #232a34;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(300px 160px at 90% 0%, rgba(247, 200, 67, 0.16), transparent 55%);
  pointer-events: none;
}

.logo {
  width: 160px;
  margin: 0 auto 16px;
}

form {
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.field-row {
  display: grid;
  gap: 12px;
}

label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
  display: block;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #2b3440;
  background: #10141a;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

form input[type="text"],
form input:not([type]),
form textarea {
  text-transform: uppercase;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(247, 200, 67, 0.15);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  border: none;
  padding: 14px 20px;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: var(--button-text);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(247, 200, 67, 0.3);
}

.btn-secondary {
  border: 1px solid #2b3440;
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
}

.btn-primary .label {
  position: relative;
  z-index: 2;
}

.btn-primary .btn-loader {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(17, 17, 17, 0.3);
  border-top-color: #111;
  transform: translateY(-50%);
  animation: spin 0.8s linear infinite;
  display: none;
  z-index: 2;
}

.btn-primary.loading {
  opacity: 0.95;
  pointer-events: none;
}

.btn-primary.loading .btn-loader {
  display: block;
}

.btn-primary.loading .label {
  padding-right: 26px;
}

.btn-primary .skid,
.btn-primary .smoke {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.btn-primary .skid::before,
.btn-primary .skid::after {
  content: '';
  position: absolute;
  width: 60%;
  height: 6px;
  background: rgba(15, 16, 20, 0.7);
  border-radius: 999px;
  left: -20%;
  transform: rotate(-18deg);
}

.btn-primary .skid::before {
  top: 30%;
}

.btn-primary .skid::after {
  top: 55%;
}

.btn-primary .smoke::before,
.btn-primary .smoke::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6), transparent 70%);
  border-radius: 50%;
  top: 40%;
  left: 55%;
}

.btn-primary .smoke::after {
  width: 18px;
  height: 18px;
  top: 60%;
  left: 60%;
}

.btn-primary.animate {
  animation: shake 0.3s linear 2;
}

.btn-primary.animate .skid {
  opacity: 1;
  animation: skid 0.7s ease-out;
}

.btn-primary.animate .smoke {
  opacity: 1;
  animation: smoke 0.8s ease-out;
}

@keyframes skid {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

@keyframes smoke {
  0% {
    transform: translateX(0) scale(0.6);
    opacity: 0;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: translateX(40px) scale(1.2);
    opacity: 0;
  }
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(2px); }
  50% { transform: translateX(-2px); }
  75% { transform: translateX(1px); }
  100% { transform: translateX(0); }
}

@keyframes spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

.feedback {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  display: none;
}

.feedback.show { display: block; }
.feedback.success { background: rgba(67, 209, 158, 0.12); color: var(--success); border: 1px solid rgba(67, 209, 158, 0.4); }
.feedback.error { background: rgba(255, 91, 91, 0.12); color: var(--danger); border: 1px solid rgba(255, 91, 91, 0.4); }

.swal2-popup {
  background: #161a20;
  color: var(--text);
  border: 1px solid #2a323d;
  border-radius: 16px;
}

.swal2-title {
  color: var(--text);
}

.swal2-html-container {
  color: var(--muted);
}

.swal2-styled.swal2-confirm {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #111;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 700;
}

.countdown {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  background: var(--panel-2);
  border-radius: 14px;
  border: 1px solid #2a323d;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.countdown-item {
  background: #10141a;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}

.countdown-item span {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.countdown-item small {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: #0f1217;
  border-right: 1px solid #232a34;
  padding: 22px 18px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: width 0.2s ease, transform 0.2s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Bebas Neue', Arial, sans-serif;
  font-size: 1.4rem;
  letter-spacing: 1px;
}

.sidebar-brand img {
  width: 48px;
  height: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-link {
  background: transparent;
  border: 1px solid #283240;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #3a4350;
  display: inline-block;
}

.nav-link.active {
  background: rgba(247, 200, 67, 0.18);
  color: var(--accent);
  border-color: rgba(247, 200, 67, 0.45);
}

.nav-link.active::before {
  background: var(--accent);
}

.sidebar-footer {
  margin-top: auto;
}

.admin-content {
  margin-left: 260px;
  width: calc(100% - 260px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid #232a34;
  background: rgba(11, 13, 16, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.menu-toggle {
  border: 1px solid #2b3440;
  background: #131821;
  color: var(--accent);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
}

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

.topbar-title .panel-title {
  font-size: 1.6rem;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 12, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 25;
}

body.sidebar-collapsed .sidebar {
  width: 84px;
}

body.sidebar-collapsed .sidebar .nav-label {
  display: none;
}

body.sidebar-collapsed .nav-link {
  justify-content: center;
  gap: 0;
}

body.sidebar-collapsed .nav-link::before {
  margin: 0;
}

body.sidebar-collapsed .sidebar-brand span {
  display: none;
}

body.sidebar-collapsed .sidebar-brand img {
  width: 36px;
}

body.sidebar-collapsed .admin-content {
  margin-left: 84px;
  width: calc(100% - 84px);
}

body.sidebar-open .sidebar {
  transform: translateX(0);
}

body.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.panel-shell {
  min-height: 100vh;
  padding: 32px 0 48px;
  font-size: 0.95rem;
}

.admin-body .container {
  width: 100%;
  max-width: 1120px;
  padding: 0 20px;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.panel-title {
  font-family: 'Bebas Neue', Arial, sans-serif;
  font-size: 1.9rem;
  letter-spacing: 1px;
  margin: 0;
}

.panel-actions {
  display: flex;
  gap: 12px;
}

.panel-shell input,
.panel-shell select,
.panel-shell textarea {
  padding: 10px 12px;
  font-size: 0.9rem;
}

.panel-shell .btn-primary,
.admin-topbar .btn-primary,
.material-item .btn-primary {
  padding: 10px 16px;
  font-size: 0.85rem;
  border-radius: 12px;
}

.panel-card {
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid #242b35;
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel-grid {
  display: grid;
  gap: 20px;
}

.stats-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 24px;
}

.stat-card {
  background: var(--panel);
  border-radius: 14px;
  border: 1px solid #242b35;
  padding: 16px;
  box-shadow: var(--shadow);
}

.stat-label {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: fixed;
}

.table th,
.table td {
  padding: 8px 6px;
  border-bottom: 1px solid #242b35;
  text-align: left;
  word-break: break-word;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.table td {
  color: #d7dce3;
}

.table-wrap {
  width: 100%;
}

.materiais-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.material-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #242b35;
  background: #10141a;
}

.material-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #161a20;
  border: 1px solid #2a323d;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.3s ease;
  z-index: 70;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 620px) {
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    flex-direction: column;
    align-items: flex-start;
  }
}

.icon-btn {
  border: 1px solid #2b3440;
  background: transparent;
  color: var(--accent);
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  line-height: 1;
}

.icon-btn.delete {
  color: #ff7b7b;
  border-color: rgba(255, 123, 123, 0.4);
}

.icon-btn + .icon-btn {
  margin-left: 6px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 11, 14, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 60;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #151a21;
  border-radius: 18px;
  border: 1px solid #2a313b;
  width: min(520px, 92vw);
  padding: 20px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
}

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

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.color-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-value {
  font-size: 0.85rem;
  color: var(--muted);
  border: 1px solid #2b3440;
  padding: 6px 10px;
  border-radius: 10px;
  background: #10141a;
  min-width: 90px;
  text-transform: uppercase;
}

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.nav-tab {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #283240;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab.active {
  background: rgba(247, 200, 67, 0.15);
  color: var(--accent);
  border-color: rgba(247, 200, 67, 0.4);
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.login-card {
  width: min(480px, 92vw);
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
  .hero-photo,
  .form-card {
    height: 100%;
  }
  .hero-photo img {
    height: 100%;
    object-fit: cover;
  }
  .field-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .panel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .countdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .admin-content {
    margin-left: 0;
    width: 100%;
  }
  .topbar-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .admin-body .container {
    padding: 0 16px;
  }
}
