/* ═══════════════════════════════════════ */
/* PatriPass Design System                 */
/* ═══════════════════════════════════════ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #0a0f1a;
  --slate: #3d4663;
  --mist: #8892b0;
  --cloud: #e8ecf4;
  --snow: #f7f8fc;
  --white: #ffffff;
  --amber: #e8a838;
  --amber-soft: #fdf5e6;
  --teal: #1a8a7d;
  --teal-soft: #e6f7f5;
  --red: #e04848;
  --red-soft: #fde8e8;
  --sidebar-w: 260px;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--snow);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; }

/* ═══════ AUTH PAGES ═══════ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(26,138,125,0.06), transparent),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(232,168,56,0.06), transparent),
    var(--white);
  padding: 2rem;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: 20px;
  padding: 3rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(10,15,26,0.06);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  text-decoration: none;
  color: var(--ink);
}

.auth-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--ink);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  font-size: 1.1rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}

.auth-logo span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.auth-card h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.auth-card .subtitle {
  color: var(--mist);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--cloud);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(26,138,125,0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--ink);
  color: var(--white);
}

.btn-primary:hover {
  background: #1a2035;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10,15,26,0.2);
}

.btn-teal {
  background: var(--teal);
  color: var(--white);
}

.btn-teal:hover {
  background: #158a7a;
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--white);
  color: var(--slate);
  border: 1px solid var(--cloud);
}

.btn-outline:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.btn-danger {
  background: var(--red-soft);
  color: var(--red);
}

.btn-danger:hover {
  background: var(--red);
  color: var(--white);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.auth-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--mist);
}

.auth-link a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.auth-link a:hover { text-decoration: underline; }

.error-msg {
  background: var(--red-soft);
  color: var(--red);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
}

.error-msg.show { display: block; }

/* ═══════ DASHBOARD LAYOUT ═══════ */
.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--ink);
  color: var(--white);
  padding: 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  text-decoration: none;
  color: var(--white);
}

.sidebar-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}

.sidebar-logo span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  color: var(--mist);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}

.nav-item.active {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

.nav-item .nav-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}

.sidebar-user {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  margin-top: 1rem;
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--teal), var(--amber));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
  font-family: 'Space Grotesk', sans-serif;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
}

.user-email {
  font-size: 0.75rem;
  color: var(--mist);
}

/* ═══════ MAIN CONTENT ═══════ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 2rem 2.5rem;
  min-height: 100vh;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--mist);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ═══════ STATS GRID ═══════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: 16px;
  padding: 1.5rem;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mist);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 2rem;
}

.stat-card .stat-value.teal { color: var(--teal); }
.stat-card .stat-value.amber { color: var(--amber); }

/* ═══════ CARDS ═══════ */
.card {
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(10,15,26,0.06);
}

.card-clickable { cursor: pointer; }
.card-clickable:hover { border-color: var(--teal); }

/* ═══════ PROPERTY CARDS ═══════ */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.property-card {
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.property-card:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 24px rgba(10,15,26,0.06);
  transform: translateY(-2px);
}

.property-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.property-type-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}

