@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ── Design Tokens ── */
:root {
  --nautical:       #1A3A5C;
  --nautical-dark:  #0F1F35;
  --nautical-mid:   #2D5F8A;
  --nautical-light: #E5EEF6;
  --gold:           #C8922A;
  --gold-light:     #FBF3E0;
  --white:          #FFFFFF;
  --bg:             #F4F7FB;
  --text:           #0F1F35;
  --text-muted:     #6B7D90;
  --border:         #D6E1EE;
  --success:        #27AE60;
  --success-bg:     #EAF7F0;
  --error:          #E53E3E;
  --error-bg:       #FEF0F0;
  --shadow:         0 4px 24px rgba(15, 31, 53, 0.12);
  --shadow-hover:   0 8px 32px rgba(15, 31, 53, 0.24);
  --radius:         14px;
  --radius-sm:      8px;
  --transition:     0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display:   'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body:      'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body {
  height: 100%;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── Login Page ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--nautical-dark) 0%, var(--nautical) 60%, var(--nautical-mid) 100%);
  padding: 20px;
}

.login-card {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 44px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
  animation: cardRise 0.55s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes cardRise {
  from { opacity: 0; transform: translateY(32px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--nautical), var(--nautical-mid));
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(29, 78, 137, 0.3);
}

.login-logo .logo-icon svg { width: 32px; height: 32px; fill: white; }

.login-logo h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--nautical-dark);
  letter-spacing: -0.3px;
}

.login-logo p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
  letter-spacing: 0.1px;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  font-family: inherit;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--nautical-mid);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}

.form-group input::placeholder { color: var(--text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none;
  font-family: inherit;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--nautical), var(--nautical-mid));
  color: var(--white);
  width: 100%;
  box-shadow: 0 4px 16px rgba(29, 78, 137, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(29, 78, 137, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--white);
  color: var(--nautical);
  border: 1.5px solid var(--nautical);
}

.btn-outline:hover { background: var(--nautical-light); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  animation: fadeSlide 0.25s ease both;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.alert-error { background: var(--error-bg); color: var(--error); border: 1px solid #FCA5A5; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #86EFAC; }

/* ── Unit Dashboard ── */
.unit-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.site-header {
  background: linear-gradient(135deg, var(--nautical-dark), var(--nautical));
  color: var(--white);
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-brand .brand-icon {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.25);
}

.header-brand .brand-icon svg { width: 20px; height: 20px; fill: white; }

.header-brand h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.header-right { display: flex; align-items: center; gap: 12px; }

.btn-logout {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  font-family: inherit;
}
.btn-logout:hover { background: rgba(255,255,255,0.25); }

.unit-info-bar {
  background: var(--nautical-light);
  border-bottom: 1.5px solid var(--border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.unit-info-bar .unit-address {
  font-size: 15px;
  font-weight: 700;
  color: var(--nautical-dark);
}

.unit-info-bar .lease-dates {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.lease-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.lease-badge.active { background: var(--success-bg); color: var(--success); }
.lease-badge.no-dates { background: var(--gold-light); color: var(--gold); }

/* ── Action Grid ── */
.action-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 14px;
  padding: 14px 20px;
  overflow: hidden;
}

.action-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  padding: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.action-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--nautical), var(--nautical-mid));
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: calc(var(--radius) - 2px);
}

.action-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--nautical-mid);
}

.action-card:hover::before { opacity: 0.04; }
.action-card:active { transform: translateY(-1px); }

.action-card.card-gold:hover { border-color: var(--gold); }
.action-card.card-gold .card-icon { background: var(--gold-light); color: var(--gold); }
.action-card.card-gold:hover .card-icon { background: var(--gold); color: var(--white); }

.card-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--nautical-light);
  color: var(--nautical);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.action-card:hover .card-icon {
  background: var(--nautical);
  color: var(--white);
}

.card-icon svg { width: 26px; height: 26px; }

.card-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.card-sublabel {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.3;
}

.action-card.card-info {
  background: linear-gradient(135deg, var(--nautical-dark), var(--nautical));
  border-color: transparent;
  cursor: default;
}

.action-card.card-info::before { display: none; }
.action-card.card-info:hover { transform: none; box-shadow: var(--shadow); }

.action-card.card-info .card-label { color: rgba(255,255,255,0.9); }
.action-card.card-info .card-sublabel { color: rgba(255,255,255,0.65); }
.action-card.card-info .card-icon {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.25);
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 45, 82, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 560px;
  padding: 32px 32px 28px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 85vh;
  overflow-y: auto;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--nautical-dark);
  line-height: 1.2;
}

