.app {
  display: flex;
  min-height: calc(100vh - 40px);
}

.mobile-topbar {
  display: none;
}

.mobile-menu-backdrop {
  display: none;
}

.sidebar {
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, #182536 0%, #15202f 100%);
  color: white;
  padding: 14px 12px;
  box-shadow: var(--shadow-soft);
  border-right: 1px solid var(--brand-a15);
}

.sidebar-region {
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-region--tutors {
  background: linear-gradient(180deg, rgba(42, 62, 83, 0.96), rgba(30, 47, 66, 0.98));
}

.sidebar-region--landlords {
  background: linear-gradient(180deg, rgba(48, 71, 96, 0.96), rgba(35, 57, 80, 0.98));
}

.sidebar-region--support {
  background: linear-gradient(180deg, rgba(31, 56, 74, 0.96), rgba(23, 43, 59, 0.98));
  margin-top: auto;
}

.sidebar-region-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  color: rgba(255, 247, 234, 0.9);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-region-icon {
  flex: 0 0 auto;
  color: var(--brand-primary);
}

.menu-btn {
  width: 100%;
  margin-top: 8px;
  min-height: 44px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: hsl(40 33% 97%);
  font-size: calc(0.92rem - 1pt);
  font-weight: 650;
  line-height: 1.35;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.sidebar-region > .menu-btn:first-of-type {
  margin-top: 0;
}

.menu-btn:hover {
  background: var(--brand-a16);
  border-color: var(--brand-a32);
}

.menu-btn.active {
  background: var(--brand-a24);
  border-color: var(--brand-a48);
  box-shadow: inset 0 0 0 1px var(--brand-a30);
  color: #fff;
}

.main-content {
  flex: 1;
  padding: 16px;
  background: transparent;
}

.view h1,
.view h2 {
  margin-top: 0;
  letter-spacing: -0.02em;
}

/* Modal Termos */
.modal {
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: var(--panel);
  margin: 40px auto;
  padding: 20px;
  max-width: 760px;
  border-radius: var(--radius);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.app-dialog-content {
  max-width: 520px;
  margin-top: 12vh;
  padding: 0;
  overflow: hidden;
}

.app-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(243, 247, 252, 0.95), rgba(255, 255, 255, 0.9));
}

.app-dialog-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.app-dialog-close {
  float: none;
  border: 0;
  background: transparent;
  width: 32px;
  height: 32px;
  line-height: 1;
  border-radius: 10px;
  color: var(--muted);
}

.app-dialog-close:hover {
  background: var(--panel-strong);
  color: var(--text);
}

.app-dialog-body {
  padding: 16px 18px 8px;
  color: var(--text);
  line-height: 1.45;
  white-space: pre-wrap;
  max-height: min(60vh, 520px);
  overflow-y: auto;
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
}

.app-dialog-actions button {
  min-width: 160px;
  width: 160px;
}

.app-dialog-actions .btn-primary-action,
.app-dialog-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 18px;
  margin-top: 0;
  line-height: 1.2;
  border: 1px solid var(--accent-outline);
  font-size: 0.95rem;
  font-weight: 700;
}

.app-dialog-actions .btn-primary-action {
  border: 0;
}

.app-dialog-actions .btn-secondary {
  background: #fff;
  color: var(--accent);
}

.app-dialog-actions .btn-secondary:hover {
  background: var(--accent-hover-bg);
  color: var(--accent);
}

.app-dialog-actions .app-dialog-confirm-danger {
  background: #fff;
  color: #9f2a2a;
  border: 1px solid rgba(214, 58, 58, 0.65);
  box-shadow: none;
}

.app-dialog-actions .app-dialog-confirm-danger:hover {
  background: rgba(214, 58, 58, 0.08);
  color: #8b1f1f;
}

.app-dialog-content[data-variant="danger"] .app-dialog-header {
  background: linear-gradient(180deg, rgba(255, 241, 241, 0.95), rgba(255, 255, 255, 0.9));
}

.app-dialog-content[data-variant="danger"] .app-dialog-title {
  color: #8b1f1f;
}

.app-dialog-content[data-variant="danger"] .app-dialog-actions {
  justify-content: center;
}

.app-dialog-content[data-actions-align="center"] .app-dialog-actions {
  justify-content: center;
}

.close-btn {
  float: right;
  font-size: 24px;
  cursor: pointer;
}

.termos-text {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-help-link {
  margin-top: 10px;
  font-size: 0.9rem;
  text-align: right;
}

#loginScreen a,
#signupScreen a,
#forgotPasswordScreen a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

#loginScreen a:hover,
#signupScreen a:hover,
#forgotPasswordScreen a:hover {
  color: var(--accent-strong);
}

#linkResendVerification {
  font-size: 0.82rem;
  text-decoration-thickness: 1px;
}

.terms-body p {
  line-height: 1.5;
  margin: 12px 0;
}

.terms-modal-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.terms-modal-actions button {
  width: auto;
  min-width: 160px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
}
