@font-face {
  font-family: "Apple Garamond";
  src: local("Apple Garamond");
}

/* ---------- Global ---------- */
body {
  margin: 0;
  background: linear-gradient(120deg, #fdfdfd 0%, #f7f7f9 100%);
  color: #111;
  font-family: "Apple Garamond", serif;
}

/* ---------- Login ---------- */
.login-body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 20px;
}

.login-box {
  background: #ffffff;
  padding: 32px;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 14px;

  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Login header: logo + title */
.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 25px; /* slightly more space */
}

.login-logo {
  width: 160px;
  height: 160px;
  margin-bottom: 15px;
  border-radius: 20px; /* softer edges */
  box-shadow: 0 6px 12px rgba(0,0,0,0.08); /* subtle depth */
  border: 2px solid #e5e7eb; /* optional soft border */
  object-fit: cover; /* scale nicely */
}

.login-title {
  font-family: 'Apple Garamond', serif;
  font-size: 20px;
  font-weight: bold;
  color: #111;
  letter-spacing: 0.5px; /* subtle spacing */
  text-align: center;
  text-shadow: 0 1px 1px rgba(0,0,0,0.05); /* tiny depth */
}

/* Form inside login-box stacks vertically */
.login-box form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Inputs full width */
.login-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  font-size: 15px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.login-box input:focus {
  border-color: #d1d5db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06),
              0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Button full width, visually aligned */
.login-box button {
  width: 100%;
  cursor: pointer;
  background: #111;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  padding: 12px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background 0.2s ease;
}

.login-box button:hover {
  background: #333;
}

/* ---------- Top Bar ---------- */
.top-bar {
  height: 50px;
  padding: 0 20px;
  background: #ffffff;

  display: flex;
  justify-content: space-between;
  align-items: center;

  border-bottom: 1px solid #e5e7eb;

  font-family: "Apple Garamond", serif;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.separator {
  color: #aaa;
}

.logout {
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  color: #111;

  padding: 4px 8px;
  border-radius: 6px;
}

.logout:hover {
  background: #f3f4f6;
}

/* ---------- Search ---------- */
.search-area {
  height: 25vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.search-input {
  width: 75%;
  max-width: 820px;
  padding: 18px 22px;

  text-align: right;          /* text on the right */
  direction: rtl;             /* cursor starts on the right */

  font-size: 16px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  outline: none;
  background: #ffffff;

  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 2px 6px rgba(0, 0, 0, 0.06);

  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: #d1d5db;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ---------- Divider ---------- */
.divider {
  width: 80%;
  height: 1px;
  background: #e5e7eb;
  margin: 0 auto 30px auto;
}

/* ---------- Options ---------- */
.options {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.option {
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.option-link {
  text-decoration: none;
  color: #111;
}

.option-icon {
  margin-right: 10px;
  color: #4f46e5;
  font-size: 18px;
  vertical-align: middle;
}

/* ---------- Municipios grid ---------- */
.municipios-grid {
  padding: 40px;
  max-width: 1100px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.municipio-card {
  height: 80px;
  background: #ffffff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-family: "Apple Garamond", serif;  /* UPDATED FONT */
  font-size: 15px;
  text-align: center;

  border-radius: 12px;
  border: 1px solid #e5e7eb;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  cursor: pointer;
  transition: all 0.2s ease;

  text-decoration: none;  /* Remove underline */
  color: #111;
}

.municipio-card:hover {
  background: #f9fafb;
  transform: translateY(-2px);
}

/* ---------- CRUD Table ---------- */
.crud-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.crud-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.crud-table th,
.crud-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.crud-table th {
  background: #f9fafb;
  font-weight: 600;
}

.crud-table tr:hover {
  background: #f3f4f6;
}

.crud-actions {
  display: flex;
  gap: 8px;
}

.crud-actions a {
  padding: 4px 8px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  color: #111;
  background: #f9fafb;
  transition: all 0.2s ease;
}

.crud-actions a:hover {
  background: #e5e7eb;
}

/* ---------- Pagination ---------- */
.pagination {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pagination button {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pagination button:hover {
  background: #f3f4f6;
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Login header: logo + title */
.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 25px; /* slightly more space */
  position: relative; /* needed for overlay */
}

.login-logo-container {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 15px;
  border-radius: 20px;
  overflow: hidden; /* clip overlay to shape */
  box-shadow: 0 6px 12px rgba(0,0,0,0.08);
  border: 2px solid #e5e7eb;
}

.login-logo-container img.login-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Blue overlay: slightly lighter & semi-transparent */
.login-logo-container::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(173, 216, 230, 0.3); /* light blue, 30% opacity */
  pointer-events: none;
}
