/* ===================================================
   mmMediar - Estilos Principais
   =================================================== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --primary:       #0d1b4b;
  --primary-light: #1a2e7a;
  --accent:        #2563eb;
  --accent-hover:  #1d4ed8;
  --green:         #166534;
  --green-light:   #22c55e;
  --sidebar-bg:    #0d1b4b;
  --sidebar-text:  rgba(255,255,255,0.80);
  --sidebar-hover: rgba(255,255,255,0.12);
  --sidebar-active:#2563eb;
  --body-bg:       #f0f4f8;
  --card-bg:       #ffffff;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --border:        #e2e8f0;
  --shadow:        0 2px 16px rgba(13,27,75,0.10);
  --radius:        12px;
  --font-main:     'Nunito', sans-serif;
  --font-display:  'Playfair Display', serif;
}

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

body {
  font-family: var(--font-main);
  background: var(--body-bg);
  color: var(--text);
  min-height: 100vh;
}

/* ---- AUTH ---- */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #e8edf8 0%, #f5f7ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(13,27,75,0.13);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 1.8rem;
}
.auth-logo img { height: 80px; }
.auth-logo .brand-text {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--primary);
  display: block;
  margin-top: 0.3rem;
}

.auth-card h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.auth-card .subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.form-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.62rem 0.9rem;
  font-size: 0.93rem;
  font-family: var(--font-main);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.13);
  outline: none;
}

.btn-primary-mm {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.72rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.02em;
}
.btn-primary-mm:hover { background: var(--primary-light); }
.btn-primary-mm:active { transform: scale(0.98); }

.btn-outline-mm {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 0.62rem 1.2rem;
  font-size: 0.93rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-outline-mm:hover { background: var(--primary); color: #fff; }

/* Tipo cards no cadastro */
.tipo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.7rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.98rem;
  color: #fff;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
}
.tipo-card:hover { transform: translateY(-2px); opacity: 0.93; color: #fff; }
.tipo-card.cliente  { background: var(--green); }
.tipo-card.parceiro { background: var(--primary); }
.tipo-card.mediador { background: var(--primary-light); }
.tipo-card .icon-btn {
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

/* Progress bar */
.step-indicator {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.progress-bar-mm {
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar-mm .fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.4s;
}

/* ---- SIDEBAR LAYOUT ---- */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  min-height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: transform 0.3s;
}
.sidebar-logo {
  padding: 1.5rem 1.3rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}
.sidebar-logo .brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: #fff;
  display: block;
}
.sidebar-logo .role-badge {
  font-size: 0.72rem;
  background: var(--accent);
  color: #fff;
  border-radius: 99px;
  padding: 0.15rem 0.6rem;
  display: inline-block;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-nav { flex: 1; padding: 1rem 0; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.3rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 0;
  transition: background 0.2s, color 0.2s;
}
.sidebar-nav a:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.sidebar-nav a.active {
  background: var(--sidebar-active);
  color: #fff;
  border-right: 3px solid var(--green-light);
}
.sidebar-nav a i { font-size: 1rem; width: 1.2rem; text-align: center; }
.sidebar-footer {
  padding: 1rem 1.3rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.87rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.sidebar-footer a:hover { color: #fff; }

.main-content {
  margin-left: 250px;
  flex: 1;
  padding: 0;
}

.topbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.topbar-title { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.topbar-user  { font-size: 0.87rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; }
.topbar-user .avatar {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.9rem;
}

.page-body { padding: 1.8rem; }

/* ---- CARDS ---- */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-card .stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.stat-card .stat-num  { font-size: 1.8rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-card .stat-label{ font-size: 0.82rem; color: var(--text-muted); margin-top: 0.1rem; }

.card-mm {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-mm .card-header-mm {
  padding: 1rem 1.3rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-mm .card-header-mm h5 { font-weight: 700; font-size: 0.98rem; margin: 0; }
.card-mm .card-body-mm { padding: 1.2rem 1.3rem; }

/* ---- TABLE ---- */
.table-mm { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.table-mm th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}
.table-mm td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table-mm tr:last-child td { border-bottom: none; }
.table-mm tr:hover td { background: #f8fafc; }

/* Badges */
.badge-mm {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-cliente  { background: #dcfce7; color: #166534; }
.badge-mediador { background: #dbeafe; color: #1e40af; }
.badge-parceiro { background: #fef9c3; color: #854d0e; }
.badge-admin    { background: #f3e8ff; color: #7e22ce; }
.badge-aguardando   { background: #fef3c7; color: #92400e; }
.badge-em_andamento { background: #dbeafe; color: #1e40af; }
.badge-concluido    { background: #dcfce7; color: #166534; }
.badge-cancelado    { background: #fee2e2; color: #991b1b; }

/* Alert */
.alert-mm {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.alert-success { background: #dcfce7; color: #166534; border-left: 4px solid #22c55e; }
.alert-danger   { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
.alert-warning  { background: #fef3c7; color: #92400e; border-left: 4px solid #f59e0b; }

/* Btn helpers */
.btn-sm-mm {
  padding: 0.3rem 0.7rem;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}
.btn-sm-mm:hover { opacity: 0.82; }
.btn-danger-sm  { background: #fee2e2; color: #991b1b; }
.btn-success-sm { background: #dcfce7; color: #166534; }
.btn-primary-sm { background: #dbeafe; color: #1e40af; }

/* Mobile sidebar */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar { padding: 0.8rem 1rem; }
  .page-body { padding: 1rem; }
}
