* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background-color: #f4f4f4;
}

/* NAVBAR */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2633aa;
  color: white;
  padding: 0 20px;
  height: 60px;
  position: relative;
}

.logo {
  font-family: 'Michroma', sans-serif;
  font-size: 20px;
  letter-spacing: 2px;
}

.icon-btn {
  background: none;
  border: none;
  color: rgb(255, 255, 255);
  font-size: 22px;
  cursor: pointer;
}

/* SIDEBAR */

/* SIDEBAR */

.sidebar {
  position: fixed;
  left: -250px;
  top: 60px; /* começa abaixo da navbar */
  width: 250px;
  height: calc(100% - 60px); /* altura total menos navbar */
  background: #1d2679;
  color: white;
  padding: 20px;
  transition: left 0.3s ease;
  z-index: 999;
}

.sidebar.open {
  left: 0;
}

.sidebar ul {
  list-style: none;
  margin-top: 20px;
}

.sidebar li {
  margin: 10px 0;
}

.sidebar a {
  color: white;
  text-decoration: none;
}

/* CONTENT */

.content {
  padding: 20px;
  margin-top: 60px;
}

/* AVATAR */

.avatar-container {
  position: relative;
}

.avatar-btn {
  background: none;
  border: none;
  cursor: pointer;
}

/* Estrutura base */
.avatar-icon {
  width: 36px;
  height: 36px;
  border: 2px solid white;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Quando tiver imagem */
.avatar-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Avatar outline (modo deslogado) */
.avatar-icon.default::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid white;
  border-radius: 50%;
  position: absolute;
  top: 3px;
}

.avatar-icon.default::after {
  content: "";
  width: 18px;
  height: 10px;
  border: 2px solid white;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  position: absolute;
  bottom: 3px;
}

/* USER DRAWER */

.user-drawer {
  position: absolute;
  right: 0;
  top: 50px;
  width: 200px;
  background: white;
  color: black;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  padding: 10px;
  display: none;
  flex-direction: column;
  gap: 10px;
}

.user-drawer.open {
  display: flex;
}

.user-drawer button {
  padding: 8px;
  border: none;
  background: #111;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.user-drawer button:hover {
  opacity: 0.8;
}

.username {
  font-weight: bold;
  margin-bottom: 5px;
}

/* LOGIN PAGE */

.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 60px);
}

.login-card {
  background: white;
  padding: 40px;
  border-radius: 12px;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.login-card h2 {
  text-align: center;
}

.login-card input {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.login-card button {
  padding: 10px;
  border: none;
  background: #111;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

.error-msg {
  color: red;
  font-size: 14px;
  text-align: center;
}

/* ADMIN GRID */

.admin-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.user-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.user-info {
  font-size: 14px;
}

.user-card button {
  padding: 8px;
  border: none;
  background: #111;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-content {
  background: #2633aa;
  color: white;
  padding: 25px;
  border-radius: 20px;
  width: 80%;
  max-height: 80vh;
  overflow-y: auto;
}

.close-btn {
  float: right;
  background: red;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 8px;
}

.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.car-card {
  background: #1d2679;
  padding: 15px;
  border-radius: 15px;
}

.car-photo {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* ========================= */
/* CLIENT AREA */
/* ========================= */

.content {
  padding: 30px;
  margin-top: 80px;
}

.content h1 {
  margin-bottom: 25px;
}

.content section {
  margin-bottom: 40px;
}

/* PERFIL */

.perfil-section {
  background: #111;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #222;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.perfil-section h2 {
  margin: 0;
}

.perfil-section button {
  background: #00bcd4;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}

.perfil-section button:hover {
  background: #0097a7;
}

/* GRID DE CARROS */

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* CARD */

.user-card {
  background: #111;
  border: 1px solid #222;
  border-radius: 16px;
  padding: 15px;
  transition: 0.2s ease;
}

.user-card:hover {
  transform: translateY(-5px);
  border-color: #00bcd4;
}

.user-photo {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
}

.user-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.user-info {
  font-size: 14px;
  margin-bottom: 10px;
  color: #aaa;
}

.user-card button {
  width: 100%;
  padding: 8px;
  background: #00bcd4;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}

.user-card button:hover {
  background: #0097a7;
}

/* BOTÃO + */

.add-btn {
  background: #00bcd4;
  border: none;
  font-size: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  margin-bottom: 20px;
  transition: 0.2s;
}

.add-btn:hover {
  background: #0097a7;
  transform: rotate(90deg);
}

/* ========================= */
/* CLIENT AREA */
/* ========================= */

.content {
  padding: 30px;
  margin-top: 80px;
}

.content h1 {
  margin-bottom: 25px;
}

.content section {
  margin-bottom: 40px;
}

/* PERFIL */

.perfil-section {
  background: #2633aa;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #1a1f5c;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.perfil-section h2 {
  margin: 0;
}

.perfil-section button {
  background: #1d2679;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
  color: white;
}

.perfil-section button:hover {
  filter: brightness(1.2);
}

/* GRID DE CARROS */

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* CARD */

.user-card {
  background: #2633aa;
  border: 1px solid #1a1f5c;
  border-radius: 16px;
  padding: 15px;
  transition: 0.2s ease;
}

.user-card:hover {
  transform: translateY(-5px);
  border-color: #1d2679;
}

.user-photo {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
}

.user-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.user-info {
  font-size: 14px;
  margin-bottom: 10px;
  color: #e0e0ff;
}

.user-card button {
  width: 100%;
  padding: 8px;
  background: #1d2679;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
  color: white;
}

.user-card button:hover {
  filter: brightness(1.2);
}

/* BOTÃO + */

.add-btn {
  background: #1d2679;
  border: none;
  font-size: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  margin-bottom: 20px;
  transition: 0.2s;
  color: white;
}

.add-btn:hover {
  filter: brightness(1.2);
  transform: rotate(90deg);
}

/* ========================= */
/* MODAL */
/* ========================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  position: relative;
  background: #2633aa;
  padding: 25px;
  border-radius: 16px;
  width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #1a1f5c;
}

.modal-content h2 {
  margin-top: 0;
}

.modal-content input,
.modal-content select {
  width: 100%;
  padding: 8px;
  margin: 6px 0 12px;
  background: #fff;
  border: 1px solid #151a5c;
  border-radius: 8px;
  color: rgb(0, 0, 0);
}

.modal-content button {
  width: 100%;
  padding: 10px;
  background: #1d2679;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
  color: white;
}

.modal-content button:hover {
  filter: brightness(1.2);
}

/* BOTÃO FECHAR PEQUENO NO CANTO */

.close-btn {
  position: absolute;

  top: 8px;
  right: 8px;

  width: 26px !important;
  height: 26px !important;

  background: red !important;
  border: none !important;
  border-radius: 6px;

  color: white !important;
  font-size: 14px;
  font-weight: bold;

  padding: 0 !important;
  line-height: 26px;
  text-align: center;

  cursor: pointer;
}