:root {
  --bg: #050505;
  --text: #ffffff;
  --muted: rgba(255,255,255,.58);
  --card: #101010;
  --border: rgba(255,255,255,.10);
  --danger: #b54545;
  --ok: #4f9b67;
  --shadow: 0 30px 80px rgba(0,0,0,.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.08), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

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

/* TOPO */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0,0,0,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 1120px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
}

.brand-logo img {
  width: 72px;
  height: auto;
  display: block;
  filter: brightness(1.08);
}

.menu {
  display: flex;
  gap: 28px;
}

.menu a {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: .84;
  transition: .25s ease;
}

.menu a:hover {
  opacity: 1;
}

/* HERO */

.hero {
  min-height: 200px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 70px 20px;
  background:
    linear-gradient(rgba(0,0,0,.68), rgba(0,0,0,.82)),
    radial-gradient(circle at top, rgba(255,255,255,.07), transparent 34%);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 9vw, 104px);
  font-weight: 500;
  letter-spacing: 1px;
  margin: 0;
}

.hero p {
  margin: 18px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* LAYOUT */

.wrap {
  max-width: 1120px;
  margin: auto;
  padding: 42px 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 14px;
}

.form {
  display: grid;
  gap: 14px;
  max-width: 560px;
  margin: auto;
}

.input,
textarea,
select {
  width: 100%;
  background: #0a0a0a;
  color: #fff;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px;
  padding: 14px 18px;
  font: 500 14px Arial, Helvetica, sans-serif;
}

.input::placeholder,
textarea::placeholder {
  color: rgba(255,255,255,.42);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* UPLOAD */

.upload-box {
  width: 100%;
  min-height: 180px;
  border: 1px dashed rgba(255,255,255,.45);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  background: rgba(255,255,255,.02);
  transition: .25s ease;
  text-align: center;
  padding: 24px;
}

.upload-box:hover {
  background: rgba(255,255,255,.05);
  border-color: #fff;
  transform: translateY(-2px);
}

.upload-box input {
  display: none;
}

.upload-icon {
  font-size: 42px;
}

.upload-box strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.upload-box small {
  color: var(--muted);
}

/* BOTÕES */

.btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg,#fff,#dedede);
  color: #050505;
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  transition: .25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(255,255,255,.12);
}

.btn.full {
  width: 100%;
}

.btn.secondary {
  background: #161616;
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
}

.btn.danger {
  background: var(--danger);
  color: #fff;
}

.btn.ok {
  background: var(--ok);
  color: #fff;
}

/* GALERIA / ADMIN */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
  gap: 18px;
}

.photo {
  overflow: hidden;
  border-radius: 20px;
  background: #111;
  border: 1px solid var(--border);
}

.photo img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.photo-info {
  padding: 14px;
}

.photo-info b {
  display: block;
  font-size: 15px;
  letter-spacing: .5px;
}

.photo-info small {
  color: var(--muted);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.actions .btn {
  width: 100%;
}

.status {
  color: var(--muted);
  margin: 12px 0;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px;
  background: rgba(255,255,255,.03);
  border: 1px dashed rgba(255,255,255,.1);
  border-radius: 18px;
}

.admin-top {
  display:grid;
  grid-template-columns:280px 1fr;
  gap:22px;
  margin-bottom:22px;
  align-items:start;
}

.admin-top .card {
  height:100%;
}

.admin-content {
  display: grid;
  gap: 22px;
}

.admin-content > .card {
  width: 100%;
}

.side {
  position: sticky;
  top: 88px;
  align-self: start;
}

.hidden {
  display: none !important;
}

/* PAINEL LED */

.panel-body {
  margin: 0;
  background: #000;
  color: #fff;
  overflow: hidden;
}

.led-stage {
  width: 100vw;
  height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  background: #000;
}

.led-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .9s ease;
}

.led-slide.active {
  opacity: 1;
}

.led-slide img {
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.led-caption {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.48);
  backdrop-filter: blur(8px);
  padding: 14px 24px;
  border-radius: 999px;
  text-align: center;
}

/* CROP */

.crop-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.crop-modal.hidden {
  display: none;
}

.crop-box {
  width: min(920px, 96vw);
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 30px 90px rgba(0,0,0,.65);
}

.crop-box h2 {
  margin: 0 0 8px;
  color: #fff;
}

.crop-box p {
  color: var(--muted);
  margin-bottom: 18px;
}

.crop-area {
  width: 100%;
  max-height: 65vh;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
}

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

.crop-actions {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* LIGHTBOX */

.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.photo-modal.hidden {
  display: none;
}

.photo-modal img {
  max-width: 94vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0,0,0,.7);
}

.photo-modal-close {
  position: fixed;
  top: 24px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

/* ARMAZENAMENTO */

.storage {
  margin-top: 16px;
}

.storage-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  color: rgba(255,255,255,.72);
}

.storage-bar {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  margin-bottom: 22px;
}

#storageBarFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,#fff,#bdbdbd);
  transition: .35s ease;
}

.storage-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 14px;
}

.storage-grid div {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
}

.storage-grid strong {
  display: block;
  font-size: 24px;
}

.storage-grid small {
  color: rgba(255,255,255,.55);
}

/* MOBILE */

@media (max-width: 760px) {

  .nav {
    justify-content: center;
  }

  .menu {
    display: none;
  }

  .brand-logo img {
    width: 58px;
  }

  .hero {
    min-height: 240px;
    padding: 52px 18px;
  }

  .hero h1 {
    font-size: clamp(42px, 15vw, 72px);
  }

  .hero p {
    font-size: 11px;
    letter-spacing: 2.4px;
  }

  .wrap {
    padding: 28px 14px;
  }

  .card {
    padding: 18px;
    border-radius: 22px;
  }

  .admin-top {
    grid-template-columns:1fr;
  }

  .side {
    position: static;
  }

  .grid {
    grid-template-columns: repeat(auto-fill,minmax(150px,1fr));
    gap: 12px;
  }

  .photo img {
    height: 190px;
  }

  .btn {
    font-size: 11px;
    letter-spacing: 1.2px;
    padding: 13px 18px;
  }

  .storage-grid {
    grid-template-columns: 1fr;
  }

  .storage-top {
    flex-direction: column;
  }

  .crop-actions {
    grid-template-columns: 1fr;
  }
}

.config-form{
  max-width:760px !important;
  margin:0 auto;
}

.panel-choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
  cursor: pointer;
}

.panel-choice input {
  margin-top: 4px;
  accent-color: #fff;
}

.panel-choice strong {
  display: block;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.panel-choice small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.4;
}

.photo-destination{
  margin-top:10px;
  font-size:11px;
  letter-spacing:1px;
  text-transform:uppercase;
  color:rgba(255,255,255,.55);
}

.panel-choice input[type="checkbox"]{
  appearance:none;
  -webkit-appearance:none;

  width:22px;
  height:22px;
  min-width:22px;

  border-radius:6px;
  border:2px solid rgba(255,255,255,.45);

  background:#0f0f0f;
  cursor:pointer;

  position:relative;
  transition:.2s ease;
}

.panel-choice input[type="checkbox"]:checked{
  background:#fff;
  border-color:#fff;
}

.panel-choice input[type="checkbox"]:checked::after{
  content:"";
  position:absolute;

  left:6px;
  top:2px;

  width:5px;
  height:10px;

  border:solid #000;
  border-width:0 2px 2px 0;

  transform:rotate(45deg);
}

.menu a:last-child{
  opacity:.7;
}

.menu a:last-child:hover{
  opacity:1;
}