.admin-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', 'Arial', sans-serif;
}

.footer__admin-btn {
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.2s;
}

.footer__admin-btn:hover {
  color: var(--red);
}

.admin-overlay.hidden {
  display: none;
}

.admin-login {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  width: 380px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.admin-login h2 {
  font-size: 22px;
  color: var(--blue-dark);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.admin-login p {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 20px;
}

.admin-login input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 15px;
  text-align: center;
  margin-bottom: 16px;
  outline: none;
}

.admin-login input:focus {
  border-color: var(--blue-dark);
}

.admin-login .btn {
  width: 100%;
}

.admin-login__error {
  color: var(--red);
  font-size: 13px;
  margin-top: 8px;
}

.admin-panel {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--gray-100);
  z-index: 9998;
  display: flex;
  flex-direction: column;
}

.admin-panel.hidden {
  display: none;
}

.admin-panel__header {
  background: var(--blue-darker);
  color: var(--white);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
  flex-shrink: 0;
}

.admin-panel__title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-panel__close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.admin-panel__close:hover {
  opacity: 1;
}

.admin-panel__body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.admin-sidebar {
  width: 200px;
  background: var(--blue-dark);
  color: var(--white);
  flex-shrink: 0;
  overflow-y: auto;
  padding: 8px 0;
}

.admin-sidebar__item {
  display: block;
  width: 100%;
  padding: 12px 18px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s;
}

.admin-sidebar__item:hover {
  color: var(--white);
  background: rgba(255,255,255,0.06);
}

.admin-sidebar__item.active {
  color: var(--white);
  background: var(--red);
}

.admin-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--gray-100);
}

.admin-content__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.admin-content__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-dark);
  text-transform: uppercase;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 13px;
}

.admin-table th {
  background: var(--blue-dark);
  color: var(--white);
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: #FAFAFA;
}

.admin-table .actions {
  display: flex;
  gap: 6px;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: opacity 0.15s;
}

.btn-sm:hover {
  opacity: 0.85;
}

.btn-sm--edit {
  background: var(--blue-dark);
  color: var(--white);
}

.btn-sm--delete {
  background: var(--red);
  color: var(--white);
}

.btn-sm--save {
  background: #2E7D32;
  color: var(--white);
}

.btn-sm--cancel {
  background: var(--gray-300);
  color: var(--white);
}

.admin-form {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.admin-form__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.admin-form__row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.admin-form__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 180px;
}

.admin-form__field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.admin-form__field input,
.admin-form__field textarea,
.admin-form__field select {
  padding: 8px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border 0.15s;
}

.admin-form__field input:focus,
.admin-form__field textarea:focus,
.admin-form__field select:focus {
  border-color: var(--blue-dark);
}

.admin-form__field textarea {
  resize: vertical;
  min-height: 70px;
}

.admin-form__actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.admin-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-light);
  font-size: 14px;
}

.admin-contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.admin-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--gray-200);
  display: block;
}

.admin-thumb-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--gray-300);
  font-weight: 700;
}

.admin-file-input {
  padding: 6px 8px !important;
  font-size: 12px !important;
}

.admin-photo-preview {
  margin-top: 6px;
}

.admin-photo-preview img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--gray-200);
}

/* === МОДАЛЬНОЕ ОКНО АДМИНКИ === */
.admin-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10005;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.admin-modal {
  background: var(--white);
  border-radius: var(--radius);
  width: 620px;
  max-width: 95vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(0,0,0,0.4);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.admin-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.admin-modal__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-modal__title--create {
  color: var(--blue-dark);
}

.admin-modal__title--edit {
  color: var(--red);
}

.admin-modal__close {
  background: none;
  border: none;
  color: var(--gray-300);
  font-size: 26px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}

.admin-modal__close:hover {
  color: var(--red);
}

.admin-modal__body {
  padding: 20px 24px 24px;
}

.admin-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 24px 20px;
  border-top: 1px solid var(--gray-200);
  padding-top: 16px;
  margin-top: 8px;
}
