/* OfficeHub — Custom Styles */

/* Smooth transitions */
* {
  border-color: var(--border);
}

/* Button base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.15s;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover:not(:disabled) { filter: brightness(0.95); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--foreground); }
.btn-outline:hover:not(:disabled) { background: var(--accent); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover:not(:disabled) { background: var(--accent); }
.btn-destructive { background: var(--destructive); color: white; }
.btn-destructive:hover:not(:disabled) { filter: brightness(0.95); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-icon { padding: 0.5rem; width: 2.25rem; height: 2.25rem; }

/* Input */
.input, .textarea, .select-trigger {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--input);
  border-radius: 0.5rem;
  background: var(--background);
  color: var(--foreground);
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.input:focus, .textarea:focus, .select-trigger:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 15%, transparent);
}
.textarea { resize: vertical; min-height: 80px; }

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid var(--border);
}

/* Dialog/Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1rem;
}
.modal {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-width: 32rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-lg { max-width: 48rem; }
.modal-sm { max-width: 24rem; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.fade-in { animation: fadeIn 0.2s; }
.slide-in { animation: slideIn 0.3s; }

/* Table */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 0.75rem 1rem; font-weight: 500; font-size: 0.8125rem; color: var(--muted-foreground); background: var(--muted); }
.table td { padding: 0.75rem 1rem; border-top: 1px solid var(--border); font-size: 0.875rem; }
.table tbody tr:hover { background: color-mix(in srgb, var(--muted) 30%, transparent); }

/* Toast */
.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-size: 0.875rem;
  animation: slideIn 0.3s;
  min-width: 280px;
}
.toast-success { border-left: 3px solid #22c55e; }
.toast-error { border-left: 3px solid var(--destructive); }

/* Spinner */
.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Spreadsheet cell */
.spreadsheet-cell {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  outline: none;
  border-radius: 0;
  font-family: inherit;
  color: var(--foreground);
}
.spreadsheet-cell:focus { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.spreadsheet-cell::placeholder { color: var(--muted-foreground); opacity: 0.5; }
