:root{
  --bg:#09090c;
  --bg2:#0f0f15;
  --card:#15151d;
  --card2:#1a1a23;
  --text:#f6f6f8;
  --muted:#a7a7b2;
  --faint:#747480;
  --line:rgba(255,255,255,.09);
  --line2:rgba(255,255,255,.14);
  --accent:#b86cff;
  --accent2:#ff5aa7;
  --ok:#66d59a;
  --warn:#f3c86c;
  --danger:#ff7f91;
  --max:1180px;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  background:
    radial-gradient(circle at 12% 0,rgba(184,108,255,.10),transparent 28%),
    var(--bg);
  color:var(--text);
  font-family:Arial,Helvetica,sans-serif;
  line-height:1.5
}

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

button,input,textarea,select{font:inherit}

.shell{
  width:min(var(--max),calc(100% - 30px));
  margin:auto
}

.app-header{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(9,9,12,.94);
  backdrop-filter:blur(16px);
  border-bottom:1px solid var(--line)
}

.header-row{
  min-height:70px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
  font-weight:900
}

.brand-mark{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:linear-gradient(135deg,var(--accent),var(--accent2))
}

.brand-name{font-size:17px}

.desktop-nav{
  display:flex;
  align-items:center;
  gap:24px;
  color:#b8b8c2;
  font-size:13px;
  font-weight:800
}

.desktop-nav a{
  padding:25px 0 22px;
  border-bottom:2px solid transparent
}

.desktop-nav a:hover,
.desktop-nav a.active{
  color:#fff;
  border-color:var(--accent)
}

.header-actions{
  display:flex;
  align-items:center;
  gap:10px
}

.profile-pill{
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--line);
  border-radius:999px;
  padding:5px 12px 5px 5px;
  font-size:12px;
  font-weight:800
}

.mini-avatar,
.avatar,
.avatar-big{
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  color:#fff;
  font-weight:900
}

.mini-avatar{
  width:30px;height:30px;border-radius:50%
}

.avatar{
  width:52px;height:52px;border-radius:50%
}

.avatar-big{
  width:120px;height:120px;border-radius:50%;
  font-size:48px
}

.logout-link{
  color:var(--muted);
  font-size:12px
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 18px;
  border:1px solid transparent;
  border-radius:13px;
  font-weight:800;
  cursor:pointer;
  color:#fff;
  background:none
}

.btn.small{min-height:38px;padding:0 13px;font-size:13px}

.btn.primary{
  background:linear-gradient(135deg,var(--accent),var(--accent2))
}

.btn.ghost{
  border-color:var(--line);
  background:rgba(255,255,255,.02)
}

.btn:hover{transform:translateY(-1px)}

.page{
  padding:38px 0 80px;
  min-height:calc(100vh - 140px)
}

.hero-card{
  border:1px solid var(--line);
  border-radius:24px;
  padding:32px;
  background:
    linear-gradient(145deg,rgba(184,108,255,.10),rgba(255,90,167,.03)),
    var(--card)
}

.eyebrow{
  display:inline-flex;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  color:#dabaff;
  font-size:12px;
  font-weight:900
}

h1,h2,h3{letter-spacing:-.035em}

h1{
  margin:14px 0;
  font-size:48px;
  line-height:1.03
}

h2{font-size:28px;margin:0 0 10px}

h3{margin:0 0 8px}

.lead,.muted{color:var(--muted)}

.lead{font-size:17px}

.card{
  border:1px solid var(--line);
  border-radius:19px;
  padding:23px;
  background:var(--card)
}

.card+.card{margin-top:14px}

.alert{
  border:1px solid var(--line);
  border-radius:12px;
  padding:13px 14px;
  margin-top:10px
}

.alert.sucesso{color:#b8f0d0;background:rgba(102,213,154,.08)}
.alert.erro{color:#ffc0c8;background:rgba(255,127,145,.08)}
.alert.aviso{color:#f5dfa3;background:rgba(243,200,108,.08)}

.flash-wrap{padding-top:10px}

.form-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px
}

.field{margin-bottom:14px}

label{
  display:block;
  margin-bottom:7px;
  font-size:13px;
  font-weight:800
}

input,textarea,select{
  width:100%;
  border:1px solid var(--line);
  border-radius:12px;
  padding:13px 14px;
  outline:none;
  background:#0e0e14;
  color:#fff
}

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

input:focus,textarea:focus,select:focus{
  border-color:rgba(184,108,255,.60);
  box-shadow:0 0 0 3px rgba(184,108,255,.08)
}

.app-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin-top:16px
}

.app-card{
  min-height:170px;
  border:1px solid var(--line);
  border-radius:18px;
  padding:22px;
  background:var(--card);
  transition:.15s ease
}

.app-card:hover{
  border-color:rgba(184,108,255,.42);
  background:var(--card2);
  transform:translateY(-2px)
}

.app-card .app-icon{
  font-size:26px;
  margin-bottom:22px
}

.app-card strong{
  display:block;
  font-size:18px
}

.app-card p{
  margin:7px 0 0;
  color:var(--muted);
  font-size:13px
}

.dashboard-grid{
  display:grid;
  grid-template-columns:1.45fr .55fr;
  gap:18px;
  margin-top:18px
}

.stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:16px
}