.modal-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.modal-close {
  background: var(--bg);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
  margin-left: 12px;
  margin-top: -2px;
}

.modal-close:hover { background: var(--border); color: var(--text); }
.modal-close svg { width: 18px; height: 18px; }

.modal-footer {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.modal-footer .btn { flex: 1; }

/* File Upload */
.file-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

.file-drop:hover, .file-drop.drag-over {
  border-color: var(--nautical-mid);
  background: var(--nautical-light);
}

.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-drop .drop-icon { font-size: 28px; margin-bottom: 8px; }
.file-drop p { font-size: 13px; color: var(--text-muted); }
.file-drop strong { color: var(--nautical); }

.file-list {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  background: var(--nautical-light);
  border-radius: 20px;
  font-size: 12px;
  color: var(--nautical);
  font-weight: 500;
}

.file-chip button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--nautical);
  padding: 0;
  line-height: 1;
  font-size: 14px;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Admin ── */
.admin-page {
  min-height: 100vh;
  background: var(--bg);
}

.admin-header {
  background: linear-gradient(135deg, var(--nautical-dark), var(--nautical));
  color: white;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.admin-header h1 { font-size: 18px; font-weight: 700; }

.admin-content { padding: 28px; max-width: 1100px; margin: 0 auto; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card .stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--nautical);
}

.stat-card .stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.submission-list { display: flex; flex-direction: column; gap: 10px; }