.badge-principal { background: var(--teal-soft); color: var(--teal); }
.badge-secondaire { background: var(--amber-soft); color: var(--amber); }
.badge-locatif { background: #e8e6f7; color: #5b4fc7; }
.badge-sci { background: #e6f0f7; color: #2d6ca3; }

.property-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.property-card .address {
  color: var(--mist);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.property-meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.property-meta span {
  font-size: 0.8rem;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ═══════ DOCUMENTS ═══════ */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: 12px;
  transition: border-color 0.2s;
}

.doc-item:hover {
  border-color: var(--teal);
}

.doc-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.doc-icon.diagnostic { background: var(--teal-soft); }
.doc-icon.titre { background: var(--amber-soft); }
.doc-icon.contrat { background: #e8e6f7; }
.doc-icon.fiscal { background: #e6f0f7; }
.doc-icon.travaux { background: #f0e6e6; }
.doc-icon.assurance { background: #e6f7ec; }
.doc-icon.photo { background: #f7f0e6; }
.doc-icon.autre { background: var(--snow); }

.doc-info {
  flex: 1;
  min-width: 0;
}

.doc-info .doc-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-info .doc-meta {
  font-size: 0.8rem;
  color: var(--mist);
  margin-top: 0.15rem;
}

.doc-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ═══════ UPLOAD ZONE ═══════ */
.upload-zone {
  border: 2px dashed var(--cloud);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 1.25rem;
}

.upload-zone:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.upload-zone.dragover {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.upload-zone .upload-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.upload-zone p {
  color: var(--slate);
  font-size: 0.9rem;
}

.upload-zone .upload-hint {
  color: var(--mist);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* ═══════ SHARE LINKS ═══════ */
.share-card {
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.share-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.share-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.share-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.share-status.active .dot { background: var(--teal); }
.share-status.active { color: var(--teal); }
.share-status.inactive .dot { background: var(--mist); }
.share-status.inactive { color: var(--mist); }

.share-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--slate);
}

.share-url-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--snow);
  border: 1px solid var(--cloud);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}

.share-url-box input {
  flex: 1;
  border: none;
  background: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--slate);
  outline: none;
}

.share-actions {
  display: flex;
  gap: 0.5rem;
}

/* ═══════ CREATE SHARE FORM ═══════ */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.provider-option {
  border: 2px solid var(--cloud);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--white);
}

.provider-option:hover {
  border-color: var(--teal);
}

.provider-option.selected {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.provider-option .provider-icon {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.provider-option .provider-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--cloud);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.checkbox-item:hover { border-color: var(--teal); }

.checkbox-item.checked {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.checkbox-item input[type="checkbox"] {
  accent-color: var(--teal);
  width: 18px;
  height: 18px;
}

.checkbox-item label {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ═══════ EMPTY STATE ═══════ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--mist);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ═══════ MODAL ═══════ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10,15,26,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 2rem;
}

.modal {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(10,15,26,0.15);
}

.modal h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cloud);
}

/* ═══════ SECTION ═══════ */
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-divider {
  height: 1px;
  background: var(--cloud);
  margin: 2rem 0;
}

/* ═══════ BACK LINK ═══════ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--mist);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 1.5rem;
  cursor: pointer;
}

.back-link:hover { color: var(--teal); }

/* ═══════ TOAST ═══════ */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--ink);
  color: var(--white);
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(10,15,26,0.2);
  z-index: 300;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success { background: var(--teal); }
.toast.error { background: var(--red); }

/* ═══════ LOADING ═══════ */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--cloud);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}

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

.loading-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* ═══════ RESPONSIVE ═══════ */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 60;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10,15,26,0.4);
  z-index: 40;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar.open ~ .sidebar-overlay {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 1.25rem;
    padding-top: 4rem;
  }

  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .page-header h1 {
    font-size: 1.4rem;
  }

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

  .stat-card {
    padding: 1rem;
  }

  .stat-card .stat-value {
    font-size: 1.5rem;
  }

  .property-grid {
    grid-template-columns: 1fr;
  }

  .provider-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .provider-option {
    padding: 0.75rem;
  }

  .provider-option .provider-icon {
    font-size: 1.25rem;
  }

  .provider-option .provider-name {
    font-size: 0.75rem;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-overlay {
    padding: 0.75rem;
    align-items: flex-end;
  }

  .modal {
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
    max-height: 85vh;
  }

  .doc-item {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
  }

  .doc-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .share-card {
    padding: 1.25rem;
  }

  .share-url-box {
    flex-direction: column;
  }

  .share-url-box input {
    width: 100%;
    font-size: 0.8rem;
  }

  .share-url-box .btn {
    width: 100%;
    justify-content: center;
  }

  .share-meta {
    gap: 0.75rem;
    font-size: 0.8rem;
  }

  .share-actions {
    flex-wrap: wrap;
  }

  .share-actions .btn {
    flex: 1;
    justify-content: center;
    min-width: 120px;
  }

  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .upload-form .form-row-inline {
    flex-direction: column;
  }

  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    text-align: center;
  }

  .back-link {
    margin-bottom: 1rem;
  }

  .empty-state {
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 1rem;
    padding-top: 3.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .stat-card {
    padding: 0.85rem;
  }

  .stat-card .stat-label {
    font-size: 0.65rem;
  }

  .stat-card .stat-value {
    font-size: 1.3rem;
  }

  .property-card {
    padding: 1.25rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }

  .auth-card h1 {
    font-size: 1.35rem;
  }

  .modal {
    padding: 1.25rem;
  }

  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ═══════ PROPERTY DETAIL ═══════ */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-item {
  background: var(--snow);
  border-radius: 10px;
  padding: 1rem;
}

.detail-item .detail-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mist);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.detail-item .detail-value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

/* ═══════ INLINE UPLOAD FORM ═══════ */
.upload-form {
  display: none;
  background: var(--snow);
  border: 1px solid var(--cloud);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1rem;
}

.upload-form.show { display: block; }

.upload-form .form-row-inline {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.upload-form .form-row-inline .form-group {
  flex: 1;
  margin-bottom: 0;
}

.upload-progress {
  height: 4px;
  background: var(--cloud);
  border-radius: 2px;
  margin-top: 0.75rem;
  overflow: hidden;
  display: none;
}

.upload-progress.show { display: block; }

.upload-progress .bar {
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
  transition: width 0.3s;
}

/* ═══════ SENT INVITATIONS ═══════ */
.sent-invitations {
  margin-top: 1rem;
  border-top: 1px solid var(--cloud);
  padding-top: 0.75rem;
}

.sent-invitations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate);
  user-select: none;
}

.sent-invitations-header:hover {
  color: var(--teal);
}

.toggle-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.sent-invitations-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.sent-invitations-list.expanded {
  max-height: 500px;
}

.sent-email-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--snow);
  border-radius: 10px;
  margin-top: 0.5rem;
}

.sent-email-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid var(--cloud);
}

.sent-email-info {
  flex: 1;
  min-width: 0;
}

.sent-email-name {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sent-email-detail {
  font-size: 0.75rem;
  color: var(--mist);
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