.stat{
  border:1px solid var(--line);
  border-radius:16px;
  padding:17px;
  background:var(--card)
}

.stat small{
  display:block;
  color:var(--muted);
  margin-bottom:5px
}

.stat strong{
  font-size:22px
}

.discover-wrap{
  max-width:530px;
  margin:auto
}

.discover-card{
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:28px;
  background:var(--card);
  box-shadow:0 25px 70px rgba(0,0,0,.26)
}

.discover-visual{
  height:330px;
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at 70% 15%,rgba(255,90,167,.28),transparent 26%),
    linear-gradient(145deg,#3b2848,#17131c)
}

.discover-info{padding:24px}

.discover-info h2{font-size:34px}

.discover-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  padding:0 24px 24px
}

.discover-actions form,
.discover-actions button{width:100%}

.filters{
  display:grid;
  grid-template-columns:1fr 190px auto;
  gap:10px;
  margin-bottom:18px
}

.match-list{display:grid;gap:12px}

.match-row{
  display:grid;
  grid-template-columns:55px 1fr auto;
  gap:14px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  background:var(--card)
}

.two-col{
  display:grid;
  grid-template-columns:1.35fr .65fr;
  gap:18px;
  align-items:start
}

.post{
  margin-bottom:13px;
  padding:20px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--card)
}

.post-head{
  display:flex;
  align-items:center;
  gap:11px
}

.post-meta{
  color:var(--muted);
  font-size:12px
}

.post-text{
  margin:16px 0;
  white-space:pre-wrap
}

.post-actions{
  border-top:1px solid var(--line);
  padding-top:11px;
  color:var(--muted);
  font-size:13px
}

.chat{
  min-height:400px;
  max-height:58vh;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:8px
}

.bubble{
  max-width:75%;
  border:1px solid var(--line);
  border-radius:16px;
  padding:11px 13px;
  background:var(--card2)
}

.bubble.mine{
  align-self:flex-end;
  background:rgba(184,108,255,.14);
  border-color:rgba(184,108,255,.25)
}

.bubble small{
  display:block;
  color:var(--muted);
  margin-top:4px
}

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

.event-card,
.house{
  border:1px solid var(--line);
  border-radius:17px;
  padding:20px;
  background:var(--card)
}

.house:hover,.event-card:hover{
  border-color:rgba(184,108,255,.35)
}

.badge{
  display:inline-flex;
  padding:5px 8px;
  border:1px solid var(--line);
  border-radius:999px;
  font-size:11px;
  font-weight:900
}

.badge.claimed{color:#b8f0d0}
.badge.review{color:#dabbff}

.empty{
  border:1px dashed var(--line);
  border-radius:18px;
  padding:36px;
  text-align:center;
  color:var(--muted)
}

.secondary-link{
  color:var(--faint);
  text-decoration:underline;
  font-size:12px
}

.mobile-bottom-nav{display:none}

.app-footer{
  border-top:1px solid var(--line);
  padding:24px 0;
  color:#71717c;
  font-size:12px
}

.footer-row{
  display:flex;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap
}

@media(max-width:1050px){
  .desktop-nav{display:none}
  .app-grid{grid-template-columns:repeat(2,1fr)}
  .dashboard-grid{grid-template-columns:1fr}
}

@media(max-width:800px){
  .two-col{grid-template-columns:1fr}
  .event-grid,.house-grid{grid-template-columns:1fr 1fr}
  .filters{grid-template-columns:1fr}
}

@media(max-width:680px){
  body{padding-bottom:68px}
  .brand-name{display:none}
  .profile-pill span:last-child{display:none}
  .logout-link{display:none}
  h1{font-size:40px}
  .app-grid,.stats,.event-grid,.house-grid{grid-template-columns:1fr}
  .mobile-bottom-nav{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:150;
    display:grid;
    grid-template-columns:repeat(5,1fr);
    background:rgba(11,11,15,.97);
    border-top:1px solid var(--line);
    backdrop-filter:blur(15px)
  }
  .mobile-bottom-nav a{
    min-height:64px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    color:#8e8e99
  }
  .mobile-bottom-nav a.active{color:#fff}
  .mobile-bottom-nav span{font-size:20px}
  .mobile-bottom-nav small{font-size:9px}
}
