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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0b0f19;
  color: #e2e8f0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  border-bottom: 1px solid #1e293b;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

nav a {
  color: rgba(226,232,240,0.7);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: #f8fafc;
}

.container {
  max-width: 960px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

.card {
  background: #151b2b;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  border: 1px solid #1e293b;
}

.card h2 {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  color: #f8fafc;
  font-weight: 700;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

input[type="text"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #1e293b;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #0f1525;
  color: #e2e8f0;
  transition: all 0.2s;
  outline: none;
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: #475569;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
  border-color: #3b82f6;
  background: #0f1525;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

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

.preview-wrap {
  margin: 1rem 0 1.5rem;
}

.preview-wrap img {
  max-width: 260px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  background: #1e293b;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.35);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(220,38,38,0.35);
}

.btn-secondary {
  background: #334155;
  color: #e2e8f0;
}

.btn-secondary:hover {
  background: #475569;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  border-radius: 8px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #1e293b;
}

th {
  background: #0f1525;
  font-weight: 600;
  color: #94a3b8;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tr:hover td {
  background: #1a2236;
}

tbody tr:last-child td {
  border-bottom: none;
}

.img-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  background: #1e293b;
}

/* Painel */
.painel-body {
  background: #0b0f19;
}

.painel-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.painel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.imovel-card {
  background: #151b2b;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid #1e293b;
}

.imovel-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  border-color: #334155;
}

.imovel-img-wrap {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #0f1525;
}

.imovel-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.imovel-card:hover .imovel-img-wrap img {
  transform: scale(1.05);
}

.imovel-body {
  padding: 1.4rem;
}

.imovel-desc {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.65;
  white-space: pre-line;
  margin: 0;
}

.imovel-desc.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.toggle-btn {
  margin-top: 0.8rem;
  background: none;
  border: none;
  color: #60a5fa;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0;
  letter-spacing: 0.2px;
}

.toggle-btn:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.painel-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 2rem;
  color: #64748b;
  font-size: 1.1rem;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-vendido {
  background: #14532d;
  color: #86efac;
}

.badge-nao-vendido {
  background: #7c2d12;
  color: #fdba74;
}

.acoes {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
}

.btn-icon-edit {
  color: #60a5fa;
  background: rgba(59,130,246,0.1);
}

.btn-icon-edit:hover {
  background: rgba(59,130,246,0.2);
  transform: translateY(-1px);
}

.btn-icon-del {
  color: #f87171;
  background: rgba(239,68,68,0.1);
}

.btn-icon-del:hover {
  background: rgba(239,68,68,0.2);
  transform: translateY(-1px);
}