.submission-row {
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.submission-row:hover {
  border-color: var(--nautical-mid);
  box-shadow: var(--shadow);
  transform: translateX(2px);
}

.type-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.type-maintenance { background: #FEF3C7; color: #92400E; }
.type-message { background: #DBEAFE; color: #1E40AF; }
.type-renewal { background: #D1FAE5; color: #065F46; }
.type-movein { background: #EDE9FE; color: #5B21B6; }
.type-moveout { background: #FCE7F3; color: #9D174D; }

.submission-row .sub-address { font-size: 13px; color: var(--text-muted); }
.submission-row .sub-preview { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.submission-row .sub-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.submission-row .sub-arrow { color: var(--nautical-mid); }

/* Detail page */
.detail-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 28px;
  margin-bottom: 20px;
}

.detail-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.detail-field { margin-bottom: 14px; }
.detail-field label { font-size: 12px; color: var(--text-muted); font-weight: 600; display: block; margin-bottom: 4px; }
.detail-field p { font-size: 15px; color: var(--text); line-height: 1.5; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.photo-thumb {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1.5px solid var(--border);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.photo-thumb:hover img { transform: scale(1.05); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--nautical);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  transition: gap var(--transition);
}
.back-link:hover { gap: 10px; }

/* Tabs in admin */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--nautical-light);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  font-family: inherit;
}

.tab-btn.active {
  background: var(--white);
  color: var(--nautical);
  box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .action-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
    overflow-y: auto;
  }

  .unit-page { overflow: auto; height: auto; min-height: 100vh; }

  .admin-stats { grid-template-columns: repeat(2, 1fr); }

  .submission-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .login-card { padding: 36px 28px; }
}

@media (max-width: 480px) {
  .modal { padding: 24px 20px 20px; }
  .admin-content { padding: 16px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */

/* ── Login page: animated gradient + floating orbs ── */
.login-page {
  background-size: 300% 300%;
  animation: gradientShift 12s ease infinite;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.orb {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  animation: orbFloat 12s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes orbFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(20px, -30px) scale(1.08); }
}

/* Logo icon pulse on hover */
.login-logo .logo-icon {
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s ease;
}
.login-logo .logo-icon:hover {
  transform: scale(1.1) rotate(-4deg);
  box-shadow: 0 8px 28px rgba(29,78,137,0.45);
}

/* Form field focus: subtle lift */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(43,108,176,0.15), 0 0 0 3px rgba(43,108,176,0.12);
}

/* ── Header slide-down ── */
.site-header  { animation: slideDown 0.45s cubic-bezier(0.22,1,0.36,1) both; }
.admin-header { animation: slideDown 0.45s cubic-bezier(0.22,1,0.36,1) both; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Info bar slide-in ── */
.unit-info-bar { animation: slideRight 0.45s cubic-bezier(0.22,1,0.36,1) 0.15s both; }

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Action card staggered entrance ── */
@keyframes cardPop {
  0%   { opacity: 0; transform: translateY(24px) scale(0.94); }
  65%  { transform: translateY(-4px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.action-grid .action-card:nth-child(1) { animation: cardPop 0.55s cubic-bezier(0.22,1,0.36,1) 0.18s both; }
.action-grid .action-card:nth-child(2) { animation: cardPop 0.55s cubic-bezier(0.22,1,0.36,1) 0.24s both; }
.action-grid .action-card:nth-child(3) { animation: cardPop 0.55s cubic-bezier(0.22,1,0.36,1) 0.30s both; }
.action-grid .action-card:nth-child(4) { animation: cardPop 0.55s cubic-bezier(0.22,1,0.36,1) 0.36s both; }
.action-grid .action-card:nth-child(5) { animation: cardPop 0.55s cubic-bezier(0.22,1,0.36,1) 0.42s both; }
.action-grid .action-card:nth-child(6) { animation: cardPop 0.55s cubic-bezier(0.22,1,0.36,1) 0.48s both; }
.action-grid .action-card:nth-child(7) { animation: cardPop 0.55s cubic-bezier(0.22,1,0.36,1) 0.54s both; }
.action-grid .action-card:nth-child(8) { animation: cardPop 0.55s cubic-bezier(0.22,1,0.36,1) 0.60s both; }

/* Card click ripple */
.action-card { isolation: isolate; }

.action-card .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(29,78,137,0.18);
  transform: scale(0);
  animation: rippleOut 0.55s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleOut {
  to { transform: scale(4); opacity: 0; }
}

/* Card icon bounce on hover */
.action-card:hover .card-icon {
  animation: iconBounce 0.4s cubic-bezier(0.22,1,0.36,1);
}

@keyframes iconBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18) translateY(-3px); }
  70%  { transform: scale(0.96) translateY(1px); }
  100% { transform: scale(1) translateY(0); }
}

/* ── Modal: spring in from bottom ── */
.modal-overlay.open .modal {
  animation: springUp 0.4s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes springUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ── Admin stat cards stagger ── */
@keyframes statPop {
  0%   { opacity: 0; transform: scale(0.88) translateY(12px); }
  70%  { transform: scale(1.04) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.admin-stats .stat-card:nth-child(1) { animation: statPop 0.5s cubic-bezier(0.22,1,0.36,1) 0.08s both; }
.admin-stats .stat-card:nth-child(2) { animation: statPop 0.5s cubic-bezier(0.22,1,0.36,1) 0.16s both; }
.admin-stats .stat-card:nth-child(3) { animation: statPop 0.5s cubic-bezier(0.22,1,0.36,1) 0.24s both; }
.admin-stats .stat-card:nth-child(4) { animation: statPop 0.5s cubic-bezier(0.22,1,0.36,1) 0.32s both; }
.admin-stats .stat-card:nth-child(5) { animation: statPop 0.5s cubic-bezier(0.22,1,0.36,1) 0.40s both; }

/* Stat card hover lift */
.stat-card {
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* Stat number count-up shimmer */
.stat-num {
  position: relative;
  display: inline-block;
}
.stat-num::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.7) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease 0.5s both;
  pointer-events: none;
}
@keyframes shimmer {
  0%   { background-position: -200% 0; opacity: 1; }
  100% { background-position: 200% 0; opacity: 0; }
}

/* ── Admin submission rows stagger (applied via inline style) ── */
@keyframes rowSlideIn {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.submission-row {
  animation: rowSlideIn 0.4s cubic-bezier(0.22,1,0.36,1) both;
}

/* ── Detail card fade-up ── */
.detail-card {
  animation: fadeUp 0.45s cubic-bezier(0.22,1,0.36,1) both;
}
.detail-card:nth-child(2) { animation-delay: 0.08s; }
.detail-card:nth-child(3) { animation-delay: 0.16s; }

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

/* Back link arrow slide */
.back-link svg {
  transition: transform var(--transition);
}
.back-link:hover svg { transform: translateX(-4px); }

/* ── Alert: shake on error ── */
.alert-error { animation: fadeSlide 0.25s ease both, shakeError 0.4s ease 0.25s both; }

@keyframes shakeError {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}

/* ── Button submit: success flash ── */
.btn-primary:not(:disabled):active {
  animation: btnPress 0.15s ease;
}
@keyframes btnPress {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.96); }
  100% { transform: scale(1); }
}

/* ── Lease badge pulse when active ── */
.lease-badge.active {
  animation: badgePulse 2.5s ease-in-out 1s 2;
}
@keyframes badgePulse {
  0%,100% { box-shadow: none; }
  50%     { box-shadow: 0 0 0 4px rgba(39,174,96,0.2); }
}

/* ── File drop zone: bounce on dragover ── */
.file-drop.drag-over {
  animation: dropBounce 0.3s cubic-bezier(0.22,1,0.36,1);
}
@keyframes dropBounce {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}
