.upload-zone {
  position: relative;
  display: block;
  transition: border-color .2s, background .2s, transform .2s;
}

.upload-zone.dragging {
  border-color: #0b789b;
  background: rgba(11, 120, 155, .08);
  transform: translateY(-2px);
}

.upload-zone strong {
  display: block;
}

.image-preview {
  width: 100%;
  max-height: 260px;
  margin-top: 14px;
  border-radius: 12px;
  object-fit: contain;
  background: #edf8fb;
}

.message-image-link {
  display: block;
  margin-top: 12px;
}

.message-image {
  display: block;
  width: 100%;
  max-height: 420px;
  border-radius: 14px;
  object-fit: contain;
  background: #edf8fb;
  border: 1px solid #d5e9ef;
}

.message-file {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #d5e9ef;
  border-radius: 13px;
  background: #f3fbfd;
  color: #256b82;
  text-decoration: none;
}
.message-file small { margin-left: auto; color: #7898a6; }
.message-file:hover { border-color: #79bbcc; background: #eaf8fb; }

.section-tools { display: flex; align-items: center; gap: 10px; }
.admin-bulk-actions { display: flex; align-items: center; gap: 8px; }
.admin-bulk-actions form { margin: 0; }
.bulk-button {
  border: 1px solid #c7e0e7;
  border-radius: 10px;
  background: #fff;
  color: #426f82;
  padding: 8px 11px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}
.bulk-button:hover { background: #edf8fb; }
.bulk-danger { border-color: #f1c9cf; color: #c65060; }
.bulk-danger:hover { background: #fff0f2; }

.submit-button { position: relative; min-height: 52px; }
.submit-button:disabled { cursor: wait; opacity: .88; transform: none; }
.button-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: button-spin .75s linear infinite;
}
.submit-button.loading .button-spinner { display: inline-block; }
.submit-button.loading .button-arrow { display: none; }
@keyframes button-spin { to { transform: rotate(360deg); } }

.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18,57,86,.28);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity .18s ease;
}
.feedback-modal[hidden] { display: none; }
.feedback-modal.open { opacity: 1; }
.feedback-card {
  width: min(400px, 100%);
  padding: 30px;
  border: 1px solid #fff;
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 28px 80px rgba(27,82,105,.25);
  text-align: center;
  transform: translateY(12px) scale(.97);
  transition: transform .18s ease;
}
.feedback-modal.open .feedback-card { transform: none; }
.feedback-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff0f2;
  color: #cc5362;
  font-size: 25px;
  font-weight: 800;
}
.feedback-modal.success .feedback-icon { background: #e5f8f1; color: #168060; }
.feedback-card h3 { margin: 0; font-size: 23px; }
.feedback-card p { margin: 8px 0 20px; color: #648394; }

.privacy-toggle {
  display: grid;
  grid-template-columns: 24px 28px 1fr;
  align-items: center;
  gap: 10px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--soft) 62%, #fff);
  cursor: pointer;
}
.privacy-toggle input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.privacy-check { float: none; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; background: var(--accent); color: #fff; opacity: .35; transition: .2s; }
.privacy-toggle:has(input:checked) .privacy-check { opacity: 1; transform: rotate(-5deg) scale(1.06); }
.privacy-copy { float: none; display: block; }
.privacy-copy strong { display: block; color: var(--text); }
.privacy-copy small { display: block; margin-top: 2px; color: var(--muted); font-weight: 400; line-height: 1.5; }

.encrypted-placeholder { flex: 1; display: grid; place-items: center; align-content: center; min-height: 175px; padding: 18px; text-align: center; }
.encrypted-placeholder .lock-symbol { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); color: var(--accent); font-size: 28px; font-weight: 800; transform: rotate(-8deg); }
.encrypted-placeholder h3 { margin: 12px 0 3px; font-size: 19px; }
.encrypted-placeholder p { margin: 0 0 15px; color: var(--muted); font-size: 13px; }
.encrypted-placeholder .primary { padding: 10px 16px; border-radius: 12px; font-size: 13px; }
.encrypted-placeholder.unlocked { display: flex; flex-direction: column; align-items: stretch; text-align: left; padding: 0; }
.encrypted-placeholder.unlocked .signature { align-self: flex-end; }

.password-modal .feedback-card { text-align: left; }
.password-modal .feedback-icon { text-align: center; }
.password-modal h3, .password-modal > .feedback-card > p { text-align: center; }
.password-modal label { margin-top: 12px; }
.password-error { min-height: 22px; margin-top: 8px; color: #c44d5a; font-size: 13px; text-align: center; }
.modal-cancel { width: 100%; margin-top: 10px; padding: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
[data-unlock-button].loading .button-spinner { display: inline-block; }

@media(max-width:760px) {
  .privacy-toggle { grid-template-columns: 22px 26px 1fr; padding: 13px; }
  .encrypted-placeholder { min-height: 155px; }
}

.ocean-auth { background: linear-gradient(160deg,#d9f8ff,#d6ebff 58%,#fff); }
.ocean-auth .sea-bg { display: block; position: fixed; height: 100vh; }
.ocean-auth-card { position: relative; border-color: #fff; }
.auth-mark { margin: 0 auto 18px; }
.ocean-auth-card .eyebrow { display: block; text-align: center; }
.ocean-auth-card h1, .ocean-auth-card > p { text-align: center; }

@media (max-width: 760px) {
  .section-head { align-items: flex-start; gap: 14px; }
  .section-tools { align-items: flex-end; flex-direction: column; }
  .admin-bulk-actions { flex-wrap: wrap; justify-content: flex-end; }
  .message-file { align-items: flex-start; flex-wrap: wrap; }
  .message-file small { width: 100%; margin-left: 28px; }
}
